SN32F280 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 249
Version 1.1
21.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:
1.
Set the PG bit in the FLASH_CTRL register.
2.
Perform the data write at the desired address.
3.
Wait for the BUSY bit to be reset.
4.
(Optional) Read the programmed value and verify.
21.8.3 ERASE
The Flash memory can be erased page by page or completely (Mass Erase).
21.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:
1.
Set the PER bit in the FLASH_CTRL register
2.
Program the FLASH_ADDR register to select a page to be erased
3.
Set the STARTE bit in the FLASH_CTRL register
4.
Wait for the BUSY bit to be reset
5.
(Optional) Read the erased page and verify
21.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.
21.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.
21.10 HW CHECKSUM
HW checksum is the checksum of User ROM/Boot ROM. If the read protection is enabled, the users can still readout the
HW checksum through Writer or ISP AP.
Содержание SN32F280 Series
Страница 222: ...SN32F280 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 222 Version 1 1 A1D16...
Страница 263: ...SN32F280 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 263 Version 1 1 26 2 LQFP 64 PIN...
Страница 264: ...SN32F280 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 264 Version 1 1 26 3 LQFP 48 PIN...