ST STM32G4 Series Reference Manual page 433

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32G4 Series:
Table of Contents

Advertisement

RM0440
The primary result is the square root of x. RES1 must be multiplied by 2
correct value.
The secondary result is not used.
16.3.3
Fixed point representation
The CORDIC operates in fixed point signed integer format. Input and output values can be
either q1.31 or q1.15.
In q1.31 format, numbers are represented by one sign bit and 31 fractional bits (binary
decimal places). The numeric range is therefore -1 (0x80000000) to 1 - 2
In q1.15 format, the numeric range is 1 (0x8000) to 1 - 2
advantage that two input arguments can be packed into a single 32-bit write, and two results
can be fetched in one 32-bit read.
16.3.4
Scaling factor
Several of the functions listed in
the function input range to be extended to cover the full range of values supported by the
CORDIC, without saturating the input, output or internal registers. If the scaling factor is
required, it has to be calculated in software and programmed into the SCALE field of the
CORDIC_CSR register. The input arguments must be scaled accordingly before
programming the scaled values in the CORDIC_WDATA register. The scaling must also be
undone on the results read from the CORDIC_RDATA register.
Note:
The scaling factor entails a loss of precision due to truncation of the scaled value.
16.3.5
Precision
The precision of the result is dependent on the number of CORDIC iterations. The algorithm
converges at a constant rate of one binary digit per iteration for trigonometric functions
(sine, cosine, phase, modulus), see
For hyperbolic functions (hyperbolic sine, hyperbolic cosine, natural logarithm), the
convergence rate is less constant due to the peculiarities of the CORDIC algorithm (see
Figure
36). The square root function converges at roughly twice the speed of the hyperbolic
functions (see
Section 16.3.2
Figure
37).
RM0440 Rev 1
CORDIC co-processor (CORDIC)
-15
specify a scaling factor, SCALE. This allows
Figure
35.
n
to obtain the
-31
(0x7FFFFFFF).
(0x7FFF). This format has the
433/2083
445

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32G4 Series and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF