on
2024-07-30
06:00 AM
- edited on
2024-08-06
03:04 AM
by
Laurids_PETERSE
The FIFO is sized into the targeted product, typically either 32 or 64 bytes depending on the product. Refer to the reference manual to check the maximum size in the "FIFO and data management" section.
The FIFO threshold informs about the FIFO level and can generate an interrupt to trigger read/write operations, freeing the CPU for other tasks before a burst read/write access.
The FIFO threshold must be configured to align with the size of the burst to read or to write data.
If the burst size is 16 bytes, the FIFO threshold should be set to 16 bytes.
FIFO threshold and DMA generation are meaningful in the indirect mode, as documented in the reference manual.
The FIFO threshold state is provided in OCTOSPI_CR and in OCTOSPI_SR registers.
The FIFO threshold triggers DMA if DMAEN = 1 in the OCTOSPI_CR register.
Set the FIFO threshold to half of the FIFO size buffer to ensure that there is always sufficient space in the FIFO for receiving or sending a new burst of data.