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.

CCS/MSP430F5438A: Due to Optimization level code is unbehaving

Part Number: MSP430F5438A


Tool/software: Code Composer Studio

Hai,

I am using MSP430F5438A controller. My application build on CCS 7. Based on the optimization level code behaving differently. 

Source Code build with the optimization level 4 - It's not working fine. Some part of the function worked differently than expected. In my case problem happened in communication part. 

When the source code build with the optimization level 3 - It's working fine.

I don't know how to identify this kind of issue.

It would be helpful if you give the solution to this.

  • Hello,
    changing the optimization levels mainly impacts the code execution time for certain functions. This means when comparing respective code, the timings are most probably different.
    So probably the issues you are facing are related to timing issues, or collisions, means e.g. certain tasks do no longer have sufficient time to execute, or get interrupted by interrupts.
    For me this kind of issues would be indicators, that some timings in my application are at the edge. Also your statement on the problem becoming visible with communication points into the same direction.

    Best regards
    Peter
  • Hello,

    It's not related to timing issue. Actually i am getting response from device which i connected to my application but response is not hitting in my code(in interrupt routine)

    In my case if i press some key input then the response is hitting. Key input scanning and communication are called in same interrupt routine. I am not getting cleared 

    about this. How to find out the root cause to this problem..

    I have one more doubt .. My current code is not working fine with optimization level 4 if i revert back to optimization level 3 will it cause some other problem..

  • Hello,
    while I am not convinced, that your problem is not related to timing issues, it is basically impossible for us to give you further hints on how to debug without a more detailed information on the code and the system you have implemented.
    So if you'd like to get further support from us, please provide further details. Many thanks in advance.

    Best regards
    Peter