Пт апр 21, 2017 08:13:43
Пт апр 21, 2017 08:59:47
Пт апр 21, 2017 09:08:22
pyzhman писал(а):Как бэ, если в цикле или в прерываниях (если они есть) вачдог сбрасывается, то почему бы и не крутить?
Пт апр 21, 2017 09:51:58
Делал всё по даташиту
C Code Example
- Код:
void WDT_Prescaler_Change(void)
{
__disable_interrupt();
__watchdog_reset();
/* Start timed sequence */
WDTCSR |= (1<<WDCE) | (1<<WDE);
/* Set new prescaler(time-out) value = 64K cycles (~0.5 s) */
WDTCSR = (1<<WDE) | (1<<WDP2) | (1<<WDP0);
__enable_interrupt();
}
Note: The Watchdog Timer should be reset before any change of the WDTCSR.WDP
bits, since a change in the WDTCSR.WDP bits can result in a time-out when switching to
a shorter time-out period.
Пт апр 21, 2017 10:03:42
Сб апр 22, 2017 07:41:10