Optimization - Error

I am using a global variable called i2c_process_wait_delay. This variable is used in a while loop condition, and at that time, the value of the variable is zero (0). However, the program pauses at the while loop condition, even though I set the optimization level to 'NO'. More details PFA..

Thanks in Advance.

Parents
  • Without the code and assembly listing, it is quite difficult to guess what is happening.

    Is the global var declared as volatile?  How is it being modified outside of this routine's context?

    Can you share more info, perhaps the project or at least the source code for this routine, and the corresponding assembly listing generated by the compiler?

Reply
  • Without the code and assembly listing, it is quite difficult to guess what is happening.

    Is the global var declared as volatile?  How is it being modified outside of this routine's context?

    Can you share more info, perhaps the project or at least the source code for this routine, and the corresponding assembly listing generated by the compiler?

Children
No Data