BS_Serial memory interface
RM0082
304/844
Doc ID 018672 Rev 1
15.5.5
Erase and write status register
In case of serial Flash, an erase may be necessary before writing. Due to incompatibility
between different serial Flash vendors, erase and write status register can be done only in
software mode.
It is mandatory to send previously the write enable instruction through Software mode only
(that is, setting the WEN bit in SMI_CR2 register,
), in order to avoid
corruption of the WM bit in the SMI_SR register (
). Indeed, the end of either
internal Flash erase or write status register cannot be checked by hardware mode,
preventing generation of write complete interrupt. On the other hand, WIP bit can be
checked by continuously sending a read status register command.
15.6 Timings
The memory clock (
SMI_CK
) is generated by SMI through its programmable prescaler unit
(
), as depicted in
.
The incoming AHB bus frequency fAHB (
HCLK signal
) is divided by the value stored in
the PRESC field of SMI_CR1 register (
), resulting in the SMI clock frequency
f
SMI_CK
:
●
f
SMI_CK
= f
AHB
/ (PRESC value)
that is,
●
t
SMI_CK
= t
AHB
* (PRESC value)
being t
SMI_CK
and t
AHB
the clock period of the SMI clock and the AHB bus, respectively.
Note:
If PRESC is an even value, high time and low time of SMI clock are both equal to half a
t
SMI_CK
. In contrast, in case PRESC is an odd value:
t
SMI_CK,
high= [(PRESC - 1) / 2]
t
SMI_CK
, low = [(PRESC + 1) / 2]
15.6.1 Latencies
Assuming that SMI is not busy by now, the nominal latency for a 32 bit single read to a non-
incrementing serial Flash address, is:
●
73 t
AHB
maximum, if PRESC = 1 (that is, t
AHB
=
t
SMI_CK
).
●
(68 t
SMI_CK
+ 5 t
AHB
) maximum, if PRESC > 1 (that is, t
AHB
≠
t
SMI_CK
, and specifically
t
SMI_CK
> t
AHB
),
taking into account up to 9 clock periods in addition to 64 clock periods required to both
send command to serial Flash memory (1-byte 3-bytes address) and receive back
32 bits.
●
Besides, under the same assumption, the nominal latency for a 32 bit single write to a
non-incrementing serial Flash address is:
●
5 t
AHB
maximum, if PRESC = 1 (that is, t
AHB
= t
SMI_CK
).
●
(2 t
SMI_CK
+ 3 t
AHB
) maximum, if PRESC > 1 (that is, t
AHB
≠
t
SMI_CK
, and specifically
t
SMI_CK
> t
AHB
).
In case of AHB read burst transfers, the maximum latency for all transfers after the first is the
same as data size, that is (32 t
SMI_CK
) for a word transfer, (16 tS
MI_CK
) for a half-word and (8