AN694 SILABS [Silicon Laboratories], AN694 Datasheet - Page 6

no-image

AN694

Manufacturer Part Number
AN694
Description
WRITING TO FLASH FROM FIRMWARE ON SiM3XXXX DEVICES
Manufacturer
SILABS [Silicon Laboratories]
Datasheet
AN694
4.4. Writing Multiple Half-Words to Non-Sequential Flash Addresses
All bits, fields, and registers referred to in this sequence are in the FLASHCTRLn module. To write multiple bytes to
non-sequential addresses in Flash:
4.5. Erasing a Flash Page
All bits, fields, and registers referred to in this sequence are in the FLASHCTRLn module. To erase a page of
Flash:
4.6. Erasing Multiple Flash Pages
All bits, fields, and registers referred to in this sequence are in the FLASHCTRLn module. To erase multiple pages
of Flash:
6
1. Ensure the voltage supply monitor is enabled and enabled as a reset source (device reset sources and
2. Disable erase operations (ERASEEN = 0).
3. Disable interrupts.
4. Write the initial unlock value to KEY (0xA5).
5. Write the multiple unlock value to KEY (0xF2).
6. Write the destination address to WRADDR.
7. Write the data half-word to WRDATA in right-justified format.
8. (Optional) If executing code from a memory space other than Flash, poll on the BUSYF flag until hardware
9. Repeat steps 6, 7, and 8 until all data is written.
10. Write the multiple lock value to KEY (0x5A).
11. Enable interrupts.
1. Ensure the voltage supply monitor is enabled and enabled as a reset source (device reset sources and
2. Write the address of a byte in the Flash page to WRADDR.
3. Enable erase operations (ERASEEN = 1).
4. Disable interrupts.
5. Write the initial unlock value to KEY (0xA5).
6. Write the single unlock value to KEY (0xF1).
7. Write any value to WRDATA in right-justified format to initiate the page erase.
8. (Optional) If executing code from a memory space other than Flash, poll on the BUSYF flag until hardware
9. Enable interrupts.
1. Ensure the voltage supply monitor is enabled and enabled as a reset source (device reset sources and
2. Enable erase operations (ERASEEN = 1).
3. Disable interrupts.
4. Write the initial unlock value to KEY (0xA5).
5. Write the multiple unlock value to KEY (0xF2).
6. Write the address of a byte in the Flash page to WRADDR.
7. Write any value to WRDATA in right-justified format to initiate the page erase.
8. (Optional) If executing code from a memory space other than Flash, poll on the BUSYF flag until hardware
9. Repeat steps 6, 7, and 8 for each page.
VMONn modules).
VMONn modules).
VMONn modules).
clears it to 0.
clears it to 0.
clears it to 0.
Rev. 0.1

Related parts for AN694