-
-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watchdog timer overflow error for big timeout #1523
Comments
You can define the type also in wdt_enable call. |
Yes, that is the problem, as wdt_enable expands to: |
I hope that will help. |
In file hal/architecture/NRF5/drivers/wdt.h line 80:
NRF_WDT->CRV = (32768*timeout)/1000; \
Setting large timeout value generating overflow error.
If changed to
NRF_WDT->CRV = (uint32_t)(32.768*timeout); \
there is no overflow error anymore. Not sure if (uint32_t) cast is needed.
The text was updated successfully, but these errors were encountered: