cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer shows an error "Error: fireware not authentic" with STM32WB55CC

VBuse
Associate II

When programming a binary file stm32wb5x_FUS_fw into the STM32WB55CC, after the line "RSS Status is RSS_IMAGE_IS_NOT_AUTHENTIC" appears a line "Error: fireware not authentic" in red. Why could an error like that happen and why it is impossible to proigram that file on any PC (I tried different!)? Any advice would be highly appreciated.

8 REPLIES 8
Remi QUINTIN
ST Employee

Assuming you are sending the correct commands, I would advise you to

1) Set RDP option byte (read protection) to 0xBB = set to level 1

2) Set the RDP option byte back to 0xAA (set to level 0). This will erase the non-secure part of the chip up to the SFSA location in Flash memory.

Then retry to program your flash memory.

The most probable reason to get such RSS_IMAGE_IS_NOT_AUTHENTIC error is some previous data still remaining somewhere at the location where the new FW is expected to be loaded. This could confuse the current FUS looking for a header and performing some checks on its integrity.

Another precaution while programming the flash memory is to wait a few seconds in between the FUS update and a RF stack update as the FUS update requires some checks to be perform before moving the validated FUS to its final location. This can take time. If you send the next command too early, the RF stack may partially overwrite the location where the new FUS was loaded, leading to also an RSS_IMAGE_IS_NOT_AUTHENTIC error.

VBuse
Associate II

Thanks a lot Remi, with your help I managed to overcome that error and get to the final error boss!

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

                      STM32CubeProgrammer v2.1.0

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

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : DFU in FS Mode

SN         : 2065369C3136

FW version : 0x011a

Device ID  : 0x0495

Device name : STM32WBxx

Flash size : 256 KBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

Download firmware image at address 0x80cc000 ...

Memory Programming ...

Opening and parsing file: stm32wb5x_BLE_Stack_fw.bin

 File         : stm32wb5x_BLE_Stack_fw.bin

 Size         : 162908 Bytes

 Address      : 0x080CC000

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [204 243]

Download in Progress:

██████████████████████████████████████████████████ 100%

File download complete

Time elapsed during download operation: 00:00:02.075

RSS state is RSS_SERVICE_ONGOING

RSS status is RSS_IMAGE_NOT_FOUND

RSS state is RSS_IDLE

RSS status is RSS_NO_ERROR

Firmware Upgrade process started ...

Updating firmware ...

Waiting for firmware upgrade end

RSS state is WIRELESS_STACK_UPGRADE_ONGOING

RSS status is RSS_IMAGE_NOT_FOUND

Warning: Firmware upgrade Error!Retrying...

Retry -- 0

The programmer tries loading three times in a row, then says

Firwmware upgrade failed after 3 retries! Deleting firmware and exiting...

What do I do with it I have no idea.

Remi QUINTIN
ST Employee

​Did you performed a fwdelete command?

I am suspecting there is not enough space for the RF FW. The size of the RF stack is 160 sectors and looking at the number of sector the FUS erased (243 -204 = 39), it is not enough as  204 + 160 = 364.

the fwdelete commans erases the previous RF stack and put the SFSA back to the end of the FUS area, freeing all that space for a  new RF stack.

VBuse
Associate II

Thanks again for your help! Yes, I used the command fwdelete and got no results. Number of sectors that must be erased depends on the size of bin-file automaticaly. The first sector is appointed by the install address of release notes. If for a small file I appoint an address from the big file, erasing stops earlier than it gets to sector 243. For example, file stm32wb5x_rfmonitor_phy802_15_4_fw.bin occupies seven (7) sectors and stops at 243 by default. And it doesn't upload too.

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=usb1 -fwdelete

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

                      STM32CubeProgrammer v2.1.0

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

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : DFU in FS Mode

SN         : 205D369E3136

FW version : 0x011a

Device ID  : 0x0495

Device name : STM32WBxx

Flash size : 256 KBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

RSS state is RSS_SERVICE_ONGOING

RSS status is RSS_IMAGE_NOT_FOUND

RSS state is RSS_IDLE

RSS status is RSS_NO_ERROR

Deleting firmware ...

Firmware delete finished

fwdelete command execution finished

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade stm32wb5x_BLE_St

ack_fw.bin 0x080CC000 firstinstall=0

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

                      STM32CubeProgrammer v2.1.0

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

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : DFU in FS Mode

SN         : 205D369E3136

FW version : 0x011a

Device ID  : 0x0495

Device name : STM32WBxx

Flash size : 256 KBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

RSS state is RSS_SERVICE_ONGOING

RSS status is RSS_IMAGE_NOT_FOUND

RSS state is RSS_IDLE

RSS status is RSS_NO_ERROR

Old Firmware delete ...

Deleting firmware ...

Firmware delete finished

RSS state is RSS_SERVICE_ONGOING

RSS status is RSS_IMAGE_NOT_FOUND

RSS state is RSS_IDLE

RSS status is RSS_NO_ERROR

Download firmware image at address 0x80cc000 ...

Memory Programming ...

Opening and parsing file: stm32wb5x_BLE_Stack_fw.bin

 File         : stm32wb5x_BLE_Stack_fw.bin

 Size         : 162908 Bytes

 Address      : 0x080CC000

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [204 243]

Download in Progress:

██████████████████████████████████████████████████ 100%

File download complete

Time elapsed during download operation: 00:00:01.903

RSS state is RSS_IDLE

RSS status is RSS_NO_ERROR

Firmware Upgrade process started ...

Updating firmware ...

Waiting for firmware upgrade end

RSS state is WIRELESS_STACK_UPGRADE_ONGOING

RSS status is RSS_IMAGE_NOT_FOUND

Warning: Firmware upgrade Error!Retrying...

Retry -- 0

Remi QUINTIN
ST Employee

​Could you download all the obtion bytes? It seems there is some protection wet somewhere.

Could you also confirm the FUS version (V1.0.2) at address 0X20030030?

Remi QUINTIN
ST Employee

​My mistake!!!  Flash sector are 4K, which means only 40 sectors need to be  erased to load a 160 KB inary. So the erasure phase is correct. The issue is somewhere else.

VBuse
Associate II

I changed the address of the beginning of loading to 0x08018000 so that ther last sector was 63 and the flash of BLE stack was successfull. It depends of the flashsize.

Remi QUINTIN
ST Employee

​Indeed as it a 256 KB flash device. I should have noticed it. good!