SPRUJB6B November 2024 – May 2025 AM2612
One important use-case of OSPI1 is to enable FOTA(Firmware Over the Air) update without using RWW flash. OSPI0 is used for execution (Execute In Place), while OSPI1 is used to download and write the firmware into the respective Flash, where the two controllers are working in parallel so that there is no XIP downtime. Firmware download to the flash using OSPI1 uses slow 2 wire mode (SPI) protocol, while the execution from OSPI0 will be fast Octal SPI protocol.
Top level PAD level integration diagram for this use-case is shown below. SoC level muxes are present in the Pinmux to enable this mode. The details regarding them can be figured out from the Pinmux sheet.
PING Mode : During this mode OSPI0 is doing XIP from Flash0 using CS0 in octal SPI mode(D0 to D7). The clock and DQS lines are routed to OSPI0 based on the Pinmux configuration done. OSPI1 on the other hand is downloading the firmware into Flash1 using it’s CS1 in 2 wire SPI mode.(D0 & D1). The pinmux configuration needs to be done accordingly to enable this.
D2 to D7 lines for Flas0 and Flash1 as well as their DQS lines are shorted on bench/board externally
PONG Mode : Once the Firmware is completely downloaded to Flash1, the execution can be switched to Flash1. In this mode, OSPI0 uses it’s CS1 to execute from Flash1 in octal SPI mode. Pinmux selection needs to be updated accordingly so that the data lines of Flash1 are routed to OSPI0. OSPI1 now uses it’s CS0 to control Flash0 for Firmware download using D0&D1. The clock and Data lines from OSPI1 can now be routed to Flash0 using proper Pinmux configurations.
So by doing PING-PONG, we enable XIP execution with FOTA download without impacting the XIP downtime.