Hi all
I am using the TMX320F28075 device.
It seems to me that calculations are taking much more time than expected.
I tried to calculate sine function. As the device is having internal TMU sin function must be faster. Here is the compiler flag summary.
-v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --fp_mode=relaxed --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_16.9.0.LTS/include" --include_path="D:/projects/background study software/sin pwm/hw_files" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number
I have implemented TMU support.
I also suspect that the system clock may be slower but I am not able to measure it I have posted a separate thread for that. (https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/561091).
But not just suspecting system clock (because I have PWM module working correctly), what should be the reason for sine calculations to take that much of time.
The code I am evaluating is
GpioDataRegs.GPASET.bit.GPIO31 =1 ;//to profile code timing
sin_r = sin(0);
sin_y = sin(0);
sin_b = sin(0);
GpioDataRegs.GPACLEAR.bit.GPIO31 =1 ; //to profile code timing
This takes around 4.9uS.
Disassembly of this code
693 GpioDataRegs.GPASET.bit.GPIO31 =1 ;//to profile code timing
08216b: 761F01FC MOVW DP, #0x1fc
08216d: 1A038000 OR @0x3, #0x8000
733 sin_r = sin(0);
08216f: E590 ZERO R0
082170: 764830F4 LCR __relaxed_sin
082172: 761F0242 MOVW DP, #0x242
082174: E203001E MOV32 @0x1e, R0H
734 sin_y = sin(0);
082176: E590 ZERO R0
082177: 764830F4 LCR __relaxed_sin
082179: 761F0242 MOVW DP, #0x242
08217b: E203001C MOV32 @0x1c, R0H
735 sin_b = sin(0);
08217d: E590 ZERO R0
08217e: 764830F4 LCR __relaxed_sin
082180: 761F0242 MOVW DP, #0x242
082182: E2030020 MOV32 @0x20, R0H
745 GpioDataRegs.GPACLEAR.bit.GPIO31 =1 ; //to profile code timing
Can you please help me with this?