13. SPI Flash ProgrammerΒΆ


This tool applies to DA14580/581/583 and DA14585/6 chip family.

SPI Flash Programmer is used for downloading an image file to the SPI Flash Memory.


Figure 52 SPI Flash Programmer

  • Load hex/bin file: User can select a .hex or .bin image file in order to program it (see Program SPI/EEPROM) and burn it to the SPI Flash Memory.

  • Show info: Form here user can see how the current image was programed.

  • Offset in SPI Flash memory (HEX): Optionally user can specify an offset in hex for the SPI memory. Actions (read, write) will respect that offset.

  • SPI Flash memory size (HEX, in Bytes): User set the size of SPI Flash memory. The value is used for validating that the data range to be read/written does not go beyond the boundaries of the available memory space. In this way, Toolbox makes an initial check before the command is sent to the underlying library.
    If this value is smaller than the actual size, please update the value to prevent Toolbox from issuing the following message:
    Size of data of selected file plus offset exceeds SPI FLASH memory size
    If this value is higher than the actual size, the underlying library will fail to read/write beyond the max memory size and the following message will be displayed:
    Memory burning failed

After selecting the image file the following actions are available:

  • Connect: Special firmware is downloaded to the chip to allow the user interact with the SPI Flash memory. This is a mandatory step before enabling the other actions. Please note that this firmware is different from the firmware downloaded when pressing the ‘Connect’ button on the OTP Image tab. If a ‘CRC does not match’ shows up, please press the ‘Connect’ button again and then the hardware reset button on the board to restart the download process.
  • Read 32KB: The SPI Flash memory is always read in 32KByte blocks starting from the specified offset. This offset cannot be greater than the maximum SPI Flash Memory size. Since the application does not know the SPI Flash memory size, the user can specify it by filling the ‘SPI Flash Memory size (HEX, in bytes)’ field. If the user does not know the size of the SPI Flash memory, a default value of 128KB (0x20000 bytes) is used for DA14580/581/583 family and a value of 256KB (0x40000 bytes) is used for DA14585/6 family.
  • Erase: Erases the entire SPI Flash Memory
  • Erase sector: Erases the sectors included between the start and end address specified by the user.
  • Burn: Data is written starting at the selected offset. Please note that before downloading data to the SPI Flash, the firmware erases the appropriate 4KB sectors in the area that the data is about to be written.
  • Burn & Verify: Adds a verification step after the burn process. After burning data to SPI Flash memory, it is verified that the contents of the memory are the same with the contents of the file that has been burned.
  • Save: By pressing the Save button, the user has ability to save SPI Flash memory contents to a file. A dialog will popup, in order to select the output file, the offset and the number of SPI Flash memory bytes to save.

Figure 53 SPI save memory to file

Please note that currently SPI Flash Programmer has been tested in BUCK mode at 3V and BOOST mode at 2.7V.