Download Print this page

ST STM32L4+ Series Reference Manual page 578

Hide thumbs Also See for STM32L4+ Series:

Advertisement

Octo-SPI interface (OCTOSPI)
19.4.15
OCTOSPI HyperBus mode configuration
Indirect mode configuration
When FMODE[1:0] = 00, the Indirect-write mode is selected and data can be sent to the
external device. When FMODE[1:0] = 01, the Indirect-read mode is selected where data can
be read from the external device.
When the OCTOSPI is used in Indirect mode, the frames are constructed in the following
way:
1.
Specify a number of data bytes to read or write in OCTOSPI_DLR.
2.
Specify the targeted address in OCTOSPI_AR.
3.
Enable the DMA channel if needed.
4.
Read/write the data from/to the FIFO through OCTOSPI_DR (if no DMA usage).
In Indirect-read mode, the command sequence starts as soon as the address is updated
with a write to OCTOSPI_AR.
In Indirect-write mode, the communication start is triggered by a write in the FIFO through
OCTOSPI_DR.
Status-flag polling mode configuration
The Status-flag polling mode is enabled setting FMODE[1:0] = 10. In this mode, the
programmed frame is sent and the data is retrieved periodically.
The maximum amount of data read in each frame is 4 bytes. If more data is requested in
OCTOSPI_DLR, it is ignored and only 4 bytes are read. The periodicity is specified in
OCTOSPI_PIR.
Once the status data has been retrieved, it can be internally processed to:
Set SMF (an interrupt is generated if enabled).
Stop automatically the periodic retrieving of the status bytes.
The received value can be masked with the value stored in OCTOSPI_PSMKR and can be
ORed or ANDed with the value stored in OCTOSPI_PSMAR.
In case of a match, SMF is set and an interrupt is generated if enabled. The OCTOSPI can
be automatically stopped if AMPS is set.
In any case, the latest retrieved value is available in OCTOSPI_DR.
When the OCTOSPI is used in Auto-polling mode, the frames are constructed in the
following way:
1.
Specify the input mask in OCTOSPI_PSMKR.
2.
Specify the comparison value in OCTOSPI_PSMAR.
3.
Specify the read period in OCTOSPI_PIR.
4.
Specify a number of data bytes to read in OCTOSPI_DLR.
5.
Specify the targeted address in OCTOSPI_AR.
The command sequence starts as soon as the address is updated with a write to
OCTOSPI_AR.
578/2301
RM0432 Rev 6
RM0432

Advertisement

loading
Need help?

Need help?

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