RM0082
BS_Serial memory interface
Doc ID 018672 Rev 1
303/844
After a Write request has been sent, the WM bit in SMI_SR register is cleared and the read
status register instruction (opcode 8’h05,
) is automatically sent to this bank until
no write in progress (WIP =1‘b0).
Note:
1
Write capability must be used only if write in progress / busy bit of the external memory
status register is located in bit 0. Otherwise the system will become locked.
2
When memory programming is finished, the WCF bit in the SMI_SR register is set and an
interrupt is generated if the enabling WCIE bit in the SMI_CR1 register is set.
3
In order to send a Write request to a bank other than the one under programming, the
software must wait for WIP = 1‘b1, otherwise the error ERF2 would be generated due to non
incrementing address. The bank under programming phase must not be disabled in order to
write to another one.
15.5.3
Write burst mode
Write burst mode (WBM bit set in SMI_CR1 register,
) enables to keep
selected the external SPI memory after an AHB write request (see above). In this case, the
next AHB write request should point to the next incremented address and should have the
same size (byte, half-word or word). Otherwise, an error flag is set (ERF2 flag in the
SMI_SR register,
) and an ERROR response is sent back to the AHB master.
Note:
A memory access error (ERF1 or ERF2) results in both release of chip select and start of
the external memory page program.
Disabling the write burst mode (that is, clearing the WBM bit in SMI_CR1 register), the next
incrementing AHB write request should be sent to external memory if it occurs before the
end of the previous serial transfer. Otherwise, an error flag is set (ERF2 flag in the SMI_SR
register) and an ERROR response is sent back to the AHB master.
Consequently, it is mandatory to enable write burst mode in order to perform several Write
requests which are not sent in the same AHB incrementing burst. If WBM is cleared and no
other write request occurs, the external memory selection is released after sending the data
and the external memory page program cycle starts.
Note:
Read requests to external memory are not allowed in write burst mode, otherwise an error
flag is set (ERF1 flag in the SMI_SR register) and an ERROR response is sent back to the
AHB master.
The external SPI memory is released by either disabling write burst mode (clearing WBM
bit) or disabling the bank, and the external memory page program cycle starts. If bank is
enabled, read status register instruction is automatically sent to this bank until WIP = 1‘b0.
(see
15.5.4 Read
while write mode
If a read request occurs for the bank which is in programming phase, the AHB bus is stalled
until no write in progress (WIP = 1‘b0). (please refer to
for major detail on
WIP bit).
If a read request occurs for another bank, the read status register sequence is stopped, then
the read request is served and, finally, the read status register sequence is sent again to the
memory bank being programmed.
It follows that during a read while write, the selected external SPI memory is released after
the read command, in order to send the read status register sequence.