You are here

项目编号 025:OTA (Over-the-Air) Firmware Updates with F-RAM | 赛普拉斯半导体

项目编号 025:OTA (Over-the-Air) Firmware Updates with F-RAM

In today's project, we demonstrate how you can perform Over-the-Air (OTA) firmware upgrades with PSoC 4 BLE.

As the name suggests, OTA allows you to perform firmware upgrades to your end-product over a Bluetooth Low Energy wireless connection. By doing the firmware upgrade OTA, the user does not need to connect the end-product to a computer over USB. There are a couple methods to perform OTA - by using PSoC's built-in Flash memory, or by using an external memory IC to store the new firmware image. In this example project, we demonstrate the external memory method by utilizing the on-board Cypress F-RAM IC on the BLE Pioneer Kit.

Cypress's Ferroelectric RAM (F-RAM) is a type of non-volatile memory that has three distinct advantages over traditional non-volatile memories: high speed, high endurance, and low energy consumption. These F-RAM devices communicate with the host controller over a serial interface (I2C in this case) that do not have any write delays such that the data is instantly nonvolatile. This is crucial for mission-criticial tasks such as Bluetooth Low Energy firmware upgrades via bootloading, where any interruption in power can typically be catastrophic to the system. The F-RAM devices also offer virtually unlimited endurance, as they are rated for 100 trillion read/writes when compared to traditional nonvolatlie memories, which is useful for storage of vital data in sensor-based applications. Most importantly, these F-RAM devices consume only 300-µA of active power and 6-µA of standby current, allowing for extermely low-power systems for your Bluetooth Low Energy products.

In this project, a custom Bluetooth Low Energy Profile is implemented which includes a hidden Service for receiving new firmware images over Bluetooth Low Energy. Its important to understand two types of PSoC Creator projects when speaking of the bootloading process:

Bootloadable project: The base project that is going to get bootloaded with new firmware

Bootloader project: The project that contains the new firmware that the device is to be upgraded with

In this example project, the user can put the "firmware upgrade mode" or its bootloadable mode by pressing a switch (SW2) on the dev kit. Doing so exposes the hidden Bluetooth Low Energy Service for OTA firmware updates. The bootloading process is implemented by using the Bootloader Component. Refer to this application note (AN86526 PSoC 4 I2C Bootloader) to learn more about the Bootloader Component in detail. Once the dev kit is in the bootloader mode, a new firmware image can bootloaded to it, OTA from the CySmart USB Dongle (included with the BLE Pioneer Kit). The PSoC device on the kit receives this new firmware image over Bluetooth Low Energy and stores is in the I2C-based F-RAM device on the kit. Once the new firmware has been received and stored on the F-RAM, the PSoC bootloads itself with this new firmware to complete the OTA firmware upgrade.

You can download this PSoC Creator project along with a detailed PDF, here from GitHub:

   Wearable Watch Image

   Image property of