SN32F100 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 163
Version 1.9
15.8.2 PROGRAM FLASH MEMORY
The Flash memory can be programmed 32 bits at a time. CPU can program the main Flash memory by performing
standard word write operations. The PG bit in the FLASH_CTRL register must be set. FMC preliminarily reads the
value at the addressed main Flash memory location and checks that it has been erased. If not, the program operation
is skipped and a warning is issued by the PGERR bit in FLASH_STATUS register. The end of the program operation is
indicated by the EOP bit in the FLASH_STATUS register.
The main Flash memory programming sequence in standard mode is as follows:
Set the PG bit in the FLASH_CTRL register.
Perform the data write at the desired address.
Wait for the BUSY bit to be reset.
Read the programmed value and verify.
15.8.3 ERASE
The Flash memory can be erased page by page or completely (Mass Erase).
15.8.3.1 PAGE ERASE
A page of the Flash memory can be erased using the Page Erase feature of the FMC. To erase a page, the procedure
below should be followed:
Set the PER bit in the FLASH_CTRL register
Program the FLASH_ADDR register to select a page to erase
Set the STRT bit in the FLASH_CTRL register
Wait for the BUSY bit to be reset
Read the erased page and verify
15.8.3.2 MASS ERASE
When the Flash memory read protection is changed from protected to unprotected, a Mass Erase of the User ROM is
performed by HW before reprogramming the read protection option.
15.9 READ PROTECTION
The read protection is activated by setting the Code Security bytes in Code option.
When the Flash memory read protection is changed from protected to unprotected, a Mass Erase of the User ROM is
performed by HW before reprogramming the read protection option.
Содержание SN32F107
Страница 34: ...SN32F100 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 34 Version 1 9 0 Reserved R 0...
Страница 180: ...SN32F100 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 180 Version 1 9 20 2 LQFP 64 PIN...
Страница 181: ...SN32F100 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 181 Version 1 9 20 3 LQFP 80 PIN...