TI CC2541 supports multiple hardware and software to perform air upgrades on it. There are different combinations of hardware.
Currently available software includes
It is relatively easy to get the hardware together to implement over-the-air upgrades with the A2 combination, but you need to pay attention to the serial port configuration of A, and do not use flow control. If it is an A1 combination, you can find very detailed instructions on ti.com. Other software can basically run directly on the corresponding platform without the need for additional hardware.
After the hardware is ready, prepare an image B for upgrading. The SimpleBLEPeripheral project in TI-BLE Stack 1.4.0 has a CC254x-OAD-Img B option. Just compile it as is to generate a bin file. It will be the protagonist of the subsequent over-the-air upgrade. For the sake of explanation, we might as well name the generated file imgBSample.bin.
The time to transfer imgBSample.bin is different in each combination. Usually the generated bin file is just over 100kb. It may take 3 to 4 minutes to complete it using BLE transmission on these platforms, which is not much different. But if you use the native Image A, it will take almost 18 minutes on Windows 8/10. This is very slow. If you want to shorten this time, the secret is to adjust the connection parameters. I used Bluetooth LE OAD Tool (WIN 10) to simply test the impact of connection parameters on transmission time, which is roughly as follows.
Note: The connection interval 1 here represents 1.25ms
Figure 1: Newbit Bluetooth LE OAD Tool interface
After the transfer is completed, the system automatically restarts and then runs the imgBSample.bin program. However, the following problem is often encountered: after the transfer is completed, the new program should be run after self-reset, but it must be manually reset to run normally. It is recommended to use a development board to verify. If the development board can automatically restart and run normally, it means that the program is correct. Then you need to check the hardware, such as power supply, whether there is a 32K crystal, etc.
After completing all the above tasks, you have fully experienced the over-the-air upgrade. If you just do this, it is still a demo, not the over-the-air upgrade required by a product. A complete over-the-air upgrade should also have complete protection measures, such as the identity confirmation of the upgraded client, the processing after the upgrade fails, and even the breakpoint interruption can be considered. It is said that Nordic can achieve incremental upgrades, which can greatly shorten the upgrade time, but it is not clear how it is implemented. Of course, I will not say more about these for the time being. If you are interested in this article, we can make a boot, image A firmware on 2541, and a template for image B based on the over-the-air upgrade described in this article.
Attached is the default value of BLE connection parameters for windows 10, ios 8.3, miui 6
|