How NOR flash technology makes FOTA upgrades more reliable

“Firmware over-the-air upgrade” (FOTA upgrade) is used to remotely fix errors and improve the system, including the introduction of new features and services. FOTA upgrades are very suitable for remote areas or applications that require continuous upgrades, including wireless infrastructure, smart factories, and connected cars. A typical system contains a processor that is activated and configured via non-volatile memory. As system connectivity continues to increase, programmable chip architecture continues to evolve, non-volatile memory is more reliable, safer and more stable, making seamless FOTA upgrades a reality-these trends and industry changes are accelerating the development momentum of FOTA applications.

“Firmware over-the-air upgrade” (FOTA upgrade) is used to remotely fix errors and improve the system, including the introduction of new features and services. FOTA upgrades are very suitable for remote areas or applications that require continuous upgrades, including wireless infrastructure, smart factories, and connected cars. A typical system contains a processor that is activated and configured via non-volatile memory. As system connectivity continues to increase, programmable chip architecture continues to evolve, non-volatile memory is more reliable, safer and more stable, making seamless FOTA upgrades a reality-these trends and industry changes are accelerating the development momentum of FOTA applications.

Mission critical system requirements

For mission-critical applications that do not allow errors during the upgrade process, reliable FOTA upgrades are required. Therefore, the upgrade process must not be affected by communication failures, and there is almost no need to suspend the system during the upgrade process. For most applications, it is not cost-effective to send technicians to the field to reprogram the system, and recalling all affected vehicles for software upgrades also makes automakers financially unaffordable. For various reasons, FOTA has become the new favorite of the industry. In order to ensure reliability, this function must be implemented at the system level, and the system chip must have a reliable FOTA function. Figure 1 details the many advantages of FOTA technology.

How NOR flash technology makes FOTA upgrades more reliable

Figure 1: Advantages of FOTA (Source: Cypress)

Flash memory devices are commonly used for system software/firmware code storage. The main purpose of the FOTA program is to upgrade the code in the flash memory. Contemporary host devices usually only use internal flash memory or a combination of internal and external flash memory to store data and codes. However, as system complexity continues to rise, modern semiconductor technology is facing expansion and cost challenges, making it increasingly difficult to embed flash memory in a host microcontroller (MCU), a common practice in automotive and industrial applications. Embedded flash memory may not be able to break through the 28nm or 22nm bottleneck. In addition, external flash memory will become necessary, and the host will need to have the ability to perform FOTA upgrades only through external flash memory devices.

FOTA upgrade method

There are several methods to choose from when implementing FOTA upgrades using NOR flash memory. The first is FOTA upgrade without software/firmware backup.

Under this architecture, the system uses a single flash memory device or partition to store application software. When using this method, the application needs to be suspended during the software upgrade process because the system can only run applications or upgrade software from the flash memory. Such applications are usually configured with a host MCU with basic functions and limited memory.

The second FOTA upgrade method is through software/firmware backup. This method uses a higher-end MCU and additional flash memory to avoid the need to suspend the system during the upgrade process. Under this architecture, the system uses two flash memory devices or partitions, one of which is flash memory/partition to run applications, and the other is upgraded at the same time.

The third upgrade method uses “golden” software/firmware backup. When using this FOTA upgrade method, the system uses three flash memory devices or partitions. Normally, one of the partitions (or die) contains the current software, the other partition is used to upgrade (or FOTA upgrade has been completed) code, and the third partition is used to store the “golden” copy of the software (in the current software and the new In the case of software damage, the system can be restored to this copy).
Table 1 summarizes the advantages and disadvantages of the above three methods.

How NOR flash technology makes FOTA upgrades more reliableTable 1: Advantages and disadvantages of various FOTA architectures

NOR flash memory, born specifically for FOTA

NOR flash memory devices are becoming more and more advanced, and their innovative functions are designed to achieve reliable FOTA upgrades, mainly including:

Synchronous read/write operations

Some of the most advanced NOR flash memory devices in the industry have a flexible bank architecture (ie, sector groups) that can continuously read data from one bank while performing erase/program functions in another bank. This feature is called synchronous read/write operation and is ideal for the FOTA upgrade process. Any free memory bank can be read during the erase/program operation. The device allows the host system to program or erase in one memory bank, and then immediately read from another memory bank simultaneously, thereby improving the overall performance of the system. This feature can prevent the system from being suspended due to waiting indefinitely for the completion of the programming or erasing operation.

Some suppliers also provide stacked NOR flash memory devices (such as SPI NOR S70FL-S) to support synchronous operation between dies. Certain applications require higher-density flash memory to store application software, and these devices support simultaneous operation with high-density flash memory devices. The system can execute the same upgrade program sequence as the synchronization operation function, but in this case, the system reads or upgrades the corresponding die instead of the memory bank.

The waveform diagram in Figure 2 shows the software upgrade sequence in a NOR flash memory device. They can ensure that the read operation of memory bank 1 or die 1 is synchronized with the erase/program operation of memory bank 2 or die 2.

How NOR flash technology makes FOTA upgrades more reliableFigure 2: FOTA upgrade with synchronous operation (Source: Cypress)

Program/erase resume/suspend

“Program/erase resume/suspend” is another important function of NOR flash memory, which can greatly improve the reliability of FOTA operation. The “program/erase pause” instruction allows the system to interrupt the embedded program/erase operation in order to read data from the suspended non-program/erase sector. After the read operation is completed, the system can “recover” and continue to perform the program/erase operation. This feature is suitable for single-die NOR flash memory device architectures that do not support synchronous operation. In addition, this function also provides priority for running applications, so the system does not need to be suspended, and the software upgrade process can be completed in idle time. Figure 3 demonstrates the FOTA method using the “erase/program pause/resume” function.

How NOR flash technology makes FOTA upgrades more reliableFigure 3: FOTA upgrade using the program/erase pause/resume function (Source: Cypress)

GUID Disk Partition Table (GPT) method

Another feature of NOR flash memory that enhances reliability is the use of “Globally Unique Identifiers” (GUID) disk partition table (GPT), which uses a single flash memory device to perform FOTA operations. When NOR flash memory devices use this method, the host needs to partition the flash memory (as shown in Figure 4). The top and bottom of the flash memory device contain partition tables (primary partition table and auxiliary partition table), which are used to describe how to divide and partition the flash memory. When the primary partition table is damaged, the secondary partition table will be used. The remaining partitions (sectors) will be divided between the two applications. The partition table has low storage capacity requirements, so the smaller sector architecture at the top and bottom of the NOR flash memory device is an advantage for this type of application.

How NOR flash technology makes FOTA upgrades more reliableFigure 4: FOTA upgrade using GUID partition table (Source: Cypress)

NOR flash + RAM solution

Another FOTA upgrade method using advanced NOR flash memory technology is usually called “storage and download” (SnD) or “shadowing”. When using this method, the system copies the NOR flash memory data to the RAM device immediately after power-on. After the MCU copies and stores the data of the NOR flash memory device into the RAM device, it reads the software required by the application from the RAM device. When the flash memory device performs FOTA upgrade, any one of the three FOTA upgrade methods can be used. RAM is usually used to provide high-speed random access. However, high-performance NOR flash memory devices on the market have “Execute-in-Place-XiP” (Execute-in-Place-XiP) functions that can perform equivalent operations.

Many advanced functions of NOR flash memory technology can realize stable, fast, seamless and anti-power FOTA upgrade. Mission-critical applications can use the advanced features of NOR flash memory (such as high-performance, high-density, multi-die packaging solutions, synchronous operations, erase/program pause/resume, etc.) to perform highly reliable FOTA upgrades while saving motherboard space, Save hardware and software resources and reduce overall costs. Cypress’s Semperâ„¢ NOR flash memory and other devices add a layer of functional safety and reliability to the FOTA upgrade, allowing the system performance to be further improved. If so, the system can rely on the high performance, sector architecture and excellent interface speed of NOR flash memory to directly read application software from the flash memory device, reducing or even eliminating the need for external RAM.

The Links:   NL12876BC26-28 G084SN03-V3 LCD-DISPLAY