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

Alexandre Abadie notifications at github.com
Fri Sep 13 17:50:10 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;

Doesn't work if I change that.

-- 
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_r324256586
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190913/5cfc8839/attachment.htm>


More information about the notifications mailing list