Skip to main content
Valkan Pavlov
Associate III
October 31, 2024
Solved

STM32F401Re issue with ADC

Hey folks.

What I do is this: I get 14 ADC measurements on different channels, than use DMA to store them into an array. When this is ready an interrupt flag is raised, I make a copy of that array and send it via UART. There is a timer to control the ADC. At some point I do transfer back an UART message that I use to update my ARR register of the timer. This set up works from time to time, but most of the time, especially on higher values, DMA that I use with ADC stops rising the interrupt flag, and no new ADC values are produced. Does anyone have similar experience?

THanks!

 

I did try to disable the UART, ADC, and TImer before updating ARR, but to the same result.

This topic has been closed for replies.
Sarra.SBest answer
ST Employee
October 31, 2024

Hello @Valkan Pavlov, 

check for overrun in OVR bit in the ADC_SR, read section 11.8.1 in RM0368

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

2 replies

Sarra.SBest answer
ST Employee
October 31, 2024

Hello @Valkan Pavlov, 

check for overrun in OVR bit in the ADC_SR, read section 11.8.1 in RM0368

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Valkan Pavlov
Associate III
October 31, 2024

Thank you Sarra!