OTA upgradable stack FW update failes with CySmart

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
FrSt_4749731
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

Hello to all,

I am testing the OTA FW upgradable stack using the CySmart for the following scenario:

- device using the BLE Stack v3.30 in bootloader mode

- use a new BLE image build with the BLE Stack v3.66

- start OTA FW update using the combined files option

The CySmart fails with the message: Firmware_update_cancelled. Error: CYRET_ERR_ROW

NOTE: If I use new BLE image build with the BLE Stack v3.30 then the update can be made with success.

Thanks for the answer, Frenk

0 Likes
1 Solution

It working now. As I see it for the upgradable OTA you need to use:

- CySmart with the OTA and option separate files

- When upgrading from BLE v3.30 to the v3.66 (and other higher versions) you need to have identical Launcher project, even a slight change in the code caused that after the update the Stack was not properly started by the Launcher.

Best regards, Frenk

View solution in original post

0 Likes
9 Replies
FrSt_4749731
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

Further information on testing.

As I have found out, the FW with the BLE stack v3.66 is smaller and though the .cyacd file is having different array/row numbers which are too small and actually pointing to the first section of the flash (BLE 256kB).

As I understood for the OTA FW upgradable, the second section of the flash is used as a temporary location to download the FW image. After that launcher copies it to the first section. But as new launcher+stack+app is smaller than the current one I get this error because active section of the flash the writing is happening on the active flash section which is not allowed.

I then set in the Bootloadable component the "Manual application image placement", but this only solved the download problem. After the download the device does not start. If I write the same FW image using the programmer, device is working fine.

Then I tried and added dummy array to increase the FW image. Now I could again make the download, but sadly device also does not start.

Did anyone experience this problem when migrating from BLE stack v3.30 to v3.66?

Thanks again for any clues in solving this mystery.

0 Likes
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi Frenk,

This is expected behavior only. In case of Bootloader and OTA projects, it is required to use same version of Bootloader, BLE component in te Stack and application projects.

So in case if you want to update your application with new BLE component, you need to update the Stack project also.

Thanks

Ganesh

0 Likes

Hello Ganesh,

Thanks for the answer.

I just want to confirm that I updated the BLE to 3.66 for projects OTA Stack and OTA Application. But the OTA FW upgrade is not working.

If I understand correctly you answer the I can summarize it:

- We have projects OTA stack and OTA application using BLE v3.30 and we make FW image which is running on the device.

- We update our projects OTA stack and OTA application to the BLE v3.66 and make new FW image (combined which will include bootloader, stack and application)

- Now we want to upgrade the FW on the device with the new FW image. As we changed the BLE version we can not perform the FW upgrade using OTA approach. The only option is to use the programmer. Am I correct?

     If yes, what is then the purpose of having OTA stack upgradable? Just to upgrade fixes?

Best regards and thanks for the answers, Frenk

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Frenk,

Now we want to upgrade the FW on the device with the new FW image. As we changed the BLE version we can not perform the FW upgrade using OTA approach. The only option is to use the programmer. Am I correct?

If yes, what is then the purpose of having OTA stack upgradable? Just to upgrade fixes?

No. The BLE Upgradable stack project is capable of upgrading the different BLE components.

Please ensure that the Bootloader, Bootloadable, cy_boot components of the Stack, Launcher and Applications projects are of same version. You can select these versions when you click on Project --> Update Components.

Can you please check with attached project and let me know whether it is allowing you to upgrade firmware when stack is changed? I tried with this project and it is allowing me to change the BLE component versions and Bootload.

If the above project works for you, please attach sharable version of your project which is not working.

Thanks

Ganesh

Dear Ganesh,

Could you please attach the project?

Will recheck everything, but I think only BLE component was updated and nothing else. Thanks for the clues.

One more thing:

I tried to perform OTA update using the same BLE v3.30, but FW images of different sizes (one 138 kB, the other 134 kB)

When I use new FW image OTA FW update that is smaller (few kB) than the current image on the device and try to perform the FW OTA update I get error: CYSMART_ERR_ROW. From what I understand and could see in the code the flashing is trying to write on the flash row that is protected (active).

What I found out was, that the PSoC Creator v4.2 outputs different .cyacd files:

Snippets:

v3.30 (OTA working):

----------------------------

1A6B11AA0000

:0001F701000….

:0001F801004….

v3.30 (OTA not working):

----------------------------------

1A6B11AA0000

:0001ED010000…

:0001EE010043…

As you can see the row number is smaller and this is the reason OTA FW update is failing. I then tried to setup the Bootloadable component parameter “Manual application image placement”.

No I got following .cyacd file:

1A6B11AA0000

:0100010100008000…

:010002010043221A…

I could download the image to the device, but after that device was stuck. I see Launcher started, but then nothing and the only way I could make device working was to flash it with the programmer.

Then I tried adding simple dummy array just to fake and make image bigger. It helped and I could again download the image with success, but again device was stuck.

Questions:

  • As we are using OTA FW upgradable stack and from the documentation flash should be split into 2 sections and the second section is used as temp for the downloaded files. I would assume always to start with the Array: 1 and Row: 0.
    • So why does creator creates different .cyacd files with different array/row numbers?
    • How can we tell the creator to always set the same array/row number in the .cyacd?

Thanks for your support, I really appreciate it, Frenk

0 Likes

Dear Ganesh,

I have checked and 3 projects are using the same components version:

- cy_boot 5.80

- bootloader/bootloadable v1.60

- BLE v3.30

I then updated only the BLE to the v3.66

Best regards, Frenk

0 Likes

Dear Ganesh,

I hope you did not forget about me and are not too busy to support me. Thanks again for being so patient and helpful all the time. I really learned a lot from you.

Here is some update of me trying to perform OTS from v3.30 to v3.66. It seem that the OTA FW went through with success, Launcher_start() was properly executed and everything was fine up to the call LaunchApplicaton(). I see that the App v3.66 is started, but the device is not working.

The BLE stack seems to be updated as when I use CyBle_GetStackLibraryVersion() I get for the old v03.03 and for the new I get v03.0E. Of course the numbers are not as I would expect them. I just print out the major.minor version.

Am still investigating further.

Best regards, Frenk

0 Likes

Dear Ganesh,

Ok, now I see where I made a mistake. I was using CySmart with combined files in the Upgradable OTA Stack. My mistake :-(. I have corrected this and am now using proper stack FW file v3.66. I also performed the FW OTA upgrade using now the option separate stack and app files. But sadly its still not working. As I have checked the launcher does copy the image and set metadata. And here everything seems to be ok, but when the stack should be started its again launcher that is started. It came to the:

    if (CYRET_SUCCESS == copyStatus)
    {
        /* Schedule*/
        Launcher_SET_RUN_TYPE(Launcher_SCHEDULE_BTLDB);

        /* Software reset */
        CySoftwareReset();
    }

But stack is not started, I don't see that the main() of the stack is entered. Am I missing something?

Thanks for the answer, Frenk

It working now. As I see it for the upgradable OTA you need to use:

- CySmart with the OTA and option separate files

- When upgrading from BLE v3.30 to the v3.66 (and other higher versions) you need to have identical Launcher project, even a slight change in the code caused that after the update the Stack was not properly started by the Launcher.

Best regards, Frenk

0 Likes