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

AIROC™ Bluetooth

wenchilo
Level 3
First like received 25 replies posted 25 sign-ins
Level 3

Hi cypress team, 

I am working on CYBT-343026 and trying to transport the .ota.bin through uart and update the firmware by myself. I have upgraded the firmware successfully but I have a question is that I have read the pdf

https://www.infineon.com/dgdl/Infineon-WICED_Firmware_Upgrade_Library-Software-v01_00-EN.pdf?fileId=... 

And it says that there are two firmware partition DS1 and DS2 and my firmware will be written to the inactive partition. When the download procedure is completed and the received image is verified and activated, the currently active partition is invalidated, and then the chip is rebooted. After the chip reboots, the previously inactive partition becomes active.

But if I didn't write firmware to flash correctly, After I call wiced_firmware_upgrade_finish(). The whole system seems to be crash.

My question is do I need to verify the image by myself?

If yes, how?

If no, the boot code will check if the image is valid or not. Shouldn't it run the origional image but not the invalid image? 

0 Likes
2 Replies
DheerajPK_41
Moderator
Moderator 750 replies posted 500 likes received 500 replies posted
Moderator

Hi,

The document says as below. Does it addresses your query.

"During firmware upgrade, the device performing the procedure (Downloader) pushes chunks of the new image
to the device being upgraded. The embedded application receives the image and stores it in the external or onchip flash. When all data has been transferred, the Downloader sends a command to verify the image passing a
32-bit CRC checksum. The embedded app reads the image from the flash and verifies the image. For the nonsecure download, the library calculates the checksum and verifies that it matches received CRC. For the secure
download case, the library performs Elliptic Curve Digital Signature Algorithm (ECDSA) verification and verifies
that the Product Information stored in the new image is consistent with the Product Information of the
firmware currently being executed on the device. If verification succeeds, the embedded application
invalidates the active partition and reboots the chip."

Thanks,

-Dheeraj.P.K

0 Likes
wenchilo
Level 3
First like received 25 replies posted 25 sign-ins
Level 3

Hi,

As you said, both secure and nonsecure will verify that if the image is valid or not. But when I download a invalid image to the device. Ater I call wiced_firmware_upgrade_finish(). The device still reboot, why?

0 Likes