[riot-notifications] [RIOT-OS/RIOT] cpu/stm32_common: add watchdog for stm32 (#11252)

Kaspar Schleiser notifications at github.com
Fri Mar 29 12:31:08 CET 2019

wdg_init(uint32_t time)

If we change that to ```wdg_init(uint32_t min_time, uint32_t max_time)```, the API doesn't need to change when window support gets added to the implementation.


In the header that is called "wdg_reset()". That feels ambiguous. Does it reset the wdg device or does it reset the wdg counter? Maybe change to "wdg_kick()" or "wdg_trigger()"?

uint32_t wdg_min_timeout(void)
uint32_t wdg_max_timeout(void)

As the API as is doesn't support multiple wdg devices, can we get away with simple defines? The values should be known at compile time.

Other than that, two more questions:
- can we say something about the time base used for the watchdog? Is it always us, or is it ticks?
- what are the intended semantics for wdg_init() and wdg_enable()? Does init implicitly enable? I would suggest it shouldn't ...

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190329/798de1a7/attachment.html>

More information about the notifications mailing list