Skip to main content
Explorer II
April 3, 2025
Solved

STM32G4 MCU ADC output suddenly stucks to zero

  • April 3, 2025
  • 1 reply
  • 652 views

Hello,

I'm using an STM32G474ME MCU for grid connected power converter applications.

I use multiple ADC modules for current and voltage sensing of the converter, and when I drive the power converter, the result values ​​of all channels in certain ADC module are fixed to zero. The strange thing is that when it is fixed to 0, no ADC error occurs, and only the DR register value is fixed to zero. 

I am currently using ADC modules 1 to 5, and each module has 3 channels. The ADC starts by triggering the HRTIM interrupt, and the converted data is saved as an array using DMA. To help you understand, I have attached the Cube MX settings and registers of ADC module whose output(DR) is stucked to zero.

What could be causing this problem? Could this phenomenon be caused by EMI due to the switching of the power converter?

 

Here are some similar questions that have gone unanswered.

@ikrosoft  ADC output suddenly becomes constant

@FChen.3  STM32L4P5CET ADC freezes at high noise environment 

 

Please help me. Thank you.

Paul.

    This topic has been closed for replies.
    Best answer by Igor Cesko

      Hello wronskian,

    Yes - this phenomenon is caused by the EMI. Please check your PCB design. Usually the ADC is stucked to one fixed value if the difference between VSS and VSSA is more than allowed 50mV (even in a short peak caused by some transient effect from your power converter). 
     To avoid this we should carefully design PCB to avoid digital and analog grounds differences and also some another disturbance.
      In current design : the only solution (without need of power off / on the application) is to disable the ADC and then reinitialize ADC again. By disabling the ADC, ADC is completely unpowered internally which allows to jump out from the "locked" state caused by the EMI pulse. Better solution is to avoid this state by proper PCB design.

    Regards

                           Igor

    1 reply

    ST Employee
    April 3, 2025

      Hello wronskian,

    Yes - this phenomenon is caused by the EMI. Please check your PCB design. Usually the ADC is stucked to one fixed value if the difference between VSS and VSSA is more than allowed 50mV (even in a short peak caused by some transient effect from your power converter). 
     To avoid this we should carefully design PCB to avoid digital and analog grounds differences and also some another disturbance.
      In current design : the only solution (without need of power off / on the application) is to disable the ADC and then reinitialize ADC again. By disabling the ADC, ADC is completely unpowered internally which allows to jump out from the "locked" state caused by the EMI pulse. Better solution is to avoid this state by proper PCB design.

    Regards

                           Igor

    wronskianAuthor
    Explorer II
    April 9, 2025

    Dear Igor.

     

    Thank you for your kind reply. I'll try to solve the EMI issue.