Skip to main content
Kpodu.1
Associate III
December 31, 2022
Question

Hi all, MCU we are using is :- STM32G0B1CE During factory manufacturing we have notice some issues where MCU does not enumerate the comport.

  • December 31, 2022
  • 3 replies
  • 1138 views

We have seen several signatures of this issue.

Signature 1:

The extracted binary shows that the image is located on Bank1. Also the extracted byte options show that the image should be located on Bank2 but it was empty and still the device boots up after hard power cycle(removed battery and put back)and work fine.

Signature 2:

When we took the same above image and flash it on to the new device, where code is in bank 1 but we set option byte swap bank to bank 2. The device consistently is in dfu mode and does not boot up like the above device after hard power cycle.

How do we explain the above behavior. Is there anything else than the nbank swap option byte which control boot process?

Apart from dfu and initial flashing using st link. Is there any other process which can change the nswap bank option byte?

Also is there any difference between mcu boot via watchdog timer and hard reset like removing battery?

Any insights.

Thank you,

Krishna 

This topic has been closed for replies.

3 replies

MM..1
Chief III
December 31, 2022

Hi Krishna, somethink in your programming sequence is bad.

And yes any reset (sw or hw) differ from power off. Some mcu setup registers is changed only on power off.

Kpodu.1
Kpodu.1Author
Associate III
December 31, 2022

Hi MM..1,

When you mean programming sequence is bad. Below is the command we execute in factory

STM32_Programmer_CLI.exe -c port=SWD freq=1800 sn=52FF6D065271495015371887 -e all -w D:\diag\build.bin 0x08000000]

We do not program any option bytes. We leave them to be default as it is with what comes from MCU vendor.

Is there any logic inside the stm bootloader even though we set the nbank swap bit to bank 2, but if there is no image in bank 2 to default it back to bank 1 ? Or any other logic which explains the above behaviour.

Thanks,

krishna

MM..1
Chief III
January 1, 2023

Try instead -w use -d your.elf -v

sn is required only for multiple connected stlinks.