EasyManuals Logo

ST STM32G0 1 Series User Manual

ST STM32G0 1 Series
1390 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #76 background imageLoading...
Page #76 background image
Embedded Flash memory (FLASH) RM0444
76/1390 RM0444 Rev 5
Note: The internal oscillator HSI16 (16 MHz) is enabled automatically when STRT bit is set, and
disabled automatically when STRT bit is cleared, except if the HSI16 is previously enabled
with HSION in RCC_CR register.
3.3.8 FLASH Main memory programming sequences
The Flash memory is programmed 72 bits (64-bit data plus 8-bit ECC) at a time.
Programming a previously programmed address with a non-zero data is not allowed. Any
such attempt sets PROGERR flag of the FLASH status register (FLASH_SR).
It is only possible to program a double word (2 x 32-bit data).
Any attempt to write byte (8 bits) or half-word (16 bits) sets SIZERR flag of the FLASH
status register (FLASH_SR).
Any attempt to write a double word that is not aligned with a double word address sets
PGAERR flag of the FLASH status register (FLASH_SR).
Standard programming
The Flash memory programming sequence in standard mode is as follows:
1. Check that no Main Flash memory operation is ongoing by checking the BSY1 bit of the
FLASH status register (FLASH_SR)..
2. Check and clear all error programming flags due to a previous programming. If not,
PGSERR is set.
3. Set the PG bit of the FLASH control register (FLASH_CR).
4. Perform the data write operation at the desired memory address, inside Main memory
block or OTP area. Only double word (64 bits) can be programmed.
a) Write a first word in an address aligned with double word
b) Write the second word.
5. Wait until the BSY1 bit of the FLASH status register (FLASH_SR) is cleared.
6. Check that EOP flag of the FLASH status register (FLASH_SR) is set (programming
operation succeeded), and clear it by software.
7. Clear the PG bit of the FLASH control register (FLASH_CR) if there no more
programming request anymore.
Note: When the Flash memory interface has received a good sequence (a double word),
programming is automatically launched and BSY1 bit is set. The internal oscillator HSI16
(16 MHz) is enabled automatically when PG bit is set, and disabled automatically when PG
bit is cleared, except if the HSI16 is previously enabled with HSION in RCC_CR register.
ECC is calculated from the double word to program.
Fast programming
The main purpose of this mode is to reduce the page programming time. It is achieved by
eliminating the need for verifying the Flash memory locations before they are programmed,
thus saving the time of high voltage ramping and falling for each double word.
This mode allows programming a row (32 double words = 256 bytes).
During fast programming, the Flash memory clock (HCLK) frequency must be at least 8
MHz.
Only the Main memory can be programmed in Fast programming mode.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32G0 1 Series and is the answer not in the manual?

ST STM32G0 1 Series Specifications

General IconGeneral
BrandST
ModelSTM32G0 1 Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals