RM0082
BS_Serial memory interface
Doc ID 018672 Rev 1
301/844
In particular, external serial memory is mapped in AHB address space as shown in
,
Figure 26.
External SPI memory map in AHB address space
In this mode, both the transmit register SMI_TR (
) and the receive register
SMI_RR (
) must not be accessed. They are actually in charge of the SMI
state machine to communicate with the selected external memory device, whenever an AHB
master reads or writes an address into the memory.
At power-on reset, the SMI operates in hardware mode (allowing then boot phase from
external memory, as explained in
15.4.2 Software
mode
Software mode is intended to allow any AHB master to access external serial memory by
programming the internal SMI registers and reading them for memory replies. In this mode,
direct transfer to/from external memory – that is, bypassing SMI registers - are not permitted
to an AHB master.
In particular, software mode is used both to transfer any data or commands from transmit
register (SMI_TR,
) to external serial memory, and to read data directly in the
). The transfer actually starts setting the dedicated
SEND bit in the SMI_CR2 register (
Besides in software mode, application code being executed by the CPU cannot be fetched
from external memory, because incompatibility between software and hardware mode. The
code must be either hosted by internal memory or previously loaded from external memory
while SMI is in hardware mode.
For example, software mode is used to erase Flash memories before writing. Indeed,
memory erasing cannot be performed in Hardware mode due to incompatibilities in Flash
devices from different vendors.
15.5 Data
transfers
15.5.1 Read
request
A read request from an AHB master to external SPI memory is served only if SMI is in
hardware mode, and write burst mode is not enabled (
). Otherwise, an error
flag is set (ERF1 flag in the SMI_SR register,
) and an ERROR response is
sent back to the AHB master.
External Serial
Memory Space
CS0
CS1
0xF9FF_FFFF
0xF800_0000
0xF9FF_FFFF
0xF800_0000
0xF900_0000
0xF8FF_FFFF