Automatic Recovery
#1
Posted 21 November 2010 - 06:48 AM
#2
Posted 21 November 2010 - 09:58 AM
#3
Posted 21 November 2010 - 03:08 PM
#4
Posted 21 November 2010 - 05:17 PM
#5
Posted 21 November 2010 - 05:53 PM
#6
Posted 21 November 2010 - 10:42 PM
I havent got my hands on DNMF yet...but cant you use a global try-catch and on error clean up all resources and restart all the methods ?? (I know you might have thought about it...)
So is there any hardware way to reset device? like raising reset(if any) pin to 1 ?
How exactly does one clean up resources in C#??? I can't fine any good way to destroy an object or deallocate memory.
#7
Posted 21 November 2010 - 11:01 PM
How exactly does one clean up resources in C#??? I can't fine any good way to destroy an object or deallocate memory.
It happens automatically. C# uses garbage collection to clean up resources when memory gets low.
If an object has a Dispose method, you can call it to mark it for cleanup. Also, Debug.GC(true) will clean up any free-able memory.
Chris
#8
Posted 13 November 2011 - 09:53 PM
It happens automatically. C# uses garbage collection to clean up resources when memory gets low.
If an object has a Dispose method, you can call it to mark it for cleanup. Also, Debug.GC(true) will clean up any free-able memory.
Chris
Does the netduino actually run the .net runtime and do things like garbage collection? That seems like a lot to fit on the mcu, I assumed it just boiled down the .net CIL to the board's mcu?
#9
Posted 13 November 2011 - 11:52 PM
The .NET is a full .NET IL interpreter. It includes a .NET runtime, garbage collection, threading, hardware abstraction, etc. It is a lot to fit on an MCU; it's pretty coolDoes the netduino actually run the .net runtime and do things like garbage collection? That seems like a lot to fit on the mcu, I assumed it just boiled down the .net CIL to the board's mcu?
The code that you're running on the Netduino is compact MSIL, interpreted at runtime by .NET MF.
Chris
#10
Posted 14 November 2011 - 12:35 AM
Hi cross6,
The .NET is a full .NET IL interpreter. It includes a .NET runtime, garbage collection, threading, hardware abstraction, etc. It is a lot to fit on an MCU; it's pretty cool
The code that you're running on the Netduino is compact MSIL, interpreted at runtime by .NET MF.
Chris
Very cool! Thanks.
#11
Posted 16 November 2011 - 07:34 AM
We could also add a Reset feature to a future firmware release. The function is already built into the firmware...we'd just have to create a wrapper for it. You could also create one and build it into your own custom firmware.
The firmware could also be tweaked to activate the hardware reset function in case an exception occurred. Lots of options.
Hi Chris,
Did you manage to include the Reset function within the firmware? if not, how can we tweak it to activate the reset without need to use a GPIO?
Can the firmware be tweaked to just reset the TCP/IP stack?
#12
Posted 16 November 2011 - 12:41 PM
Have you tried PowerState.RebootDevice?Did you manage to include the Reset function within the firmware? if not, how can we tweak it to activate the reset without need to use a GPIO?
Can the firmware be tweaked to just reset the TCP/IP stack?
http://msdn.microsof...y/ee435764.aspx
The firmware could be tweaked to just reset the TCP/IP stack and the Ethernet PHY, but that might be quite a bit of work.
Chris
#13
Posted 16 November 2011 - 03:17 PM
Hi Dixon,
Have you tried PowerState.RebootDevice?
http://msdn.microsof...y/ee435764.aspx
The firmware could be tweaked to just reset the TCP/IP stack and the Ethernet PHY, but that might be quite a bit of work.
Chris
Actually, resetting the TCP/IP stack could be quite useful. Along with a watchdog timer and an RTC, but I digress...
-Valkyrie-MT
#14
Posted 16 November 2011 - 03:29 PM
A bit of info...we're working on an external RTC to plug into the Netduino. Still working out the details.Actually, resetting the TCP/IP stack could be quite useful. Along with a watchdog timer and an RTC, but I digress...
Chris
#15
Posted 28 January 2012 - 02:36 PM
Along with a watchdog timer and an RTC
-Valkyrie-MT
I use a GPS shield to set the system clock. I've got an object wrapped around the serial port listening to NMEA sentences and updating properties. The first time it sets the DateTime, it also sets the system clock. I don't bother with anything but UTC on a logger; localisation to a timezone is a problem for UI code running on a full scale workstation.
I'm a bit surprised at the lack of a watchdog timer but it's not hard to do; you could knock up something with a MAX6814 to reset the Netduino and keep restarting it from a thread in your program. If the Netduino locks up it will fail to reset the watchdog, so the watchdog will reset the Netduino. I imagine Chris has something like this in mind for the RTC/watchdog he mentions.Of course if Chris does it, the heartbeat thread will probably be neatly hidden in the run-time so that we can all code away in blissful ignorance of occasional inexplicable lockups.
#16
Posted 28 January 2012 - 05:35 PM
The Netduino microcontroller has only one watchdog timer and that is used by the .NET MF runtime itself, so it is not available for user applications.I'm a bit surprised at the lack of a watchdog timer
#17
Posted 31 January 2012 - 01:48 PM
#18
Posted 10 April 2012 - 12:15 PM
#19
Posted 10 April 2012 - 12:45 PM
PowerState.RebootDevice(true);
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users