Skip to main content
Visitor II
December 26, 2022
Question

Hi! I've got a very strange behaviour of stm32g431. Sometimes, when I plug my device into USB port, it doesn't start, becoming completely non-functional. When I try to reprogram it, openocd shows that device is protected

  • December 26, 2022
  • 1 reply
  • 816 views

processing full erase cycle helps, but still have no idea, why device enters such condition!

Please help!

    This topic has been closed for replies.

    1 reply

    Super User
    January 2, 2023

    > openocd shows that device is protected

    What is the state of Option Bytes, as read out by CubeProgrammer or similar, when this happens?

    Do you reprogram portions of FLASH or option bytes in your program?

    Does CubeProgrammer (or CubeIDE) run on the computer into which you connect the device, when this happens?

    What is the normal setting of the Option Bytes and how is the pin related to starting the built-in bootloader (BOOT0) connected? (this question aims at the possible inadvertent running of the built-in bootloader)

    JW