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:
Billy Kozak 2015-08-17 11:09:30 -06:00
parent 85555cf6cf
commit dfdb0a6487

View file

@ -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();
}
/*---------------------------------------------------------------------------*/