Android APP CC2640R2F OTA process
1. Mirror (bin file) Verify
A.
FFC1 write (10:00) to open the notification
ffc2 write (10:00) to open the notification
FFC 5 is written (10:00) to open the notification
sent CMD 01 (1byte) to ffc5, 3Byte returned (second byte is returns the need to modify the size mtu
OAD_BLOCK_SIZE)
the Get the OAD the Command Block size 0x01 0 None
the Get the OAD the Response Block size 0x01. 3 OAD_BLOCK_SIZE
B content header checksum:
OAD Image Identification Value
1. Whether the image is identified OAD CC2640R2F is 0x20474D492044414f (ASCII for 'OAD IMG') 2. Let OAD Target to quickly identify the legitimacy of the mirror.
The means for the BIM A 3.Provides to Find The Start of The Flash containing OAD Page Image for ON-Chip OAD
the BIM Version
the BIM determines the correct version
Image Header Version
verify correct image
Image Information
Providing detailed image about the state and type of OAD The message is below:
Image Length
total length of the mirror, the For the On-Chip the OAD, The size of Word The CC2640R2F IS fixed.is
defined by EFL_OAD_ADDR_RESOLUTION
Software Version
modify the application with the mirror and stack comprising
C. successful verification Mirror
image verification is successful returns a byte FFC1 (00 success), Start OAD ' command. Need to turn
OTA, FFC5. OAD Target success after opening into the configuration state, and returns cmd 12 and the desired a first
block number sequence number, then the first block starts sending the Target to the OAD
the start Process the OAD the Command 0x03 None 0
the start Process the OAD the Response Byte 0 0x03. 5: the Command ID (0x03) Byte 1-3: Block number The
2. The image transmission block
Ensure that the notice is opened
mirror Char block write response, the CMD (0x12)
Image Char the Write Block the Response Byte 0 0x12. 6: the Command ID (0x12) Byte. 1: The Previous Block receivedByte the Status of 2-5: Block Number
byte1 values:
The success of the transmission block returns, the first byte sent is the request FFC2 Block number
4. If the completion of downloading the entire file bin, OAD Target device and the response status code OAD_DL_COMPLETE Block
Number to 0xFFFFFFFF.
After 5.bin file download is complete, you receive OAD_DL_COMPLETE, need to send the OTA Target 0x04 for verification.
After successful authentication OTA Target will be burning, burn successfully 20s disconnects Bluetooth, reconnect
Enable OAD Image Command 0x04 0/4 LEN = 0: noneLEN = 4: Image type and image number of image to be downloaded
Enable OAD Image Response 0x04 2 Byte 0: Command ID (0x04)Byte 1: Return Status
3.OTA complete
接收完整镜像像后,如果CRC匹配会跳转到‘End’状态。
The application then checks if there are more waiting to download the image. If so, the application will be returned to the mirror download status. If
there are no more image download, OAD Target will check whether the downloaded image should be copied to the internal flash.
If you have received enabled OAD Target command, the new image will be copied to the internal flash memory, the device will be reset. If not, mirroring the current resident will continue normally.
4.OTA timing diagram
5.http://software-dl.ti.com/lprf/simplelink_cc2640r2_latest/docs/blestack/ble_user_guide/html/ble-stack-3.x-guide/reference.html
TI 官方OTA 介绍