Main Site Documentation

Spider not fully starting after reset


#1

When I start a new instance of debug or physically press the reset button on the board after a debugging session, sometimes the LCD clears and says: ‘GHI’ and then hangs there.

If I press the reset a few times, eventually I get the normal startup display.

Two questions:

Is there a way to reset the board to factory in software?
Is there a proper way to press the reset button (seriously)?

Re’s

Glenn


#2

Program log information for reference:

Using mainboard GHIElectronics-FEZSpider version 1.0
Program Started
SDCard Inserted? : True
SDCard Mounted? : True
Version Number is 4.4.5
WiFi Module’s MAC Address is 0351673116226
Searching for WiFi APs
Total Available Network are 2
TCG
TC
Connecting to TC
WiFi link is ready!
WiFi connection was established!
Network settings:
IP Address: 10.0.1.11
Subnet Mask: 255.255.255.0
Default Getway: 10.0.1.1
DNS Server: 10.0.1.1
Test DNS
www.ghielectronics.com: 207.58.176.212
Disconnect WiFi link.
WiFi connection was dropped or disconnected!
Disable WiFi interface
IsLinkConnected?: False
Current Hardware Module: 1
IsEnabled? : True

Assembly Reference:

Assembly: mscorlib (4.1.2821.0) (3880 RAM - 33236 ROM - 19134 METADATA)
Assembly: Microsoft.SPOT.Native (4.1.2821.0) (1144 RAM - 6516 ROM - 4479 METADATA)
Assembly: Microsoft.SPOT.IO (4.1.2821.0) (740 RAM - 4620 ROM - 2522 METADATA)
Assembly: Gadgeteer (2.41.0.0) (5268 RAM - 63688 ROM - 22962 METADATA)
Assembly: Microsoft.SPOT.Graphics (4.1.2821.0) (388 RAM - 2268 ROM - 1357 METADATA)
Assembly: System.Http (4.1.2821.0) (2976 RAM - 38160 ROM - 12831 METADATA)
Assembly: Microsoft.SPOT.Hardware (4.1.2821.0) (1752 RAM - 11440 ROM - 7371 METADATA)
Assembly: GTM.GHIElectronics.SDCard (1.0.0.0) (496 RAM - 3244 ROM - 1248 METADATA)
Assembly: System (4.1.2821.0) (872 RAM - 5992 ROM - 3206 METADATA)
Assembly: Microsoft.SPOT.Net.Security (4.1.2821.0) (264 RAM - 1220 ROM - 606 METADATA)
Assembly: Microsoft.SPOT.Net (4.1.2821.0) (704 RAM - 5060 ROM - 2452 METADATA)
Assembly: GTM.GHIElectronics.Display_T35 (1.0.0.0) (444 RAM - 2420 ROM - 912 METADATA)
Assembly: Microsoft.SPOT.TinyCore (4.1.2821.0) (5048 RAM - 61120 ROM - 23305 METADATA)
Assembly: GTM.GHIElectronics.UsbClientDP (1.0.0.0) (196 RAM - 492 ROM - 166 METADATA)
Assembly: GadgeteerApp1 (1.0.0.0) (656 RAM - 7776 ROM - 1526 METADATA)
Assembly: Microsoft.SPOT.Touch (4.1.2821.0) (408 RAM - 2332 ROM - 1176 METADATA)
Assembly: GTM.GHIElectronics.WiFi_RS21 (1.0.0.0) (364 RAM - 1984 ROM - 714 METADATA)
Assembly: GHIElectronics.NETMF.IO (4.1.7.0) (212 RAM - 664 ROM - 289 METADATA)
Assembly: GHIElectronics.NETMF.Net (4.1.7.0) (748 RAM - 6460 ROM - 2419 METADATA)
Assembly: System.IO (4.1.2821.0) (1548 RAM - 13292 ROM - 5862 METADATA)
Assembly: GHIElectronics.NETMF.Hardware (4.1.7.0) (1268 RAM - 8732 ROM - 5109 METADATA)
Assembly: System.Net.Security (4.1.2821.0) (664 RAM - 4544 ROM - 1943 METADATA)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.1.2821.0) (508 RAM - 3440 ROM - 1527 METADATA)
Assembly: GHIElectronics.NETMF.System (4.1.7.0) (488 RAM - 2496 ROM - 1465 METADATA)
Assembly: GHIElectronics.Gadgeteer.FEZSpider (1.0.0.0) (764 RAM - 5752 ROM - 1971 METADATA)

#3

Normally, you do not need to do reflash on the device but there is a way.

Instead, load a simple program, on a new project, and test again. By simple I mean blink an led or show something on display.

Also, make sure you have good power source.


#4

Okay. The WiFi module was getting in the way of rebooting. I’m not sure why. There is another topic that Joe replied to regarding the inability to disable the WiFi after a successful disconnect.I suspect that is key to the problem.

Having gotten beyond that by removing WiFi from the equation, I can run a simple program that looks at the SD Card and lists the files on it during ProgramStarted().

When Program.Run() executes, I’m getting an exception that looks to be a null event callback problem (log follows).

I’ve looked for documentation on what events I can hook up beyond connected hardware, but I’m not seeing it. I do have a callback for the SD Card unmounted event.

Am I missing something simple but key here?

Using mainboard GHIElectronics-FEZSpider version 1.0
PulseDebugLED called
Program Started
SDCard Inserted? : True
SDCard Mounted? : True
File: ignore_my_docs
File: BOOTEX.LOG
(Program.Run() here ----------------------------------------------------------------------------------------------)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (3) ####
#### Message:
#### Microsoft.SPOT.Application::OnEvent [IP: 0098] ####
#### Microsoft.SPOT.EventSink::ProcessEvent [IP: 0023] ####
#### Microsoft.SPOT.EventSink::EventDispatchCallback [IP: 0014] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Microsoft.SPOT.TinyCore.dll
An unhandled exception of type ‘System.NullReferenceException’ occurred in Microsoft.SPOT.TinyCore.dll

The program ‘[8] Micro Framework application: Managed’ has exited with code 0 (0x0).


#5

Can you please start new project and only use display. Let us know if all goes well.

We are still looking into wifi issues and will have more info soon.


#6

I got the same exception when I “connected” the touch part of the panel to the main board in Program.gadgeteer.
If I added a touchdown handler in WPFWindow, I don’t get the exception (and get a touch down event).

So - some issue with Gadgeteer not setting up the touchdown event handler?


#7

Can you give me steps so I can reproduce this on my end please?


#8

In my case, very simple - create new project, connect T35 to mainboard (both Program.gadgeteer and hardware) - all 4 sockets, run.

IIRC, in my ProgramStarted, I had a few lines of SimpleGraphics draw - I don’t think that’s pertinent.

In my case, as soon as ProgramStarted exits, I get that same exception.
I think that if that doesn’t happen immediately, touching the screen would provide the same stimulus.

As a note, on mine, if I add WPF TouchDown and TouchMove event handlers, I do NOT get the exception, but I do an IMMEDIATE TouchDown, followed by a rapid, unchanging stream of TouchMove events (all at 0,0).


#9

I will do exact that but to be 100% sure, please show the code with problem.


#10

I am running a small program. The code is included.

The program runs but then throws this exception:

Using mainboard GHIElectronics-FEZSpider version 1.0
Program Started
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (3) ####
#### Message:
#### Microsoft.SPOT.Application::OnEvent [IP: 0098] ####
#### Microsoft.SPOT.EventSink::ProcessEvent [IP: 0023] ####
#### Microsoft.SPOT.EventSink::EventDispatchCallback [IP: 0014] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Microsoft.SPOT.TinyCore.dll
An unhandled exception of type ‘System.NullReferenceException’ occurred in Microsoft.SPOT.TinyCore.dll

I do not have the touch cable plugged in.
I have good power from the USB port in my laptop.
The string is written to the display properly.


//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by the Gadgeteer Designer.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using Gadgeteer;
using GTM = Gadgeteer.Modules;

namespace GadgeteerMinimal
{
    public partial class Program : Gadgeteer.Program
    {
        // GTM.Module defintions
		Gadgeteer.Modules.GHIElectronics.Display_T35 display;

		public static void Main()
        {
			//Important to initialize the Mainboard first
            Mainboard = new GHIElectronics.Gadgeteer.FEZSpider();			

            Program program = new Program();
			program.InitializeModules();
            program.ProgramStarted();
            program.Run(); // Starts Dispatcher
        }

        private void InitializeModules()
        {   
			// Initialize GTM.Modules and event handlers here.		
			display = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10);

        }
    }
}

using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;

using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace GadgeteerMinimal
{

    public partial class Program : Gadgeteer.Program
    {
        private Font _dispFont;

        void ProgramStarted()
        {

            _dispFont = Resources.GetFont(Resources.FontResources.small);

            Debug.Print("Program Started");
            display.DebugPrintEnabled = true;
            display.SimpleGraphics.Clear();
            display.SimpleGraphics.AutoRedraw = true;

            int yLoc = _dispFont.Height;

            display.SimpleGraphics.DisplayText("T35 Initialized...End of ProgramStarted()", _dispFont, GT.Color.White, 15, (uint)yLoc);


        }
    }
}




#11

Great, let us give it a try and get back to you tomorrow.


#12

I get this exception when I touch the display.


#13

[quote]I do not have the touch cable plugged in.
[/quote]

What happens if you plug the touch cable into the board?


#14

Is this working fine for you Mike?


#15

I plugged the touch cable in and the exception stopped. I guess a rule is: Always plug the touch cable in when using the T35.

I didn’t bring the WiFi module with me to work, but I will test it the moment I get home to see if one is affecting the other.

Re’s

Glenn


#16

[quote]Is this working fine for you Mike?
[/quote]

I guess the missing cable was the problem.


#17

I get the exact same problem :frowning: See picture.

Also with a nice “***** ASSERT *****” message on the display at program start.

In the error log, I can see that :

Recherche de la source pour 'c:\depot\current\CLIENT_V4_1\Framework\TinyCore\System\Application.cs'. Checksum: MD5 {1e 6a fb 3b 33 c3 98 d 3f 7e 7 87 1b 32 cd a3}
Le fichier 'c:\depot\current\CLIENT_V4_1\Framework\TinyCore\System\Application.cs' n'existe pas.
Recherche de 'c:\depot\current\CLIENT_V4_1\Framework\TinyCore\System\Application.cs' dans les documents de script...
Recherche de 'c:\depot\current\CLIENT_V4_1\Framework\TinyCore\System\Application.cs' dans les projets.
Le fichier n'a pas été trouvé dans un projet.
Recherche dans le répertoire 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Recherche dans le répertoire 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Recherche dans le répertoire 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Recherche dans le répertoire 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
Le débogueur demandera à l'utilisateur de trouver le fichier : c:\depot\current\CLIENT_V4_1\Framework\TinyCore\System\Application.cs.
L'utilisateur a appuyé sur Annuler dans la boîte de dialogue Rechercher la source. Les paramètres de fichiers de sources de débogage pour la solution active ont été modifiés afin que le débogueur ne demande pas à l'utilisateur de trouver le fichier c:\depot\current\CLIENT_V4_1\Framework\TinyCore\System\Application.cs.
Le débogueur n'a pas trouvé le fichier source 'c:\depot\current\CLIENT_V4_1\Framework\TinyCore\System\Application.cs'.

In the same window, the “Stack trace” shows :

Microsoft.SPOT.TinyCore.dll!Microsoft.SPOT.Application.OnEvent(Microsoft.SPOT.BaseEvent ev) Line 292 + 0xc1 bytes

If it can help.

Btw, this is very easy to reproduce : simply create a new Gadgeteer application with a Display_T35 and a USBClientDP, then run it on the Hydra (latest firmware, of course :wink: ).

To me, it looks like a null check is missing before firing the touch event. Nothing really hard, I hope.


#18

You replied to a 3 months old thread and what you see is not related to old thread :slight_smile:


#19

Damned ! :-[

Edit: I thought I’ve read something about it (and maybe a fix) but it looks like I was wrong or I can’t find it anymore.
sorry.