Skip to main content
Explorer
December 9, 2023
Question

Restart issue

  • December 9, 2023
  • 3 replies
  • 1750 views

Hi , 

I am using STM32L072CZT6 for our low power application. We are using Standby mode with RTC for alarm and periodic interrupt wakeup. The device is wakeup and work properly for more than 12 hours hours. After that the controller didn't operate and we have to reset it externally (low pulse in MCU RESET pin). Even if we power off and ON the device it will not respond, we have to reset it manually. What will be the issue ? 

    This topic has been closed for replies.

    3 replies

    Graduate II
    December 9, 2023

    Not responding or crashed? Avoid silent while(1) loops

    Going to need to collect more data to understand what's happening. Add more diagnostic and telemetry output. Use also GPIO or LEDs

    Custom board? Show circuit. BOOT0 pin doing what?

     

    Deepu joyAuthor
    Explorer
    December 9, 2023

    The device has bootloader in 08000000 and program in 08001C00. There is no silent while(1) loops. 

    BOOT0 pin is connected to ground. 

    The device incorporates both a bootloader and main firmware, utilizing standby mode for power efficiency. Following the completion of each work cycle, the device transitions into a sleep state, activating system wake-up pins 1 and 2. However, after approximately 60 work cycles or so, the device may encounter an issue where it becomes unresponsive. To resolve this, manual intervention is required to reset the device and exit from this state.

    Deepujoy_0-1702112322312.png

    Deepujoy_1-1702112721128.png

     

     

    Graduate II
    December 9, 2023

    So if it ended up in Error_Hander() or HardFault_Handler() you'd be able to tell?

    Any other signs-of-life indication when running vs not?

    Graduate II
    December 9, 2023

    The hard fault handler has an infinite loop and a hard fault can happen because the Standby code is broken:

    https://community.st.com/t5/stm32-mcus-embedded-software/how-to-enter-standby-or-shutdown-mode-on-stm32/m-p/145849

    Super User
    December 9, 2023

    Based on power consumption, you should be able to tell if it's in standby. It won't be responsive in standby. I'd attach a debugger to a "stuck" mcu and see what happens and where it goes when it resets.