cc26xx - fixed WDT reloading
According to the TRM, the WDT does not produce a reset until it expires twice. After expiring the WDT will set the INT flag if it is unset, and reset the MCU if INT is already set. Before this patch, watchdog_periodic() only un-sets the INT flag. This means that the behaviour of watchdog_periodic is underministic in that the value of the countdown timer will be different depending on when the function was called. This patch fixes this behaviour by also reloading the timout value.
This commit is contained in:
parent
85555cf6cf
commit
dfdb0a6487
1 changed files with 1 additions and 0 deletions
|
@ -79,6 +79,7 @@ watchdog_start(void)
|
|||
void
|
||||
watchdog_periodic(void)
|
||||
{
|
||||
ti_lib_watchdog_reload_set(CONTIKI_WATCHDOG_TIMER_TOP);
|
||||
ti_lib_watchdog_int_clear();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in a new issue