EasyManuals Logo
Home>ST>Microcontrollers>STM32G474

ST STM32G474 User Manual

ST STM32G474
2126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #493 background imageLoading...
Page #493 background image
RM0440 Rev 4 493/2126
RM0440 Filter math accelerator (FMAC)
513
Figure 46. Circular output buffer operation
18.3.5 Initialization functions
The following functions initialize the FMAC unit. They are triggered by writing the
appropriate value in the FUNC bitfield of the FMAC_PARAM register, with the START bit
set. The P and Q bitfields must also contain the appropriate parameter values for each
function as detailed below. The R bitfield is not used. When the function completes, the
START bit is automatically reset by hardware.
During initialization, it is recommended that the DMA requests and interrupts be disabled.
The transfer of data into the FMAC memory can be done by software or by memory-to-
memory DMA transfers, since no flow control is required.
Load X1 buffer
This function pre-loads the X1 buffer with N values, starting from the address in X1_BASE.
Successive writes to the FMAC_WDATA register load the write data into the X1 buffer and
increment the write address. The write pointer points to the address X1_BASE + N when the
function completes.
The function can be used to pre-load the buffer with the elements of a vector, or to initialize
the input storage elements of a filter.
Parameters
The parameter P contains the number of values, N, to be loaded into the X1 buffer.
The parameters Q and R are not used.
The function completes when N writes have been performed to the FMAC_WDATA register.
Next sample
y[n]
y[n-1]
y[n-2]
y[n-3]
y[n-4]
y[n-5]
y[n-6]
y[n-7]
y[n-10]
y[n-9]
y[n-8]
y[n-1]
y[n-2]
y[n-3]
y[n-4]
y[n-5]
y[n-6]
y[n-7]
y[n-8]
Read pointer
Next sample
y[n]
y[n-1]
y[n-2]
y[n-3]
y[n-4]
y[n-5]
y[n-6]
y[n-7]
Read pointer
Next sample
Filter using seven
samples
y[n-7] to y[n-1]
Filter finishes current
output sample. No free
space in buffer, so full
flag is set and execution
stalled.
Next sample
y[n]
y[n-1]
y[n-2]
y[n-3]
y[n-4]
y[n-5]
y[n-6]
y[n-7]
Read pointer
Four samples are read
out. Read pointer is
incremented by 4 and
wraps to beginning of
buffer space.
Space now available in
buffer so execution
resumes.
Four more samples are
read out. Read pointer is
incremented by 4.
Number of unread
samples in buffer is less
than watermark, so empty
flag is set.
y[n-11]
y[n-10]
y[n-9]
Read pointer
MSv45874V1

Table of Contents

Questions and Answers:

ST STM32G474 Specifications

General IconGeneral
BrandST
ModelSTM32G474
CategoryMicrocontrollers
LanguageEnglish

Related product manuals