cancel
Showing results for 
Search instead for 
Did you mean: 

STM342WB55 after load last BLE stack (1.8.0) I can`t erase fw with STM32CubeProgrammer

Vyacheslav
Senior II

Hi.

Using STM32CubeProgrammer I load last stm32wb5x_BLE_Stack_light_fw.bin, but when after that I try to run command -fwdelete, I get an error : "FUS_NOT_RUNNING".

I attach log file becose Idont understand whot is this.

But me application work fine and I see that stack is a last version.

Please help whot may bee .

I send call:

STM32_Programmer_CLI.exe -c port=usb1 -fwdelete -vb 3

65 REPLIES 65

This is all good, but I'm tired of repeating that I cannot start FUS, the "fwdelete" command does not work, this can be seen from my many logs.

I earnestly ask you to perform the operations in steps as I described starting with the version of FUS 0.5.3.

Our steps:

1. Have a chip whith FUS 0.5.3

2. Ugrade FUS to 1.0.1 or 1.0.2

3. Upgrade FUS to 1.1.0

4. Immediately load last BLE stack light ver 1.8.0 - process was ok, but now command "fwdelete" not work and impossible load any FW (FUS or stack)But ESE bit checked.

I am sure that you will have the same after such steps.

Vyacheslav
Senior II

And how to do this: "In last resort we could activate the safe boot which will reset the chip in its manufactory state." ?

Vyacheslav
Senior II

Where I can find FUS state and status description?

Like what I see in log:

 4:10:00:605 : DFU status = 0

14:10:00:605 : DFU State = 4

14:10:00:605 : DFU status = 0

14:10:00:605 : DFU State = 5

14:10:00:616 : DFU status = 0

14:10:00:616 : DFU State = 9

​As FUS version is V1.1.0, the revertion to the manufactory state can be achieved writing 0x00080000 at address 0x5800040C.

This is a PWR_CR4 ?

And write result is Error

0693W000003QZ1XQAW.png Mey be need to write 0x00008000 (set C2BOOT) ? not 0x00080000.

​Ok I did the sequence on a dongle originally loaded with FUS v0.5.3, the upgraded to V1.0.2 and finally to V1.1.0.

I load the light BLE stack and the p2pserver application.

I was able to connect to the dongle.

Then I issue a fwdelete command and I got the right result. Everything worked well.

Thanks.

Hm, maybe something hardware in our board affects the stack 1.8.0.

I return chip to P-NUCLEO-WB55 board and wil try to repeat sequence.

Vyacheslav
Senior II

Result:

In our custom FW I add code:

SHCI_C2_FUS_GetState(NULL);

SHCI_C2_FUS_GetState(NULL);

while (1)

{

HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);

}

After that

0693W000003QanmQAC.png

ESE stay reset.

And now i can delete stack, load stack 1.6.0 and all work fine.

But when I try to load 1.8.0

GUI tell me an error:

18:41:42 : Time elapsed during download operation: 00:00:02.738

18:41:42 : FUS state is FUS_IDLE

18:41:42 : FUS status is FUS_NO_ERROR

18:41:45 : Firmware Upgrade process started ...

18:41:45 : Updating firmware ...

18:41:45 : Waiting for firmware upgrade end

18:41:45 : FUS state is WIRELESS_STACK_UPGRADE_ONGOING

18:41:45 : FUS status is FUS_NO_ERROR

...

18:43:51 : FUS state is WIRELESS_STACK_UPGRADE_ONGOING

18:43:51 : FUS status is FUS_NO_ERROR

18:43:53 : Firmware upgrade Error!

After that FUS state is:

WIRELESS_STACK_UPGRADE

FUS_NO_ERROR

Then I load stack light 1.6.0 on address 0x80D9000 and GUI abort connection.

Same situation from CLI.

And error is

FUS_ERROR

FUS_NOT_RUNNING

Next, I run my custom FW with calling SHCI_C2_FUS_GetState(NULL) , reset chip and FUS set to FUS_IDLE

and now I can load 1.6.0 stack light.

I do not understand what is happening, but it is clear that:

1.Сube programmer does not start the FUS correctly (I can start it from my application)

2.stack 1.8.0 somehow affects the work of FUS.

​Indeed!!! the value must be 0x00008000.

Vyacheslav
Senior II

Now, using my custom android application, my custom OTA DFU bootloader I have successfully updated the stack from 1.6.0 to 1.8.0 and then from 1.8.0 to 1.6.0 on a chip with 1M flash.

This confirms my suspicion that something is wrong with the STMCubeProgrammer.

Later I will do the same with the 512k chip.