RAFW Flexible Software Package Documentation  Release v2.0.1

 
Over The Air update (rm_ota_w)

Middleware for the OTA module on RAFW. This module implements the OTA Interface.

Overview

Features

Configuration

The OTA (Over The Air FW update) module must be added by the user to enable OTA functionality.
The operating state of the OTA module can be set via the RAFW Configuration.
When the OTA stack will be added, the relevant files will be ported.
In startup the user will be able to use the API functions mentioned in this document.

Build Time Configurations for rm_ota_w

The following build time configurations are defined in fsp_cfg/rm_ota_w_cfg.h:

ConfigurationOptionsDefaultDescription
Parameter Checking
  • Default (BSP)
  • Enabled
  • Disabled
Default (BSP) If selected code for parameter checking is included in the build. The Default (BSP) value is BSP_CFG_PARAM_CHECKING_ENABLE. It is the value of RRQ Common|Parameter checking under BSP
WIFI Task Support
  • Enable
  • Disable
Enable Enable support OTA on WIFI task.

Configurations for System > OTA (rm_ota_w)

This module can be added to the Stacks tab via New Stack > System > OTA (rm_ota_w).

ConfigurationOptionsDefaultDescription
NameName must be a valid C symbolg_ota0 Module name.

Usage Notes

Performance

OTA (Over The Air) refers to FW updates over the air. Supporting OTA update: DOWNLOAD and SWAP. The download is the process of downloading firmware from the server or host and storing it into the SFLASH area. The download sequence proceeds as follows, and both success and failure results can be delivered through the callback function: The swap only operates when the firmware download is successful. Download history should be available after power on.

Examples

OTA_W Example

This is a basic example of basic use of the OTA_W in an application.

void rm_ota_w_basic_example (void)
{
fsp_err_t err = FSP_SUCCESS;
/* Open the ota instance with initial configuration. */
err = RM_OTA_W_Open(&g_ota_example_ctrl, &g_ota_example_cfg);
assert(FSP_SUCCESS == err);
err = RM_OTA_W_GetImageInfo(&g_ota_example_ctrl, RM_OTA_W_TYPE_RTOS, RM_OTA_W_STOR_RTOS_0_ADDR, &info_image_example);
err = RM_OTA_W_GetImageInfo(&g_ota_example_ctrl, RM_OTA_W_TYPE_RTOS, RM_OTA_W_STOR_RTOS_1_ADDR, &info_image_example);
assert(FSP_SUCCESS == err);
err = RM_OTA_W_BootIdxGet(&g_ota_example_ctrl, &boot_idx_example);
assert(FSP_SUCCESS == err);
}