cancel
Showing results for 
Search instead for 
Did you mean: 

FUS_IMAGE_ERSERROR from FUS while FW upgrade

rmedaer
Associate II

Hi there,

On a STM32WB55RG, I would like to write a routine in my firmware to upgrade the wireless firmware through the FUS mailbox.

I'm able to exchange request/response through the mailbox, for instance, at startup FUS_GET_STATE returns FUS_STATE_IDLE, no error. Cool.

I load a wireless firmware at the address indicated in the Release Notes (for instance stm32wb5x_BLE_HCILayer_fw.bin at 0x080E1000), however when I run FUS_FW_UPGRADE, the chip reset as expected and right after this reset, the

  • FUS state value is 0x10; FUS_STATE_FW_UPGRD_ONGOING (according to AN5185)
  • FUS state error value is 0x06; FUS_IMAGE_ERSERROR (still according to AN5185)

Having no clue about the routine inside FUS firmware, could you help me to identify what's the root cause behind that. Btw, I have the same issue if I want to upgrade the FUS firmware itself.

While this description might lack some details, it's mainly because I don't know what to look for in registers or options to solve this. Let me know if you need more information.

Many thanks,

R.

6 REPLIES 6
STTwo-32
ST Employee

Hello @rmedaer and welcome to the ST Community.

Could you please check if the FLASH_ECCD error is activated (reading the FLASH_ECCR using the SWD). Also, check if the option bytes are corrupted (write any correct value in WRP1AR (or any other registers) and check if they are written correctly after a system reset). Also, If SFSA is 0x00, write the value 0x00008000 at the address 0x5800040C, wait for ~30 seconds then activate reset the device. If RDP Level1 is not active, activate RDP level1 then reset the device and activate RDP level0. Then repeat the whole operation again from first step.

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Lubos KOUDELKA
ST Employee

Hello,
are you aware of STM32WB-FUS-Command-Line-Interface example? Is it the way how you would like to update your wireless FW?

Best regards,
Lubos

 

Hi.
Yes, I'm aware of FUS command line example. However that's not the way I would like to update the wireless firmware. Indeed, I would like to update the wireless firmware from my user application. I already tested the upgrade through ST tools (for instance STM32CubeProgrammer) and it works well. However, I now want to update it through my own user application, not with ST tools, nor ST system memory bootloader. 

Hi @STTwo-32 ,
Thanks for your answer. I checked FLASH_ECCD error. There is none.
But... I have a new hint about my issue:

  • The wireless firmware upgrade works well when I use STM32CubeProgrammer, (same wireless fw, same address) so I guess, the issue is not the chip nor the options bytes, but it's linked to my user application.
  • I tested 2 scenario, mixing STM32CubeProgrammer and my user application, here is the result:
    • When I start the upgrade (load wireless firmware + 0xFC54 aka FUS_FW_UPGRADE cmd) via my user application, AND it reset on the bootloader, it works!
    • When I start the upgrade with STM32CubeProgrammer, and it reset on my user application, I get the same FUS_IMAGE_ERSERROR error.

I conclude from this test that:

  • the issue is not the placement of the wireless firmware (address), nor the wirelessfirmware itself
  • the issue is not link to the command I send (since it works when it resets on ST system bootloader)
  • the issue is most likely due to my initialization after the reset of the MCU, I guess that;
    • either I miss something during the startup of my device
    • either I do something (that the bootloader doesn't do) which ends up to FUS_IMAGE_ERSERROR

Does it ring a bell to you ?

Many thanks,

R.

Hi,
reading your requirement I believe it's exactly what STM32WB-FUS-Command-Line-Interface application it's doing. It's "user" application running on CPU1, which is intended for wireless stack update. I believe based on this example you could be able to reach your intended functionality. Please check application in the link.

Hi @Lubos KOUDELKA ,

 

I indeed checked and tested the application in the link. While it's indeed aligned with what I want to implement, I still want to make it work in my user application code.

The issue is that it doesn't for now and I have no clue why. Is it because I use USB instead of UART ? Is it because I misconfigured some clocks ? Is it because <insert here solution> :) ?

I still don't know and I don't have more hint...

 

Would it be possible for ST team to check internally (in FUS) in which case this error is raised ?