Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE
Hi there,
I'm facing a problem in which the CPU is skipping instructions with no evident cause. It has happened already in the following two ocasions:
1. When writing to a float32_t array by calling the function provided by TI static inline void SPLL_1PH_SOGI_reset(SPLL_1PH_SOGI *spll_obj)
In this case, the function has the following three lines:
spll_obj->u[0]=(float32_t)(0.0);
spll_obj->u[1]=(float32_t)(0.0);
spll_obj->u[2]=(float32_t)(0.0);
After the function is called from my ISR, I can see in the Expressions window that u[0] = 0, but u[1] and u[2] are different than zero.
2. When writing zero to the EPwm6 CMPA register by using TI's drivelib function EPWM_setCounterCompareValue(uint32_t base, EPWM_CounterCompareModule compModule, uint16_t compCount)
After the function is called, I check in the Registers window the value of EPwm6 CMPA and the value of the register is different than zero.
In both cases, if I place a breakpoint right before the function call, then the instructions ARE NOT skipped, and the behaviour is as expected. On the contrary, if I don't place such breakpoint, the instruccions are skipped by the processor.
Could you please help me resolve this issue?
Many thanks,
Lucas
I'm copying the compiler flags below for your reference. I've deleted some details for the include paths for confidentiality reasons.
-v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O1 --opt_for_speed=5 --fp_mode=relaxed --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28003x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28003x/headers/include" --include_path=".../device" --include_path=".../device/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f28003x/driverlib" --include_path=".../libraries/SM" --include_path=".../libraries/CLAmath" --include_path=".../libraries/DCL" --include_path=".../libraries/POW" --include_path=".../libraries/SFO" --include_path=".../libraries/SPLL" --include_path=".../libraries/Utilities/rampgen" --include_path="C:/ti/ccs1110/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --define=_TI_EABI_ --define=_DEBUG --define=CLA_DEBUG=1 --define=F28x_DEVICE --define=CPU1 --define=LARGE_MODEL --define=_FLASH --define=BUCK_CONTROL_RUNNING_ON_CPU -g --float_operations_allowed=32 --diag_suppress=10063 --diag_suppress=173 --diag_warning=225 --diag_wrap=off --display_error_number --quiet --abi=eabi --cla_signed_compare_workaround=on -k --asm_listing --include_path=".../RELEASE/syscfg"