Other Parts Discussed in Thread: MSP430FG4618
Dear TI Community:
I am new to the MSP430 and am currently using the MSP430FG4618/F2013 experimenter’s board for a project. I am using the Capacitive Toucphad demo as a baseline for a few modifications (contained in the zip folder slac129a).
I am trying to modify the FG4618 host_comms.c code so that the LCD will timeout after 15 sec and go back to sleep.
I have looked at a few examples of how to setup TimerA. Here is a snippet of FG4618 host_comms.c where I made modifications to try to accomplish this:
void main(void)
{
WDTCTL = WDTPW | WDTHOLD; /* Stop watchdog */
configure_uart_usci0();
configure_i2c_usci0();
init_lcd();
_EINT();
for (;;)
{
#if 1
/* Normal operation */
LPM0;
//Start timer: ACLK, divide by 8, continuous mode, clear
TACTL = TASSEL_1 | ID_3 | MC_2 | TACLR; //Set timer for 16 sec period (close enough to 15 sec)
LCDdec(xxx, 3);
#else
/* Checking out the host interface */
UCA0TXBUF = xxx++;
{
long int i;
for (i = 0; i < 10000; i++)
_NOP();
}
#endif
}
}
#pragma vector = TIMERA0_VECTOR
__interrupt void timera0_interrupt(void)
{
LPM0_EXIT;
}
·
· However I am having trouble testing and debugging what I have written. I put a breakpoint at start of the interrupt, but never get there. I must be doing something fundamentally wrong.
CoCould you please point me to some good examples that parallel what I’m trying to accomplish? How should I approach testing/debugging an interrupt? Any suggestions or tips are much appreciated. Thank you.
t