4.3 SPI Master Programming

When the system controller SPI is configured as a master, a device can program itself. In SPI master programming, the programming images are stored in the external SPI Flash memory using the SPI directory. For more information about the SPI directory and about programming the external SPI Flash memory, see Programming the External SPI Flash.

SPI master programming supports auto update and IAP. In auto update programming, if the version of the update image is found to be different from the currently programmed version, the system controller reads the update image bitstream from the external SPI Flash memory and programs the device on power-up. In IAP, the user application initiates the device program, and the system controller reads the bitstream from the external SPI Flash memory to program the device. The auto update and IAP operations are atomic and cannot be interrupted by JTAG or SPI slave commands.

The Auto Update feature is not enabled by default and if required, this needs to be enabled using Libero SoC. SPI Master mode also supports Auto Programming and Auto Recovery, see Table 4-5. These two features are enabled by default and do not require user configuration.

For information about the I/O states during SPI master programming, see I/O States During Programming.

The following table lists the initiation sources for the features supported by SPI master programming.

Table 4-5. Device Program Initiation Sources
Programming FeatureDescriptionInitiation Source
Auto programmingPrograms a blank deviceDevice reset or power-cycle
Auto updateUpdates device contents automaticallyDevice reset, power-cycle, or system service request
IAPUpdates device contents upon user requestSystem service request
Auto recoveryAutomatically recovers the device from programming failureDevice power failure during programming
Important: If System Controller Suspend Mode is enabled, SPI master programming mode such as IAP and system services initiated auto-update features are not available to program the device. Only Power-up or DEVRST_N initiated Auto-update is available. The Power-up or DEVRST_N initiated Auto-update feature must be enabled in bitstream. Bitstream image authentication system services are not available in System Controller Suspend Mode so alternative SPI Flash image integrity checking is required to be implemented as part of the user design.

For information about implementing auto-update and IAP, see AC466: PolarFire FPGA Auto Update and In-Application Programming Application Note.

Field updates performed in unpredictable conditions carry associated risks of programming failures. Example risks include a power brownout/outage event or internal system controller Single Event Upsets (SEUs) when re-programmed in high altitude or space applications. The following table shows IAP/auto-update recommendations to minimize these risks for various bitstream components when performing field updates to RT PolarFire devices. If SEUs are a concern, see RT PolarFire radiation test reports for SEU rates.

Table 4-6. Guidelines For Field Updates (IAP and Auto-Update) of RT PolarFire Devices
DeviceSecurity Only BitstreamFabric + sNVM Bitstream
RTPF500TNo1See 2.
RTPF500ZTNo1Yes3
Note:
  1. Reprogramming security settings, where power interruption or SEUs are possible, is not recommended to prevent the risk of accidental device lock-out. Device security settings and locks must be programmed in a terrestrial environment. The ability to perform field or in-flight updates of user cryptographic keys will be provided in a future tool release to enable the “key rolling” functionality.
  2. Microchip recommends using RTPF500ZT for in-flight re-programming via IAP and auto-update modes as described in Note 3. For RTPF500T devices, in-flight reprogramming via JTAG and SPI target modes are recommended using an external device running DirectC REPROGRAM_INFLIGHT action. See the RTPF500T radiation test reports to understand the SEE performance of in-flight reprogramming without the enhancements described in the following note. This helps you determine if the results meet your application reliability requirements.
  3. Device has enhanced IAP and auto-update algorithms that perform a standalone verify action and programming digest checks before enabling the device operation for in-flight reprogramming. This includes FPGA fabric and sNVM clients configured as read-only.

The following figure shows the recommended board configuration for SPI master programming. The VDDI3 must match the voltage specified in the datasheet associated with the external SPI Flash.

Figure 4-8. Recommended Board Configuration for SPI Master Programming