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)?
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
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).
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?
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).
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);
}
}
}
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 ).
To me, it looks like a null check is missing before firing the touch event. Nothing really hard, I hope.