Multi-Channel ADC with STM32 using DMA and Interrupt– Multiple Analog Sensors

preview_player
Показать описание
Learn how to use Multi Channel ADC with STM32 Microcontroller. We’ll program ADC to read multiple ADC channels of STM32 Nucleo board. This project uses DMA and Interrupt along with ADC to sample multiple sensor data. In the end, we’ll measure light intensity using LDR and variable resistor using POT as an analog sensor.

[SUPPORT]

►► Try Altium Student Lab! You get FREE access to Altium Designer and Altium 365

[RESOURCES]

[TIMESTAMPS]
00:00 Introduction
00:16 Altium Free Trial
00:47 Create new project
01:28 Configure Multi-channel ADC
03:04 Configure DMA in ADC
03:48 Configure NVIC Interrupt
04:30 Configure UART
05:04 Write code for ADC Multiple Channel
15:03 Connect LDR and POT with STM32
16:26 Upload the code on STM32 MCU
16:42 read multiple analog sensor values
18:05 outro
Рекомендации по теме
Комментарии
Автор

Excellent work, very clear, structured and informative presentation on a popular topic for STM32. Congratulations Sir.

lucdrouin
Автор

Very nice, I dont need to make the video faster because you speak on a very reasonable speed.

danielcarpio
Автор

Thanks for the superb explanation. I learned quite a lot! But why do we need to reset the MCU every time we need to read the input voltage of each Analog pin? is there anyway where we could read the input voltage without resetting the MCU?

abelashenafi
Автор

at 7:12 you cast rawValues as a uint32_t pointer, however rawValues is a 16 bit array with a size of 2. This means that 32 bits in total are taken up by rawValues.

You give your uint32_t casted rawValues a size of 2, which would tell the compiler that you have 64 bits allocated for this buffer. Wouldn't this be a vulnerability as it is *possible* to overwrite an unrelated address?

Am I missing something here?

JoeBob
Автор

Hello, I don't understand why you have to reset the board to obtain a new value from the ADC, in theory the DMA ADC would have to do it

CAN_MIKE
Автор

At 3:53 Why did you tick the ADC1, ADC2, ADC3 interrupts? Is it because you are using multiple channels? If I am using a single channel then should I tick it or not?

Qaidi_
Автор

Why were the channel cycles set to 480 cycles instead of 3?

spencerclegg
Автор

this multiple ADC doesn't work for me. I'm using nucleo G070rb . What may the reason..?

unknown.
Автор

thank you.
anyway i am wondering, in line 126 (minute 10:20): why does the code has to iterate it until i < number of conv. ?
i can understand if it is only 2 number conversions so that the code only does the iteration once since it is 2-1.
say, for example, if we have 3 number of conversions, then the code there will have to iterate twice since it is 3 - 1. So reading adc chanel 0, 1, 2 twice?

bobby
Автор

How did you learn all this? I would also like to know this way. Would you be able to recommend any books or courses?

romeshpg
Автор

I don't think you need a for loop at 11:30 to get values for `lux` and `pot`, also resetting mcu doesn't help much

VedantNaik
Автор

very intro about dma in stm32....i have implemented in stm32f446re. but i am unable to visualize adc data which is changing in live expression tab.it is freezing at initial value. how to change it? any solution would be appreciable.

muralikrishna.
Автор

Brother Im using NUCLEO-L452RE so what I do if i want to make all 16 channels in active mode

dragon_
Автор

why we need to reset the board any reason behind it?

dileepj
Автор

I should use a DMA with a lot more samples (32, 64 ones) to work them after in order to use DMA advantages

javierlopez
Автор

I'm using STM32 NUCLEO-F411RE chip... Can you help me write a code to make it capture an image using OV2640 and store it in pc folder?

MohammedAltowayti
Автор

sir please make the video on SPI and I2C

khichadeneeta
Автор

how come you're not resetting the flag after the blocking while loop?

itayjc
Автор

Kindly tell that why we are pressing reset button to see new value, why don't we get new value automatically. I understood everything it was informative video but this Question kindly answer. Anyone can tell me i need the answer i am learning this.

muhammadabdullah
Автор

Please give me a link to the previous video on the stm32

whiteknighte
join shbcf.ru