Skip to main content
Visitor II
May 16, 2024
Question

MCU STM32G030K8T6 Frozen

  • May 16, 2024
  • 13 replies
  • 8642 views

 

We have a product containing the STM32G030K8T6 MCU. The code is working like expected and the product is meeting all specifications. The product is battery powered and can be charged via USB.

 

If the product is assembled it will go into a burn-in test where 70 plus products will be charged and de-charged between 3 to 10 times. During this test 1 to 3 products are failing, and with failing I mean the MCU does not advance further or freeze as shown in the below picture.

It stops at the following line of code:

Screenshot 2024-05-16 112637.png

  • Below is the configuration of the HW.
    • MCU: STM32G030K8Tx
    • USB to UART Chip: CH340E
    • UART Port:  USART1
  • Below are our observations.
    • After removing power to the MCU and the rest of the circuitry completely and re-applying the power again, the MCU remains frozen at this step.
    • We also checked for flash corruption. When we read the Flash (Device memory) and save the file and compare the saved file with the original binary, there are no differences. So, this proves that there is no corruption in flash.
    • We cannot reproduce this issue at our place, but the customer reproduces after 5 or more iterations of battery charge and discharge cycles.
    • Also, this issue is not reproducible on every device. Approximately 10 percent of the devices.
    • When we reflash the MCU, then the problem strangely goes away.

Currently we are at a dead end situation, does anybody has any suggestions?

Thanks a ton!

    This topic has been closed for replies.

    13 replies

    Super User
    May 16, 2024
    Graduate II
    May 16, 2024

    I wonder if his BOOT0 pin is left floating too?

    Visitor II
    May 16, 2024

    Hi,

    Boot0 pin is left open, we use this pin for debugging/programming.
    Is there any related reason for asking?

    Super User
    May 16, 2024

    Leaving it open makes it susceptible to noise.

    Have a resistor to pull it to your "normal" level - you can override that for debugging/programming

    Visitor II
    May 16, 2024

    Do you mean pull it up?

    B.t.w. I did not see any point regarding an external pull-up/down in the application note.

    Farhadpi_0-1715866430868.png

    and it cannot be done by internal pull up/down resistor?

    Super User
    May 16, 2024

    To boot from main flash (ie, run your code), you want it pulled low:

    AndrewNeil_0-1715867895454.png

    Does your application use Standby mode?

    Are you working with @PLER on that same product they posted earlier?

     

    Visitor II
    May 16, 2024

    Yes, we utilize Stand-by mode.
    We're collaborating on the same product with @PLER.

    Understood, for running the code from Flash memory, the BOOT0 pin should be low.

    Considering this, there would be two questions:1. Is it possible to use the internal pull-down for the BOOT0 pin?
    2. In the event that the Boot pin get noise and resulting in the MCU freezes, would a reset or re-powering typically resolve the issue? However, in our scenario, the device works after re-flashing the MCU.

    Super User
    May 16, 2024

    @Farhadpi wrote:

    We're collaborating on the same product with @PLER.


    Then why start a whole new thread, when you already had one existing on this very problem?

     


    @Farhadpi wrote:

    1. Is it possible to use the internal pull-down for the BOOT0 pin?.


    Not familiar with this part, but I guess not: the internal pull-up/down is probably only available when the pin is configured as a GPIO - not BOOT0 ?

     


    @Farhadpi wrote:

    2. In the event that the Boot pin get noise and resulting in the MCU freezes, would a reset or re-powering typically resolve the issue? 


    I wouldn't rely on it!

    A bad value on BOOT0 could end up with you running from RAM, or in System Bootloader mode - so I'd say it is entirely possible that the Flash could get corrupted.

     

    EDIT:

    And @PLER did previously report that you do see Flash corrupted.

    EverShineAuthor
    Visitor II
    May 16, 2024

    When we re-flash the firmware, it works absolutely fine again, without pulling the BOOT0 pin up or down. What I don't understand is, how the device can work just by re-flashing the binary?

     

    Super User
    May 16, 2024

    Post content of Option Bytes.

    JW

    EverShineAuthor
    Visitor II
    May 16, 2024

    Sure. I will get back to you reading the Option Bytes.

    Super User
    May 16, 2024

    @EverShine wrote:
    • After removing power to the MCU and the rest of the circuitry completely and re-applying the power again, the MCU remains frozen at this step.

    How long do you leave it before re-applying power?

    Do you ensure that the PSU and all caps are fully discharged?  Otherwise there could be just enough to keep it in the "Bad Boot" state...

    EverShineAuthor
    Visitor II
    May 16, 2024

    Much more than the capacitor's discharge time. Power was removed from the malfunctioning board for a day, but when we turned it back on, the MCU remained frozen when powering up.

    Visitor II
    May 17, 2024

    Hi,
    I measured some test points on the frozen MCU and observed that some pins are behaving oddly, like this:

    Farhadpi_4-1715943946130.png


    1. NRST:

    Farhadpi_0-1715943863479.png

    Farhadpi_0-1715946876221.png

    2. MCU_TX:

    Farhadpi_2-1715943887817.png

    Farhadpi_3-1715943894455.png

    3. TP9/TP10

    Farhadpi_5-1715943975415.png

    the rest of the Test Points like 

    TP11/12/13/14/15/16/17/19

    are low.

    Graduate II
    May 17, 2024

    From this graph MCU isnt frozen but reset every 260ms. And too MCU_TX levels is ugly.

    HOW is your app CLK , how is managed undervoltage protection ...

    Try on frozen board connect regulated PSU over Vcc 2V8 and go up slowly ...

    Graduate II
    May 17, 2024

    Is a pull-down resistor now installed at BOOT0?  If no, why not?

    Have you evaluated the Device Errata in the context of your problem?

    Visitor II
    May 17, 2024

    We placed a resistor temporarily to check if it would have an effect, but there is no dedicated place for such a resistor in the design.

    As we mentioned earlier, we produced 1500 units and delivered them to our customer. Some of them failed after a couple of days or after a few charging cycles.

    I think the discussion about the BOOT pin is irrelevant in this case. Even in the evaluation board from ST, "STM32 Nucleo-64 boards (MB1360)," does not use an external pull-down resistor on the BOOT pin. Therefore, this discussion should be concluded as it does not pertain to our issue.|
    see below:

    Farhadpi_1-1715954179140.png

    Farhadpi_0-1715954152494.png

    Farhadpi_2-1715954279642.png

     

     

    Graduate II
    May 17, 2024

    Dont waste time isnt BOOT0 problem, test as i write Vcc and maybe unoficial BOR is  source of this trouble. As asked here What are the BOR levels for STM32G030 ? - STMicroelectronics Community

    Visitor II
    May 17, 2024

     

    As we mentioned before, we do not use any pull-down resistor in this circuit. For this series of MCUs, there are three options for BOOT configuration:

    1. BOOT0 pin
    2. BOOT_LOCK bit in the FLASH_SECR register
    3. Boot configuration bits nBOOT1, BOOT_SEL, and nBOOT0 in the user option byte

    Farhadpi_0-1715951769530.png

    We use the third option.

    Additionally, for your information, we use the similar MCU in other projects without any external pull-down resistors and have never encountered any issues.

    Farhadpi_2-1715952352572.png

     

    For this faulty PCB, I attempted to place a pull-down resistor to observe any effect. However, after connecting a pull-down resistor to Pin 25 (PA14), nothing changed—the MCU still freezes and does not operate!

    I already checked the Device Errata and no similar issue found.

    Graduate II
    May 17, 2024

    @Farhadpi wrote:

    As we mentioned before, we do not use any pull down resistor in this circuit.

    For this faulty PCB, I attempted to place a pull-down resistor to observe any effect. However, after connecting a pull-down resistor to Pin 25 (PA14), nothing changed—the MCU still freezes and does not operate!

    ...

    Oh, according to your traces it's clearly doing something.  

    And as mentioned before, BOOT0 should always, always, always be pulled down (10K is fine) as a matter of good practice.  If you intend to use the MCU's Bootloader or RAM start then a mechanism (usually a jumper to VDD) is needed to drive BOOT0 high.

    As an aside, ST didn't do anyone any favors by combining BOOT0 and a debug pin.  That was pure stupidity.