I have one project (two different versions) and both are compiled with the same compiler (22.6.0.0.LTS) and in both projects, the ADC interrupt, I have a line of code that generates different results between the two projects. This problem is not isolated to this line of code, we just chose this line of code as an example of the problem. The line of code is as follows:
mult = 1 - (abs(gMotorVars.Speed_Hz) / (gUserParams.motor_baseFreq/2));
// mult is a local variable and the location of gMotorVars and gUserParams and the mainISR are exactly the same between the two versions.
We have compared the compiler/linker settings and have even looked at the generated assembler (which is different between the two versions). We used the clock cycles evaluation from the breakpoint count event and the clock cycles were 313 versus 1378. We also used a GPIO and oscilloscope to evaluate the execution time and we were able to see the execution time was 4 times the execution time between the two projects.
We are using Code Composer 11.2.0.00007.
We are not sure where to look next to figure out why the difference in versions.
We would appreciate your help and thanks for your time.
Sandy