This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP-EXP430FR2311: problem with interrupt program

Genius 9880 points
Part Number: MSP-EXP430FR2311
Other Parts Discussed in Thread: MSP430FR2311

Hi Team,

Customer is having a problem with interrupt program, below is the details.

" i use timer interrupt B0 to count and the count value is updated in the loop

I using KIT MSP430FR2311, CCS Code Composer Studio

Version: 10.3.1.00003"

Thank you in advance.

Regards,
Maynard

  • Variables have to be typed as volatile. So on line 5, declare the variable counter as volatile.

    volatile unsigned char counter = 0;

    Furthermore, there are other problems in the program. It looks like you want a timer overflow to blink an LED, but the logic is a little wrong.

    Notice that the while() statement on line 26 is never reached because an earlier instruction has put the microcontroller in low powered mode 0, not 3. But the timer should still be able to operate in mode 0. Place the LED toggling instruction inside of the ISR and delete the while() statement.

**Attention** This is a public forum