Software Overview#

This section covers the software drivers required for the programmer.

The generic flash programmer executes the flashing operation via the Network Wireless Processor (NWP) boot loader.

DescriptionCommon Flash
Flash MemoryA single flash memory is shared between M4 (Host MCU) and NWP, and they access this flash memory over dedicated QSPI controllers.
Memory AccessAn arbiter placed between the QSPIs and memory helps in arbitration for flash access.
Erase OperationUses the bootloader-based erase chip operation

The flash memory is shared between the M4 and NWP. Only the NWP can perform low-level operations on the flash memory, and the M4 can only support flash read operations. For low-level operations such as erase and write operations, the M4 can request the NWP bootloader to do the operations.

The steps required for flash programming are as follows.

Programming StageDescriptionAPIs
InitializationDevice description needs to be provided in this stage.In FlashDev.c file, we provided the device details in the "struct FlashDevice_t"
ProgramProgram the flash.In FlashPrg.c file, we used the following two SiWx917 APIs in the ProgramPage() API.
  • rsi_device_init(uint8_t select_option)
  • rsi_bl_upgrade_firmware(uint8_t *firmware_image , uint32_tfw_image_size, uint8_t flags)
EraseErases the entire flash.In FlashPrg.c, we used the following SiWx917 API in the EraseChip() API
  • rsi_device_init(uint8_t select_option)

Note: The SiWx917 APIs are explained in detail in Section SiWx917 Generic Flash APIs.