Visible to Intel only — GUID: twf1521914558960
Ixiasoft
Visible to Intel only — GUID: twf1521914558960
Ixiasoft
5.6.6. Removing an Application Image
- Set up exclusive access to the AS x4 interface and flash memory by running the QSPI_OPEN and QSPI_SET_CS commands in the Tcl Console window. You now have exclusive access to the AS x4 interface and flash until you relinquish access by running the QSPI_CLOSE command. Write the new application image to the flash memory using the QSPI_WRITE command.
- Write 0x00000000 to the application image start address stored in the image pointer entry of the configuration firmware pointer block (CPB0 and CPB1) using the QSPI_WRITE command.
Note: You must update both copies (copy0 and copy1) when editing the configuration firmware pointer block and sub-partition table.
- Erase the application image content in the flash memory using the QSPI_ERASE command.
- To remove a new application image, add another new application image in the next or subsequent image pointer entry or allow the device to fall back to the previous or secondary application image in your application image list. The following table shows correct entries for image pointer entries for CPB0 and CPB1 for offsets 0x20 and 0x28 :
Table 52. Configuration Firmware Pointer Block Contents CPB Start Address + 0x20 Content Value CPB0 + 0x20 = 0x002E4020 Old application image pointer entry (lower priority) 0x002F4000 CPB0 + 0x28 = 0x002E4028 Current/new application image pointer entry (highest priority) 0x03FF0000 CPB1 + 0x20 = 0x002EC020 Old application image pointer entry (lower priority) 0x002F4000 CPB1 + 0x28 = 0x002EC028 Current/New application image pointer entry (highest priority) 0x03FF0000 Figure 92. Read Current CPB Values% qspi_read 0x002e4020 1 0x002f400 % qspi_read 0x002e4028 1 0x03ff0000 % qspi_read 0x002ec020 1 0x002f4000 % qspi_read 0x002ec028 1 ISR is empty 0x03ff0000
You can now remove the current or new application image address image pointer entry by writing the value to 0x00000000 using the QSPI_write_one_word function as shown in the following example. The QSPI_write_one_word function takes address and data arguments. Be sure to erase the application content that you just removed from flash memory.
Figure 93. Remove Application Image% qspi_write_one_word 0x002e4028 0x00000000 % qspi_write_one_word 0x002ec028 0x00000000
You can use a QSPI_read to the image pointer entry at offset 0x28 for CBP0 and CPB1 to verify completion of the QSPI_write_one_word commands .
Figure 94. Verify the Writes% qspi_read 0x002e4028 1 % qspi_read 0x002ec028 1
You can now configure the device with the old application image. The old application image has the highest priority if you power cycle the device or the host asserts the nCONFIG pin. You can run the rsu_status report to check the status of the current image address.