21.11.25 set_spi_flash_action

Description

This Tcl command specifies SPI Flash programming action. You can program, verify or erase SPI Flash using this command.

set_spi_flash_action [-name {name}] -spi_flash_action {action}

Arguments

ParameterTypeDescription

name

string

Specifies the device name. It is optional.

spi_flash_action

string

Specifies one of the following actions: PROGRAM_SPI_IMAGE, VERIFY_SPI_IMAGE, READ_SPI_IMAGE, ERASE_SPI_FLASH.

  • PROGRAM_SPI_IMAGE: This action will erase the entire SPI flash then program the SPI image.

  • VERIFY_SPI_IMAGE: This action verifies the SPI Image on the SPI Flash.

  • READ_SPI_IMAGE: This action reads the SPI Image from the SPI Flash.

  • ERASE_SPI_FLASH: This action erases the entire SPI Flash.

Return TypeDescription
NoneNone

Error Codes

Error CodeDescription

None

Required parameter 'spi_flash_action' is missing.

None

You must specify the device name parameter for the command 'set_spi_flash_action' in chain programming mode.

None

The action 'prg_action' is not supported. You must select the programming action from this list: 'PROGRAM_SPI_IMAGE, VERIFY_SPI_IMAGE, READ_SPI_IMAGE, ERASE_SPI_FLASH'.

None

The device with 'device_name' name does not exist.

Supported Families

PolarFire®
SmartFusion® 2

Example

The following example sets the "VERIFY_SPI_IMAGE" SPI Flash programming action in single programming mode, verifies the SPI Image on the SPI Flash:

set_spi_flash_action -name {MPFS250T_ES} \
                      -spi_flash_action {VERIFY_SPI_IMAGE}