Creating a Windowing Watchdog driver for the F1xx

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

Moderators: RoccoMarco, barthess

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

Postby gclarkii » Fri Aug 03, 2018 4:46 am

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: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Creating a Windowing Watchdog driver for the F1xx

Postby Giovanni » Fri Aug 03, 2018 7:41 am

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

Postby gclarkii » Fri Aug 03, 2018 12:06 pm

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: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

Re: Creating a Windowing Watchdog driver for the F1xx

Postby Tabulous » Mon Aug 06, 2018 9:55 am

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.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 28 guests