Creating a Windowing Watchdog driver for the F1xx

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
gclarkii
Posts: 24
Joined: Wed Mar 01, 2017 7:38 pm
Has thanked: 1 time
Been thanked: 2 times

Creating a Windowing Watchdog driver for the F1xx

Post by gclarkii »

Hi,

Would there be any interest in the usage of the Windowing Watchdog on the F1xx? I was looking at the manual (RM0008) when I found out that all of the chips have not only the IWDG, they also have a WWDG.

I'll admit that off the top my head I don't have a clue on how to implement the thing, even with the manual in front of me.
Time to start playing...

GB
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Creating a Windowing Watchdog driver for the F1xx

Post by Giovanni »

Hi,

Ideally it should be another watchdog instance in the current driver. Not sure about the required changes.

Giovanni
gclarkii
Posts: 24
Joined: Wed Mar 01, 2017 7:38 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Creating a Windowing Watchdog driver for the F1xx

Post by gclarkii »

Greetings,
I'm not really sure either, but I think they are far enough apart to be their own driver. Unlike the windowing WDG in the IWDG driver, this thing has it's own set of registers, it uses a totally different clock source, it can generate a interrupt right be before it triggers and it has to be reset within window or else. I would hate to try and create a single interface class for that monster...
Right now I've got it as WWDGv1 under Community for STM32.

Oh, one nice thing about the WWDG, if I clear T6 and do nothing else it will reset the MCU. I've already created a class to reset the MCU if I don't/can't handle an exception. It's much simpler than my earlier one. I think that is better than either looping wasting juice, or just halting.

GB
Tabulous
Posts: 518
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 18 times

Re: Creating a Windowing Watchdog driver for the F1xx

Post by Tabulous »

WWDG i use as this is a better solution of units with power management i.e. that go to sleep......

I also added to mine the ability to monitor different threads in the system. Any thread that should be monitored registers with the watchdog.

After that they have to sign in regularly within a period, ive got 60seconds. Every 60 seconds the WWDG driver checks to ensure all registered threads have signed in, if any have not the WWDG stops updating and a reset is generated.
Post Reply