-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
watch dog timer causes the reboot on SAME70 board #16385
Comments
Not sure if this should be treated as a bug; there is an option to disable the watchdog with We could also select WDT_DISABLE_AT_BOOT in the board definition, if we want this to be the default behavior. @aurel32 do I understand this correctly? What's your take? |
@ioannisg Thanks for the replay. I would expect WDT can get pet even there is a while loop processing. |
@f7488405 I am reading the watch dog API
So it seems to me that it is the responsibility of the application developer to feed the watchdog periodically. Therefore, your eternal while look in the snipped you posted requires to have a watchdog feed function call. Do you agree? |
Hi, @ioannisg , Thanks for the reply. From user experience perspective, if the WDT is enabled by default and all users need to feed the WDT periodically in all applications, that will create a lot of problem and most of user will struggle the reboot issue because they are not aware of this detail. I would suggest to disable the WDT by default before we root cause the real issue. What do you think? Thanks. Best, Larry |
Describe the bug
By default, WDT is enabled on SAME70 board because of the following commit. After that, system reboots when doing a while loop processing.
commit 2e01e86
drivers: watchdog: wdt_sam: use the generic disable option
Use the generic option WDT_DISABLE_AT_BOOT instead of the SAM specific
one WDT_SAM_DISABLE_AT_BOOT (note the generic one has been introduced
after the SAM one).
This also have the consequence of changing the default value for yes to
no, fixing the watchdog tests.
To Reproduce
In the hello_world sample, run this code.
#include <zephyr.h>
#include <misc/printk.h>
void main(void)
{
int i = 0;
while(1){
printk("Iteration %d\n", i++);
}
}
Steps to reproduce the behavior:
Expected behavior
No reboot
Impact
System reboots randomly.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: