AN694 SILABS [Silicon Laboratories], AN694 Datasheet
AN694
Related parts for AN694
AN694 Summary of contents
Page 1
... For all Flash write operations, firmware will stall unless operating from a memory space other than Flash. Interrupts posted during a Flash write or erase operation will be held pending until the completion of the Flash operation, after which they will be serviced in priority order. Rev. 0.1 9/12 F IRMWARE ON Copyright © 2012 by Silicon Laboratories AN694 EVI AN694 ...
Page 2
... AN694 3. Flash Essentials Different device series have many similarities for Flash, including page sizes, lock bits, and the instructions used to read and write to Flash. The main differences are the amount of Flash available, how the voltage supply monitor is enabled, how the voltage supply monitor is enabled as a reset source, and how registers are modified to allow Flash writes and erases ...
Page 3
... Firmware writes 0x0000_0000 to the lock word. The location for the Flash lock word will differ between devices, so consult the device reference manual for more information. Reserved Lock Word 0x0003_FFFC Reserved Flash Reserved Lock Word 0x0003_FFFC Reserved Flash Rev. 0.1 AN694 3 ...
Page 4
... AN694 3.3. Device-Specific Notes Various MCUs have features that require consideration when accessing Flash. 3.3.1. SiM3Cxxx, SiM3Uxxx, and SiM3Lxxx Flash Lock and Key All SiM3Cxxx, SiM3Uxxx, and SiM3Lxxx devices' writes and erases to Flash are protected with a lock and key function. The Flash Lock and Key Register (FLASHCTRLn) must be written with the correct key codes in sequence before Flash operations may be performed ...
Page 5
... Repeat steps 8 and 9 until all data is written. Hardware automatically increments the WRADDR field by 2 after each write operation. 11. (Optional) If executing code from a memory space other than Flash, poll on the BUSYF flag until hardware clears 12. Write the multiple lock value to KEY (0x5A). 13. Enable interrupts. Rev. 0.1 AN694 5 ...
Page 6
... 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: 1. Ensure the voltage supply monitor is enabled and enabled as a reset source (device reset sources and VMONn modules) ...
Page 7
... HAL and non-HAL methods on various device families. 5.1.1. SiM3Cxxx/SiM3U1xx/SiM3L1xx Devices Enable voltage supply monitor: SI32_VMON_0->CONTROL.VMONEN = 1; // non-HAL SI32_VMON_A_enable_vdd_supply_monitor(SI32_VMON_0); // HAL Enable voltage supply monitor as a reset source: SI32_RSTSRC_0->RESETEN.VMONREN = 1; // non-HAL SI32_RSTSRC_A_enable_vdd_monitor_reset_source(SI32_RSTSRC_0); // HAL Enable the high voltage monitor threshold: Rev. 0.1 AN694 7 ...
Page 8
... AN694 SI32_VMON_0->CONTROL.VDDHITHEN = 1; // non-HAL SI32_VMON_A_select_vdd_high_threshold(SI32_VMON_0); // HAL 5.2. AHB Clock 1. If operating from an external crystal, be advised that crystal performance is susceptible to electrical interference and is sensitive to layout and changes in temperature. If the system is operating in an electrically noisy environment, use one of the internal oscillators or an external CMOS clock. ...
Page 9
... N : OTES Rev. 0.1 AN694 9 ...
Page 10
... AN694 C I ONTACT NFORMATION Silicon Laboratories Inc. 400 West Cesar Chavez Austin, TX 78701 Tel: 1+(512) 416-8500 Fax: 1+(512) 416-9669 Toll Free: 1+(877) 444-3032 Please visit the Silicon Labs Technical Support web page: https://www.silabs.com/support/pages/contacttechnicalsupport.aspx and register to submit a technical support request. The information in this document is believed to be accurate in all respects at the time of publication but is subject to change without notice. ...