Hi all,
I'll show you a simple code. I use MSP430FR5969 Wolverine, MSP-FET430UIF as development kit and board MSP-TS430RGZ48C. This is the code; it was tested with latest versions of CCS and IAR.
#include<msp430.h>
void main()
{
int a=0;
P1DIR |= BIT0;
P1OUT=0;
WDTCTL = WDTPW | WDTHOLD;
while(1)
{
a++;
P1OUT^=BIT0;
__delay_cycles(20000);
}
}
This code works! I can see led blinking and 'a' increases at any step. But if I define 'a' before main as volatile int a=0 (global variable) the led is permanently off. Hence I can't reach main(). Do you know if MSP430FR59xx has problems with global variables?
Thank you.
Fabio