Application OTA DFU#
Component that provides over-the-air (OTA) device firmware update (DFU) functionality in user application during runtime. No need to enter a specialized OTA state to update, and no AppLoader utility required. No code is required from user to enable this component.
Modules#
sl_bt_app_ota_dfu_btl_storage_info_t
sl_bt_app_ota_dfu_download_package_t
Enumerations#
enum
SL_BT_APP_OTA_DFU_UNINIT = 0
SL_BT_APP_OTA_DFU_INIT
SL_BT_APP_OTA_DFU_READ_FLASH
SL_BT_APP_OTA_DFU_ERASE
SL_BT_APP_OTA_DFU_READY
SL_BT_APP_OTA_DFU_DISCONNECT
SL_BT_APP_OTA_DFU_DOWNLOAD_BEGIN
SL_BT_APP_OTA_DFU_DOWNLOAD_END
SL_BT_APP_OTA_DFU_VERIFY
SL_BT_APP_OTA_DFU_FINALIZE
SL_BT_APP_OTA_DFU_WAIT_FOR_REBOOT
SL_BT_APP_OTA_DFU_ERROR
}
enum
SL_BT_APP_OTA_DFU_NO_ERROR = 0
SL_BT_APP_OTA_DFU_ERR_GENERIC
SL_BT_APP_OTA_DFU_ERR_UNEXPECTED_TRANSFER
SL_BT_APP_OTA_DFU_ERR_UNEXPECTED_CLOSE
SL_BT_APP_OTA_DFU_ERR_BOOTLOADER_API
SL_BT_APP_OTA_DFU_ERR_STORAGE_FULL
SL_BT_APP_OTA_DFU_ERR_INIT
SL_BT_APP_OTA_DFU_ERR_ACQUIRE
SL_BT_APP_OTA_DFU_ERR_RELEASE
}
enum
SL_BT_APP_OTA_DFU_EVT_BTL_STORAGE_INFO_ID = 0u
SL_BT_APP_OTA_DFU_EVT_STATE_CHANGE_ID
SL_BT_APP_OTA_DFU_EVT_DOWNLOAD_PACKET_ID
SL_BT_APP_OTA_DFU_EVT_VERIFY_IMAGE_ID
}
Typedefs#
typedef struct sl_bt_app_ota_dfu_msg_t
Functions#
sl_status_t
void
sl_bt_app_ota_dfu_reboot(void)
void
sl_bt_app_ota_dfu_on_status_event(sl_bt_app_ota_dfu_status_evt_t *evt)
Macros#
#define
SL_BT_APP_OTA_DFU_CONFIG_PRIORITY APP_RTA_PRIORITY_NORMAL
#define
#define
#define
#define
#define
SL_BT_APP_OTA_DFU_EMPTY_FLASH_CONTENT 0xFFFFFFFFu
#define
Enumeration Documentation#
sl_bt_app_ota_dfu_status_t#
sl_bt_app_ota_dfu_status_t
Enumerator | |
---|---|
SL_BT_APP_OTA_DFU_UNINIT | |
SL_BT_APP_OTA_DFU_INIT | |
SL_BT_APP_OTA_DFU_READ_FLASH | |
SL_BT_APP_OTA_DFU_ERASE | |
SL_BT_APP_OTA_DFU_READY | |
SL_BT_APP_OTA_DFU_DISCONNECT | |
SL_BT_APP_OTA_DFU_DOWNLOAD_BEGIN | |
SL_BT_APP_OTA_DFU_DOWNLOAD_END | |
SL_BT_APP_OTA_DFU_VERIFY | |
SL_BT_APP_OTA_DFU_FINALIZE | |
SL_BT_APP_OTA_DFU_WAIT_FOR_REBOOT | |
SL_BT_APP_OTA_DFU_ERROR |
Definition at line
51
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
sl_bt_app_ota_dfu_error_t#
sl_bt_app_ota_dfu_error_t
Enumerator | |
---|---|
SL_BT_APP_OTA_DFU_NO_ERROR | |
SL_BT_APP_OTA_DFU_ERR_GENERIC | |
SL_BT_APP_OTA_DFU_ERR_UNEXPECTED_TRANSFER | |
SL_BT_APP_OTA_DFU_ERR_UNEXPECTED_CLOSE | |
SL_BT_APP_OTA_DFU_ERR_BOOTLOADER_API | |
SL_BT_APP_OTA_DFU_ERR_STORAGE_FULL | |
SL_BT_APP_OTA_DFU_ERR_INIT | |
SL_BT_APP_OTA_DFU_ERR_ACQUIRE | |
SL_BT_APP_OTA_DFU_ERR_RELEASE |
Definition at line
67
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
sl_bt_app_ota_dfu_event_id_t#
sl_bt_app_ota_dfu_event_id_t
Enumerator | |
---|---|
SL_BT_APP_OTA_DFU_EVT_BTL_STORAGE_INFO_ID | |
SL_BT_APP_OTA_DFU_EVT_STATE_CHANGE_ID | |
SL_BT_APP_OTA_DFU_EVT_DOWNLOAD_PACKET_ID | |
SL_BT_APP_OTA_DFU_EVT_VERIFY_IMAGE_ID |
Definition at line
80
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
Typedef Documentation#
sl_bt_app_ota_dfu_status_evt_t#
typedef struct sl_bt_app_ota_dfu_msg_t sl_bt_app_ota_dfu_status_evt_t
Definition at line
130
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
Function Documentation#
sl_bt_app_ota_dfu_restart_progress#
sl_status_t sl_bt_app_ota_dfu_restart_progress (void )
Parameters
N/A |
Function to restart application OTA DFU progress without rebooting in case of any error.
Returns
status of the operation
Definition at line
138
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
sl_bt_app_ota_dfu_reboot#
void sl_bt_app_ota_dfu_reboot (void )
Parameters
N/A |
Function to reboot only when the application OTA DFU process is already in the SL_BT_APP_OTA_DFU_WAIT_FOR_REBOOT state.
Definition at line
144
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
sl_bt_app_ota_dfu_on_status_event#
void sl_bt_app_ota_dfu_on_status_event (sl_bt_app_ota_dfu_status_evt_t * evt)
Parameters
[in] | evt | Actual app ota dfu event address. |
Function to indicate Application OTA DFU status and in case of error the error codes for assertion. Note
To be implemented in user code.
Definition at line
152
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
Macro Definition Documentation#
SL_BT_APP_OTA_DFU_CONFIG_PRIORITY#
#define SL_BT_APP_OTA_DFU_CONFIG_PRIORITYValue:
APP_RTA_PRIORITY_NORMAL
Definition at line
49
of file common/app_ota_dfu/config/sl_bt_app_ota_dfu_config.h
SL_BT_APP_OTA_DFU_CONFIG_STACK#
#define SL_BT_APP_OTA_DFU_CONFIG_STACKValue:
1024
Definition at line
53
of file common/app_ota_dfu/config/sl_bt_app_ota_dfu_config.h
SL_BT_APP_OTA_DFU_CONFIG_WAIT#
#define SL_BT_APP_OTA_DFU_CONFIG_WAITValue:
10
Definition at line
57
of file common/app_ota_dfu/config/sl_bt_app_ota_dfu_config.h
SL_BT_APP_OTA_DFU_USED_SLOT#
#define SL_BT_APP_OTA_DFU_USED_SLOTValue:
0u
Definition at line
43
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
SL_BT_APP_OTA_DFU_READ_STORAGE_CONTEXT_SIZE#
#define SL_BT_APP_OTA_DFU_READ_STORAGE_CONTEXT_SIZEValue:
256u
Definition at line
46
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
SL_BT_APP_OTA_DFU_EMPTY_FLASH_CONTENT#
#define SL_BT_APP_OTA_DFU_EMPTY_FLASH_CONTENTValue:
0xFFFFFFFFu
Definition at line
47
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h
SL_BT_APP_OTA_DFU_VERIFICATION_BLOCK_SIZE#
#define SL_BT_APP_OTA_DFU_VERIFICATION_BLOCK_SIZEValue:
128u
Definition at line
48
of file common/app_ota_dfu/sl_bt_app_ota_dfu.h