uart_firmware_upgrade example with big images (~25KB)

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

cross mob
Anonymous
Not applicable

I've noticed that if I try to upload a bigger image (~25KB) then uart_firmware_upgrade code fails on crc calculation stage, when calling ws_upgrade_verify().

Seems this is related to some internal timers which don't allow you to stay in interrupt handler code (ws_upgrade_uart_interrupt_callback() in this case) for more than 3-4 seconds.

Did anybody experience the same problem?

Is there any workaround or fix for this?

I'm using WICED Smart SDK 2.2

0 Likes
1 Solution
VictorZ_46
Employee
Employee
5 comments on blog 25 sign-ins 250 likes received

I am guessing is that it take too long to read downloaded image during verification so watch dog timer triggers.  In the ws_upgrade_verify in the loop where image is read add wdog_restart().  Hope it helps.

View solution in original post

0 Likes
3 Replies
VictorZ_46
Employee
Employee
5 comments on blog 25 sign-ins 250 likes received

I am guessing is that it take too long to read downloaded image during verification so watch dog timer triggers.  In the ws_upgrade_verify in the loop where image is read add wdog_restart().  Hope it helps.

0 Likes
Anonymous
Not applicable

Thanks, it helped!

I suspected that it was watchdog but I tried to use bleappfwu_restartWatchdog, I didn't know of wdog_restart.

I wonder now what bleappfwu_restartWatchdog is for?

0 Likes

The ota secure firmware upgrade sample uses wdog_restart. It works.

0 Likes