Hi.
I'm trying to figure why I cannot make my device work properly, but there's something I quite don't understand.
While testing some sample code from the slac123d package, actually the msp430x22x4_wdt_01.c and msp430x22x4_wdt_02.c example files, while the first one runs without problems, the second one doesn't run at all
the code from msp430x22x4_wdt_01.c is:
#include "msp430x22x4.h"
void main(void)
{
WDTCTL = WDT_MDLY_32; // Set Watchdog interval to ~27ms
IE1 |= WDTIE; // Enable WDT interrupt
P1DIR |= 0x01; // Set P1.0 to output direction
__bis_SR_register(LPM0_bits + GIE); // Enter LPM0 w/ interrupt
}
// Watchdog Timer interrupt service routine
#pragma vector=WDT_VECTOR
__interrupt void watchdog_timer(void)
{
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
}
the code from msp430x22x4_wdt_02.c is:
#include "msp430x22x4.h"
void main(void)
{
WDTCTL = WDT_ADLY_250; // WDT 250ms, ACLK, interval timer
IE1 |= WDTIE; // Enable WDT interrupt
P1DIR |= 0x01; // Set P1.0 to output direction
__bis_SR_register(LPM3_bits + GIE); // Enter LPM3 w/interrupt
}
// Watchdog Timer interrupt service routine
#pragma vector = WDT_VECTOR
__interrupt void watchdog_timer(void)
{
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
}
since both the boards from the package suffer the same behaviour, and since the sample code is supposed to be correct, is the usb key broken or I'm missing something?
Thanks.