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

Alexandre Abadie notifications at github.com
Tue Sep 17 14:44:25 CEST 2019


aabadie 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;

ping @benpicco 

-- 
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_r325144531
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190917/2c18b450/attachment.htm>


More information about the notifications mailing list