STMicroelectronics STM32WL5 Series Reference Manual page 110

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Table of Contents

Advertisement

Embedded flash memory (FLASH)
Note:
For correct operation, the firmware must guarantee that the flash page access protection is
not changed during the fast programming sequence. This is between any of the 32 word
writes.
Note:
When attempting to write in Fast programming mode while a read operation is ongoing, the
programming is aborted without any system notification (no error flag is set).
When the flash memory interface receives the first double-word, programming is
automatically launched. The BSY bit is set when the high voltage is applied for the first
double-word, and it is cleared when the last double-word is programmed or in case of error.
The internal oscillator HSI16 (16 MHz) is enabled automatically when FSTPG is set, and
disabled automatically when the FSTPG bit is cleared, except if the HSI16 is previously
enabled with HSION in the RCC_CR register.
The 32 double-word must be written successively. The high voltage is kept on the flash
memory for all the programming. Maximum time between two double-words write requests
is the time programming (around 20 µs). If a second double-word arrives after this time
programming, fast programming is interrupted and MISSERR is set.
High voltage must not exceed 8 ms for a full row between two erases. This is guaranteed by
the sequence of 32 double-words successively written with a clock system greater or equal
to 8 MHz. An internal time-out counter counts 7 ms when Fast programming is set and stops
the programming when time-out is over. In this case FASTERR is set.
If an error occurs, high voltage is stopped and next double-word to programmed is not
programmed. Anyway, all previous double-words have been properly programmed.
Programming errors signaled by flags
Several kind of errors can be detected. In case of error, the flash operation (programming or
erasing) is aborted.
PROGERR: programming error
In standard programming, PROGERR is set if the word to write, with a different value
than all zero, is not previously erased (except if the value to program is all zero).
If any other error occurs (such as SIZERR, PAGERR, PGSERR, WRPERR),
PROGRERR may not be set even if there is a word re-programming without erase
error.
SIZERR: size programming error
In standard programming or in fast programming: only double-word can be
programmed and only 32-bit data can be written. SIZERR is set if a byte or an
half-word is written.
PGAERR: alignment programming error
PGAERR is set if one of the following conditions occurs:
Alignment programming errors are individually checked per CPU. No checks are
available for simultaneous multi CPU programming. HSEM or other firmware
mechanisms must be used to prevent simultaneous multi CPU programming.
PGSERR: programming sequence error
110/1450
In standard programming, the first word to be programmed is not aligned with a
double-word address, or the second word does not belong to the same double-
word address.
In fast programming, the data to program does not belong to the same row than
the previous programmed double-words, or the address to program is not greater
than the previous one.
RM0453 Rev 5
RM0453

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Stm32wl55 seriesStm32wl54 series

Table of Contents