Other Parts Discussed in Thread: RM46L852
Hello,
I am getting started with CMSIS DSP lib.
I have recompiled ti_math_Cortex_R4_lspf.lib.lib using Hercules Safety MCU Cortex-R4 CMSIS DSP Library (v1.0.0) with CCSv5.3 and added to a new project to test arm_sin_cos_example_f32.c on a RM46L852.
It works as attended (use of arm_cos_f32, arm_sin_f32, arm_mult_f32 and arm_add_f32 functions).
I tried to make the same example using q31_t format and lib functions instead of f32.
I have a strange behaviour while using arm_cos_q31 and arm_sin_q31 functions. arm_mult_q31 seems to work.
I have converted const float32_t testInput_f32[MAX_BLOCKSIZE] using angle values in radians to const q31_t testInput_q31[MAX_BLOCKSIZE] using normalized angle [0-1].
I have hereto attached my function, screenshot of calculation result in CCS in Q31 format and excel conversion sheet (Test_arm_sin_cos_example_q31.zip).
I have no explanation to the cos and sin result.
Any idea ?