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/MSP430FR2311: Build configuration (Debug/ Release) affects I2C read/ write

Part Number: MSP430FR2311

Tool/software: TI C/C++ Compiler

I have a custom PCB built using MSP430FR2311, LIS3DH and, LTR303. I'm able to read/ write to the registers of LIS3DH and LTR303 and get the necessary data, when I build the code in 'Debug' mode with Optimization level set to '3' and Speed vs Size trade-off set to '3'. But, when the build configuration is set to 'Release' mode, I2C doesn't read anything from the registers of LIS3Dh and LTR303. Is there anything that needs to be done specifically for Release mode?

  • Hello Sanjay,

    This could be due to some settings you have in your release configuration which is causing some timing issue. Please note that the release configuration will not use the same optimization settings as debug unless you specify this. Are your optimizations set the same for the release configuration? When setting the optimization, be sure you also check which configuration you are applying these to. This is selectable at the top of the optimization window.

    You could also try copying the configuration you have for debug into a new configuration you use for release. To do this, right click on your project, select build configurations-> Manage. Add a new configuration, name it, and select "copy settings from" debug configuration. This will create a new configuration where you can make changes as needed as well.

**Attention** This is a public forum