cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 ADC does not stop

user 143
Associate III

Hello,

According to the Reference Manual of the STM32L431 controller, the ADSTP in the ADC_CR register must be set to 1 to stop the ADC. Additional condition is that both ADSTART=1 and ADDIS=0 must be. Once the ADC is stopped, the ADSTP bit is cleared from the hardware.

The problem with me is that this sporadically does not work. The ADSTP bit never becomes 0, no matter how long I wait. Since the L431 has only one ADC, but I have two different measurement situations, I have to reconfigure the ADC again and again. This works e.g. 1000x, but then at the 1001st attempt the ADC does not stop.

Does anyone have an idea what this could be?

2 REPLIES 2

Read out and check/post ADC registers content when this happens.

JW

user 143
Associate III

So, I already found the mistake. I thought, the ADSTART bit was set, but it was not set. So now I check first if the bit is set, and stop then when neccesary.