cancel
Showing results for 
Search instead for 
Did you mean: 

Wireless Stack Update via OTA bug

AValt.1
Associate II

I am developing with the stm32wb nucleo kit, and I am testing the stBleSensor application, I have tried to update the Wireless Stack sending an erroneous file (pdf), and what happens is that it updates without problem and does not give any error, but the Wireless stack does not work until I program it again via cli commands, at what point is the Wireless stack deleted during the update procedure? Is nothing checked before deleting the previous one and trying to install the new one?

3 REPLIES 3
AValt.1
Associate II

I have noticed that the Option byte SBRV value when that happens is 0x3D000 and after connecting and disconnecting from ST cube Programmer it changes to 0x32C00 and works, why is this and how could i solve it?

AValt.1
Associate II

HI,

  • I have also noticed that when updating with correct BLE Wireless Stack, and after having received update confirmation, sometimes it stays blocked in function SHCI_C2_FUS_GetState() (the proyect Ble_OTA app ) and doesnt return, in that situation, i have tried to reset the board, but it doesnt work, when that happends i have to conect the board as follows:
  • Jumper between CN7.5(VDD) and CN7.7(Boot0)
  • Power ON via USB_USER and Jumper JP1(USB_MCU)

And then when i execute this command via cli --> STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1 i get:

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : DFU in FS Mode

SN     : 20803176554D

FW version : 0x011a

Device ID  : 0x0495

Device name : STM32WBxx

Flash size : 1 MBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

0x20030030 : 00000000

So i have to install the fus again, why is this due to?

AValt.1
Associate II

Hi Remi,

this error was produced because i add in the BLE OTA example 2 Software resets( lines 306 and 354 of app_entry.c.), in order to have an application that could recover after a Wireless Stack Update automatically without any user manual reset or something...

My question now is, i know that i read FUS version 0x0000000, because and error during update process of the Wireless Stack, (the 2 resets that i add in the code), but as in the beggining of the code there is a function: SHCI_C2_FUS_GetState which after 2 calls (check page 3 in https://www.st.com/resource/en/application_note/dm00513965-st-firmware-upgrade-services-for-stm32wb-series-stmicroelectronics.pdf ) should activate FUS and recover the properly Wireless Stack behaviour, why is code execution blocked in that function?.

The only way to recover is:

Send 2 FUS_GET_STATE comands, i dit it via cli commands, conected in usb BOOT mode interface, and then check FUS version wich is correct, then after that everything is ok, i wonder why if BLE_OTA firmware sends that commands at the beginning, it doesnt recover after 2 resets... it stays blocked there.. is it due to different behave when connected in usb Boot Mode?, i did not found documentation about it.

Regards

Alvaro