Hi Team,
Good day! Could you help to solve and reproduce our customer's concern as shown below.
I'm trying to get some software up and running using CSS with the MSP430FR5994 launchpad. i'm not certain i have the correct part number selected for this support request, but it's the 80 pin "PN" mcu.
I've attached a basic sketch. all you need to reproduce what I have previously done below.
1. grab a stock-standard MSP430FR5994 Launchpad straight out of the box
2. fire up CCS
3.create a new project using "MSP430FR5994" with the GNU toolchain and paste the code into main.c
4. create another new project using "MSP430FR5994" with the TI toolchain and paste the exact same code into main.c
5.run each of them in turn and see the GNU one goes off into lala land and the TI one runs happy as larry, ie: blinking steady at 1hz.
- then try and step through each of them in debug and you'll see the GNU project probably locks at the "TA0CCR0 += 10000;" line in the ISR (but could go anywhere) and the TI project, again, steps through happy as larry, blinking on or off as it steps past the port toggle.
ok, i hope that's enough information. if both work for you it's possible i have something wrong in my CCS config - if so please let me know what i can do to provide you with further information. actually, i'm so invested, i think i'll keep tinkering with the GNU project and see if i can nail a wrong setting somewhere.
regards, tristen
ps: note there's stuff i added/commented out in an attempt to try and understand what was wrong. this code sample as it stands runs in active mode and needs no modification to demonstrate the issue.
#include <msp430.h> int g_counter = 0; int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop WDT // // port initialisation // P1OUT = 0; P1DIR = 0xFF; P2OUT = 0; P2DIR = 0xFF; P3OUT = 0; P3DIR = 0xFF; P4OUT = 0; P4DIR = 0xFF; P5OUT = 0; P5DIR = 0xFF; P6OUT = 0; P6DIR = 0xFF; P7OUT = 0; P7DIR = 0xFF; P8DIR = 0xFF; P8OUT = 0; PJOUT = 0; PJDIR = 0xFFFF; // Disable the GPIO power-on default high-impedance mode to activate // previously configured port settings PM5CTL0 &= ~LOCKLPM5; // Configure GPIO P1DIR |= BIT0; P1OUT |= BIT0; CSCTL0_H = CSKEY_H; // Unlock CS registers CSCTL1 = DCOFSEL_6; // Set DCO = 8MHz CSCTL2 = SELA__VLOCLK | SELS__DCOCLK | SELM__DCOCLK; // Set ACLK = VLO, MCLK = DCO CSCTL3 = DIVA__1 | DIVS__8 | DIVM__8; // Set all dividers CSCTL0_H = 0; __delay_cycles(1000); // for (int i = 0; i <= 10; i++) // { // P1OUT ^= BIT0; // // __delay_cycles(32000000); // // P1OUT ^= BIT0; // // __delay_cycles(8000000); // // P1OUT ^= BIT0; // } TA0CCTL0 = CCIE; // TACCR0 interrupt enabled TA0CCR0 = 10000; TA0CTL = TASSEL__ACLK | MC__CONTINOUS; // SMCLK, continuous mode __enable_interrupt(); while (1) { // LPM3; __no_operation(); // For debugger // P1OUT ^= BIT0; } // __bis_SR_register(LPM0_bits | GIE); // Enter LPM0 w/ interrupt // __no_operation(); // For debugger } // Timer0_A0 interrupt service routine #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector = TIMER0_A0_VECTOR __interrupt void Timer0_A0_ISR (void) #elif defined(__GNUC__) void __attribute__ ((interrupt(TIMER0_A0_VECTOR))) Timer0_A0_ISR (void) #else #error Compiler not supported! #endif { TA0CCR0 += 10000; // Add Offset to TA0CCR0 // __no_operation(); // For debugger P1OUT ^= BIT0; g_counter++; //__bic_SR_register_on_exit(LPM3_bits); }
this is the "GNU Compiler" summary of flags set: -mmcu=msp430fr5994 -mhwmult=f5series -I"C:/ti/ccs1040/ccs/ccs_base/msp430/include_gcc" -I"C:/Users/pc-user/workspace_v10/board" -I"C:/ti/ccs1040/ccs/tools/compiler/msp430-gcc-9.3.1.11_win64/msp430-elf/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -mlarge -mcode-region=none -mdata-region=lower
and this is the "GNU Linker" summary of flags set: -mhwmult=f5series -Og -g -gdwarf-3 -gstrict-dwarf -Wall -mcode-region=none -mlarge -Wl,-Map,"board.map" -Wl,--gc-sections -L"C:/ti/ccs1040/ccs/ccs_base/msp430/include_gcc" -mmcu=msp430fr5994
Thank you for your support.
Best regards,
Jonathan