Project #029: Supervisory Flash on PSoC 4 BLE | Cypress Semiconductor
Project #029: Supervisory Flash on PSoC 4 BLE
The PSoC 4 BLE family of devices of come in two memory variants, with 128 KB or 256 KB Flash. In addition to the Flash memory, these devices also have a small amount of Supervisory Flash (SFlash) which is not overwritten during a typical programming cycle and can be used to store manufacturer-specific data.
The 128 KB PSoC devices have 512 B of SFlash. SFlash is used to store information like flash protection settings, trim settings, etc. There are also four rows of user-configurable SFlash that can be used to store Bluetooth or product-specific information like device addresses, manufacturing/serial numbers, sensor calibration data, etc. These user-configurable rows do not get erased during a programming cycle or during OTA bootloading/firmware-upgrading. Furthermore, SFlash can be written to during the manufacturing cycle, separate from the firmware programming. The user-configurable rows of the SFlash can be accessed by two methods: from the CPU (by writing firmware to do it) or through the Serial Wire Debug (SWD) programming interface.
To learn how to access SFlash using SWD, refer to the programming specifictions and use the C# utility that comes with PSoC Programmer, normally installed in C:\Program Files (x86)\Cypress\Programmer\Examples\Misc\PSoC4-BLE-SFLASH-Update\
The second method of writing firmware to access SFlash is demonstrated in this PSoC Creator project, downloadable from GitHub here: https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day029_BLE_SFlash_Write