Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
137
Ver.1.0.0
6. OTA
TLSR8232 supports Flash multi-address booting, addresses including 0, 0x10000,
0x20000, and 0x40000.
To implement OTA for TLSR8232 slave, a device is needed to act as BLE OTA Master,
which can be the Bluetooth device (supporting OTA in APP) combined with Slave, or
simply Telink BLE Master Dongle. In this section, Telink kma dongle is taken as an
example of OTA Master to illustrate how TLSR8232 BLE OTA is realized.
6.1 Flash Architecture and OTA Procedure
6.1.1 Flash Storage Architecture
When boot from 0x20000, in SDK the default firmware size should not exceed 128K, i.e.
the Flash area 0~0x20000 is for storing firmware.
0x00000
0x20000
Firmware_1.bin
0x40000
0x80000
slave
ota_master
0x00000
Ota_master.bin
0x20000
0x40000
Firmware_2.bin
RF
transform
New_firmware
storage area
0x00000
0x20000
Firmware_2.bin
0x40000
slave
ota_master
0x00000
0x20000
Ota_master.bin
0x40000
Firmware_3.bin
RF
t
ra
ns
fo
rm
New_firmware
storage area
OTA of the (2n+1)-th time
OTA of the (2n+2)-th time
0x80000
Figure 6-1 5316F512K Flash Storage Structure
1) OTA Master burns new firmware2 into the Master Flash area starting from 0x20000.
2) OTA for the first time:
a) When power on, Slave starts booting and executing firmware1 from Flash
0~0x20000.
b) When firmware1 is running, the area of Slave Flash starting from 0x20000 (i.e.
Flash 0x20000~0x40000) is cleared during initialization and will be used as
storage area for new firmware.
c) OTA process starts, Master transfers firmware2 into Slave Flash area starting
from 0x20000 via RF. Then Slave sets bootloader to boot from the new firmware
offset and reboots (similar to power cycle).
3) For subsequent OTA updates, OTA Master first burns new firmware2 into the Master
Flash area starting from 0x20000.