[riot-notifications] [RIOT-OS/RIOT] drivers/include: add header definition for wdt (#11527)

Francisco notifications at github.com
Tue May 21 10:45:54 CEST 2019

> Well, that time is fixed on a couple of architectures I looked at. 

Not for SAM21, its configurable although in WINDOWED mode it equals to the lower bound. But this makes the api confusing (to me at least), since in normal mode min_time is actually cb_time and in windowed they are equal, having them separate makes it easier to handle. 

For EFM32  EWI can occur at 25%, 50%, or 75% of the timeout.

> Maybe rather go with a define here?

Also if it was a define how do you handle it? In the case of STM32 its a fix counter value, but doesn't translate into `ms` it depends on the prescaler and reload value. In NRF52 its just a couple of clock cycles before reboot. So it can't actually be a define, nor in `ms` units at least. The defines would need to have different units per platform, which makes it a little messy to me. What do you think?
> We should make sure that applications time the warning callback so that the warning is issued at the watchdog timeout, and the reboot is ```WDT_WARNING_PERIOD``` after. Or the other way around. Just consistent. :)

@benpicco can correct me here, but this would make the callback unusable in windowed mode. Sould we the define  windowed and callback as features, that way they can conflict each other.

> When a callback is set, what happens if a minimum is set and then the wdt is kicked too early?

Not sure for all platforms. But for STM32 the callback isn't executed, there is an immediate reboot.

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/20190521/5c41e39c/attachment.html>

More information about the notifications mailing list