2020-08-16 09:38 AM
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
2020-09-02 04:02 AM
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.
2020-09-02 04:04 AM
And how to do this: "In last resort we could activate the safe boot which will reset the chip in its manufactory state." ?
2020-09-02 04:13 AM
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
2020-09-02 05:33 AM
As FUS version is V1.1.0, the revertion to the manufactory state can be achieved writing 0x00080000 at address 0x5800040C.
2020-09-02 05:44 AM
This is a PWR_CR4 ?
And write result is Error
Mey be need to write 0x00008000 (set C2BOOT) ? not 0x00080000.
2020-09-02 05:54 AM
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.
2020-09-02 06:27 AM
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.
2020-09-02 09:01 AM
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
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.
2020-09-03 06:55 AM
Indeed!!! the value must be 0x00008000.
2020-09-10 05:31 AM
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.