TinyCLR watchdog


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.

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.


Good example you can find here (stm32f407vgt6 stm32f4 discovery)

Kod Filemon: Watchdog IWDG w TinyCLR OS

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

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!

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.

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.

1 Like

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

1 Like


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
Kod Filemon: Watchdog IWDG w TinyCLR OS


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

static void watchdogReset()
while (true)


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.

1 Like