7 Replies Latest reply on Mar 4, 2016 8:03 AM by userc_3104

    Firmware Bank Identification and Switch

      When updating the BCM20736E over UART, the 1st firmware bank is updated.

      If we then perform a firmware update OTA, it switches to the 2nd firmware bank and 'corrupts' the first.


      Any subsequent updates of the firmware using UART will only overwrite the firmware in the first bank.

      But because the device is running from the second bank, we cannot get these updates to take effect.

       

      Is there any way to force the device to run from the 1st bank of firmware so that when it reboots the new firmware loaded will execute?

        • 1. Re: Firmware Bank Identification and Switch

          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.

          • 2. Re: Firmware Bank Identification and Switch

            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.

            • 3. Re: Firmware Bank Identification and Switch

              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.

              • 4. Re: Firmware Bank Identification and Switch

                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.

                • 5. Re: Firmware Bank Identification and Switch

                  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?

                  • 6. Re: Firmware Bank Identification and Switch

                    > 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.

                    • 7. Re: Firmware Bank Identification and Switch

                      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.

                      1 of 1 people found this helpful