ST STM32L0x3 Reference Manual page 89

Ultra-low-power advanced arm-based 32-bit mcus
Table of Contents

Advertisement

RM0367
Program a single word to Flash program memory
Purpose
Write one word in the Flash program memory with a specific value.
Size
Write only by word.
Address
Select an address in the Flash program memory.
Protocol
Single programming operation.
Requests
PELOCK = 0, PRGLOCK = 0.
Errors
WRPERR is set to 1 if PELOCK = 1 or PRGLOCK = 1.
WRPERR is set to 1 if the user tries to write in a write-protected sector (see the
(Proprietary Code Read-Out Protection)
NOTZEROERR is set to 1 if the user tries to write a value in a word which is not zero.
This error does not stop the write operation on category 3 devices while the operation
is stopped on other categories.
SIZERR is set to 1 if the size is not a word.
Description
This operation allows writing a word in Flash program memory. The user must write the
right value at the right address with a word size. The memory interface cannot execute
an erase to delete the previous content before the write operation is performed.
If the previous content is not null:
Duration
Tprog (3.2 ms).
The erase/write endurance cycles in Flash program memory are linked to one page
granularity (one erase/write cycle will degrade one programmed page in word area in
Flash program memory).
For code example, refer to
example.
Category 3 devices
NOTZEROERR is set to 1.
The real value written in the memory is the OR of the previous value and the new
value (the memory interface writes 1 when there was 0 before). This is done both
for data and ECC. Reading back the data might not return the old value, the new
one or the ORed values. The ECC is not compatible with the data any more.
Other categories
NOTZEROERR is set to 1. Writing a word to an address containing a non-null
value is not performed.
A.3.9: Program a single word to Flash program memory code
Flash program memory and data EEPROM (FLASH)
section).
RM0367 Rev 7
PcROP
89/1043
122

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents