Hello to everybody,
As an experienced embedded engineer, I see two major issues with the Spider board: it does not always start up and I cannot get the watchdog reset timer to work.
This is the VB code I implemented:
Public Sub ProgramStarted()
' Initialize WatchDog
Watchdog.Behavior = WatchdogBehavior.HardReboot
Watchdog.Timeout = New System.TimeSpan(0, 0, 0, 10, 0)
Watchdog.Enabled = True
' Initialize display
Display.Clear()
Display.CursorHome()
Display.BacklightEnabled = True
' Write program info to display screen
DisplayMenu("CHANGE " & ProgramVersion)
' Setup inputs
BusSTAT = SPI1.CreateDigitalInput(Gadgeteer.Socket.Pin.Five, Gadgeteer.SocketInterfaces.GlitchFilterMode.On, Gadgeteer.SocketInterfaces.ResistorMode.PullDown)
PowerOn = Ctrl.CreateDigitalInput(Gadgeteer.Socket.Pin.Four, Gadgeteer.SocketInterfaces.GlitchFilterMode.On, Gadgeteer.SocketInterfaces.ResistorMode.PullDown)
' Setup outputs
BusACKN = SPI1.CreateDigitalOutput(Gadgeteer.Socket.Pin.Four, False)
BusDAT1 = SPI1.CreateDigitalOutput(Gadgeteer.Socket.Pin.Six, False)
BusCLK1 = SPI1.CreateDigitalOutput(Gadgeteer.Socket.Pin.Seven, True)
BusDAT2 = SPI1.CreateDigitalOutput(Gadgeteer.Socket.Pin.Eight, False)
BusCLK2 = SPI1.CreateDigitalOutput(Gadgeteer.Socket.Pin.Nine, True)
BusDAT3 = SPI2.CreateDigitalOutput(Gadgeteer.Socket.Pin.Four, False)
BusCLK3 = SPI2.CreateDigitalOutput(Gadgeteer.Socket.Pin.Five, True)
BusDAT4 = SPI2.CreateDigitalOutput(Gadgeteer.Socket.Pin.Six, False)
BusCLK4 = SPI2.CreateDigitalOutput(Gadgeteer.Socket.Pin.Seven, True)
BusDAT5 = SPI2.CreateDigitalOutput(Gadgeteer.Socket.Pin.Eight, False)
BusCLK5 = SPI2.CreateDigitalOutput(Gadgeteer.Socket.Pin.Nine, True)
BusDAT6 = SPI3.CreateDigitalOutput(Gadgeteer.Socket.Pin.Four, False)
BusCLK6 = SPI3.CreateDigitalOutput(Gadgeteer.Socket.Pin.Five, True)
BusDAT7 = SPI3.CreateDigitalOutput(Gadgeteer.Socket.Pin.Six, False)
BusCLK7 = SPI3.CreateDigitalOutput(Gadgeteer.Socket.Pin.Seven, True)
BusDAT8 = SPI3.CreateDigitalOutput(Gadgeteer.Socket.Pin.Eight, False)
BusCLK8 = SPI3.CreateDigitalOutput(Gadgeteer.Socket.Pin.Nine, True)
' Clear PROCES lists
ProcesList.Clear()
' Prepare timer & clock variables; setup main loop interval and fire it
' This is done, as there is no main sub routine
' and keeping this sub active will cause an exception
ExecutionBasis = New System.TimeSpan(0, 0, 0, 0, TimerInterval)
ExecutionClock = Hardware.Utility.GetMachineTime.Add(ExecutionBasis)
MainLoop.Behavior = Gadgeteer.Timer.BehaviorType.RunOnce
MainLoop.Start()
End Sub
[em]Power on issue:[/em] the Spider board is integrated in an embedded building setup where it controls lights. Each morning, when employees arrive at the building, the main light switch is toggled and the Spider board is powered on automatically. It should then start to control other lights within the building. Unfortunately, every morning the board hangs (I guess right at the spot where the IO ports are declared, however this is impossible to debug). When I power cycle the board manually, it boots just fine. It seems as if there is an EMI problem and the Spider is sensitive to this.
[em]Watchdog issue:[/em] in order to solve the first problem, I thought of implementing a watchdog reset timer, see above code. However, this does not work; there is no watchdog reset! Also I could not find the “resetcounter” API. Actually, there is very limited documentation about the watchdog, and this is not for VB.
Does anybody have a similar issue and/or a possible solution?
How to get the Spider watchdog reset timer to work (in hardware)?
With the lack of a proper watchdog setup, the issues with booting and other issues I’ve had in the past with the Gadgeteer hardware, I’m seriously considering changing to another - more robust - platform, which covers my needs. So, your help is very much appreciated.
Thanks in advance,
Aubert