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.

Compiler/MSP430FR5969: incorrect execution when optimizer is enable on inline function in interrupt

Part Number: MSP430FR5969

Tool/software: TI C/C++ Compiler

When I compile w/ optimizer enabled, a variable passed to an inlined function from an ISR is incorrectly assumed to be 0. 

The issue occurs at line 175 in USCII2C.cpp:

else if(isWrInt)

    UCB0TXBUF = curCmd;

even if isWriInt == 1, the following line is not executed. If I turn off the optimizer, it works.

Code here: 

  • Your project builds with MSP430 GCC compiler version 4.6.3.  This is a relatively old compiler.  Is it practical for you to upgrade?  Please do that by using the Apps Center feature in Code Composer Studio.  I am not certain that upgrading will fix your specific problem, but I think your chances are good.

    Thanks and regards,

    -George