cancel
Showing results for 
Search instead for 
Did you mean: 

CORDIC q1.31 to integer conversion

Skfir
Associate III

Hello everyone. I want to understand the CORDIC engine, using the nucleo-u575zi board. The guide says that the cordic uses data in q1.31 format. Could please someone explain how to convert results into an ordinary int value? And how to convert an int value into a q1.31 value for loading into the cordic?

1 REPLY 1
RomainR.
ST Employee

Hello @Skfir 

If you convert an integer to q1.31 number representation the values > 1 will overflow.

Fixed point number in q1.31 are represented as fractionnal 31 bit value and limit number -1 to 1 as integer part.

Maybe it seems better to perform conversion from float to q1.31 and vice-versa using ARM CMSIS DSP support functions:

https://www.keil.com/pack/doc/CMSIS/DSP/html/group__float__to__x.html

BR

Romain,

  

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.