Other Parts Discussed in Thread: MSP430F5529, MSP-EXP430F5529LP
Hi everyone,
I am using the MSP430F5529 launchpad.
So I was playing a bit with the watchdog.
I was trying the lab4b from the workshop and was running into some weird timings.
So I loaded the example wdt_a_ex3_watchdogACLK and I was expecting the LED to toggle with 1s interval. It doesn't. It's about 3-4 seconds.
It's weird. Can anyone explain what could be going on? Can it be a previous configuration? I don't remember setting the ACLK with a /4 divider and I also did a power cycle.
Here is the example so you don't need to check it out.
#include "driverlib.h"
void main(void)
{
//Watchdog mode -> reset after expired time; WDT is clocked by ACLK
//Set Watchdog Timer timeout 1s - SET BREAKPOINT HERE
WDT_A_watchdogTimerInit(WDT_A_BASE,
WDT_A_CLOCKSOURCE_ACLK,
WDT_A_CLOCKDIVIDER_32K);
WDT_A_start(WDT_A_BASE);
//Set P1.0 to output direction
GPIO_setAsOutputPin(
GPIO_PORT_P1,
GPIO_PIN0
);
//Toggle P1.0
GPIO_toggleOutputOnPin(
GPIO_PORT_P1,
GPIO_PIN0
);
//Enter LPM3
__bis_SR_register(LPM3_bits + GIE);
//For debugger
__no_operation();
}