cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030C8 failed watchdog reset after few days at working well

CaliBeta
Associate

I have an IOT project for the monitoring and control of a deep well, the gateway in charge of sending the information to the web server was based on an STM32G030C8 and communicates via UART with the quectel EC25 4G module.

I have activated the IWDG (independent watchdog) with an LSI clock source at 32 KHz, a prescaler of 256 and a window and reload value of 4095, to obtain the maximum possible time, which is little more than 32 seconds.

The circuit works very well and the watchdog correctly restarts the system when a fault occurs or the main oscillator hangs due to electrical noise (it's an industrial environment), but after a few days working well, the equipment hangs completely and the watchdog doesn't restart it, leaving the equipment not working until the operator goes to the field to perform a hard reset.

the system manages to work well between 15 and 30 days before that crash, I can't understand the nature of the failure and that's why I ask the community for help, the only thing that occurs to me is that the LSI oscillator has also crashed, preventing the IWDG from being able to restart the microcontroller, but it surprises me since a hard reset fixes the problem and the microcontroller works normally again.

Additionally, I also have the timer16 with overflow interrupt every second, to control the execution times of the system's FSM finite state machine and also to make a led blink and be able to visually identify that the microcontroller is executing instructions.

I hope you can help me since it is an IOT device and it is in crop fields, if it hangs it causes the project to fail and due to the distance it is unfeasible to have to send an operator to hardware reset the system every time the failure occurs

1 REPLY 1
KnarfB
Principal III

few thoughts

  • is the boot mode firmly fixed to boot from flash (nBOOT_SEL?)
  • are you monitoring external voltage(s) and MCU temperature? (maybe easy to add)
  • are you following "Getting started with STM32G0 Series hardware development" App Note?
  • how is the watchdog fed, from the interrupt?
  • watchdog fed only after some health checks passed?
  • hardware watchdog feature enabled?
  • what is "hangs" / what did the LED do then / adding more LED patterns for
  • using a spare pin on the modem for hard resetting the MCU?

hth

KnarfB