[riot-notifications] [RIOT-OS/RIOT] cpu/nrf5x: implement wdt peripheral driver (#11556)

benpicco notifications at github.com
Tue Sep 17 15:51:29 CEST 2019


benpicco commented on this pull request.



> @@ -87,7 +87,7 @@ void wdt_setup_reboot(uint32_t min_time, uint32_t max_time)
     NRF_WDT->CONFIG |= (NRF_WDT_HALT_MODE << WDT_CONFIG_HALT_Pos);
 
     /* timeout (s) = (CRV + 1) / 32768 */
-    uint32_t crv = (uint32_t)(max_time * 32.768) - 1;
+    uint32_t crv = (uint32_t)((max_time << 15) / 1000) - 1;

I'm not in office right now and don't have any Nordic devices with me - will test again next week.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11556#discussion_r325178397
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190917/57cd3bf2/attachment.htm>


More information about the notifications mailing list