Main Site Documentation

TinyCLR watchdog


#1

Hi,

how do I use watchdog with tinyclr and g30?
ive managed to finally get tinyclr os to work on g30th, my 1st requirement forward is watchdog.


#2

We haven’t added the watchdog class yet but you may be able to get it working using the Marshal class to write the registers and a thread to periodically reset the timer.


#3

@Darko

Good example you can find here (stm32f407vgt6 stm32f4 discovery)

http://kodfilemon.blogspot.com/2017/07/watchdog-iwdg-w-tinyclr-os.html?m=1


#4

Ok, that’s a stop issue for me. When do you think it will be available?


#5

can hardly be a stop issue - it’s still pre-release software so you need to temper your “requirement” based on the status of the software!


#6

Its a stop issue because the G30 watchdog did not function properly before in the .NET micro framework bits.
So I was hoping I can use this as early as now. All of my devices are unattended so a watchdog is no1 priority. This is why I need an approximate timeframe. Problem is I’m a software developer more so then a hardware developer so messing with MCU registers is not my thing. I was really hoping I could continue to use this environment, but if a watchdog is not a priority, if this is only intended as a learning tool for education where students can just unplug the device when it fails, it seems I will have to switch to something else more tailored to actual real world usage.


#7

TinyCLR is not in release and should not be used in a product even if it had all features you need. But, we are working on it around the clock and to suggestions and list of needs are very welcome.

We have released a roadmap recently with the current plan.


#8

Yes I’ve read it, and watchdog is not on the list.
So my suggestion, please add watchdog to 1.0 release.
Thanks.


#9

Hi,

just an update, ive managed to get the upper code to work, im pretty sure its working.

also want to say that I like the new “almost” complete bits, especially the TinyCLR config and TCAs
im beginning to switch all my G30’s to TinyCLR

for reference:
Page 415 - Independent watchdog (IWDG)
RM0368 Reference manual - STM32F401xB/C and STM32F401xD/E advanced ARM®-based 32-bit MCUs
https://www.st.com/resource/en/reference_manual/dm00096844.pdf
http://kodfilemon.blogspot.com/2017/07/watchdog-iwdg-w-tinyclr-os.html

usage:

static void Main()
{
Watchdog.Start(new TimeSpan(0, 0, 30));
watchdogResetThread.Start();
}

static void watchdogReset()
{
while (true)
{
Thread.Sleep(5000);
Watchdog.Reset();
}
}


#10

Glad to hear you are switching to TinyCLR.

Adding watchdog is very easy for us but the focus now is on ironing issues and bugs. Next release should be very stable.