CORDIC for phase(atan2) not much faster than math.h atan2
I have two functions to calculate the phase via DFT. In both functions, real and imaginary parts are first calculated, and then the phase is determined using different methods.
The first function employs the standard atan2f function from the math.h to calculate the phase. The execution time for this function is approximately 126 us.
The second function utilizes the CORDIC phase function, which essentially performs the same task as atan2. Surprisingly, the execution time for this CORDIC-based approach is not much faster, taking around 121 microseconds.
This result raises questions because, according to the reference manual, the CORDIC calculation should take approximately 10 clock cycles, equivalent to around 50 nanoseconds on my MCU. I am utilizing HAL_CORDIC_CalculateZO() to obtain the results.
Is this expected and does anyone have an idea how to get the specified calculation time. I would be pleased with 10us?
