Do you mean old firmware (updated through OTA) still runs after succeeded UART update?
Does "over UART" mean PUART update like uart_firmware_upgrade?
If yes, it uses same ws_upgrade.c with ota_firmware_upgrade.
So the bank will be switched automatically after successfully downloading I think.
Yes, the firmware that was loaded OTA will still be the code executed after loading new firmware over UART.
I do not believe you can load the device firmware over the configured peripheral UARTs.
I could be wrong but I was referring to the HCI UART.
So you mean programming firmware through HCI UART after OTA update successful once?
I think it should work but I'll try it and feedback to you.
When I tried this firmware bank switches and new firmware runs successfully.
Please check it again?
Below is my procedure.
1. Program firmware A (like ota_firmware_upgrade) through HCI UART (by IDE)
-> Successful and confirmed A runs
2. Update firmware through OTA to firmware B (like mybeacon)
-> Successful and confirmed B runs
3. Program firmware C (like hello_sensor) through HCI UART (by IDE)
-> Successful and confirmed C runs
If you can't see firmware C after 3, please check Chipload log in build directory.
And also it's better to change BT_DEVICE_ADDRESS at step.3.
Why would I need to change the MAC address of the device?
Is that just to verify that the header in the firmware file loaded successfully?
> Why would I need to change the MAC address of the device?
Peer may remember old information used by old firmware.
For example, if you modified GATT_DB, it may not appear on your smartphone.
Changing BD_ADDR is easy way to let peer displays new GATT_DB.
(You can use UUID_CHARACTERISTIC_SERVICE_CHANGED instead.)
I also reply to your old question as below.
> How could you tell what firmware bank you were running from originally?
I think following two case can be assumed before verified your question.
case1: the first bank is used before HCI update at step1
case2: the second bank is used before HCI update at step1
If HCI update doesn't switch bank number as you doubt,
firmwares runs after updating should be;
case1: step1->A(bank1), step2->B(bank2), step3->B(bank2).
case2: step1->Z(something in bank2), step2->B(bank1), step3->C(bank1).
But my result shows; step1->A, step2->B, step3->C.
And this means HCI update switches bank correctly.
1 of 1 people found this helpful
I have the same issue using chipload utility over the HCI uart. The chip load utility will only update bank 0. If the code is running code A from bank 1 and i initiate chipload utility to update the firrmware code b, it will indicate success, but I will still be running code A from bank 1. To do a firmware update via chipload, I have to ensure that the BTM is running from bank 0.