cancel
Showing results for 
Search instead for 
Did you mean: 

How to use multiple channel ADC using DMA in STM32F051R4 mcu?

vvinc
Associate

Hai,

I am using STM32F051R4 for my project,in this project i have to use multiple channel adc's using DMA .Is there any sample code availble for this requirement,i already have driver code but its much difficult to understand and make modifications . Anybody please help me to configure registers of ADC using DMA.

1 REPLY 1

>>Anybody please help me to configure registers of ADC using DMA.

Not really how it works at all, DMA is not involved in the configuration of the ADC. These are two independently configured peripherals that interact in prescribed ways.

The DMA is a dumb peripheral, for each request it pulls an 8, 16 or 32-bit value from one location and stores it some place else.

The ADC presents either a 16-bit wide, or 32-bit wide (two sample), at a data register address, and the EOC signal drives a DMA request.

For multiple channels, you enumerate a ranked list to the ADC, each time the ADC is triggered, it will sequence through the list generating an EOC (and by inference a DMA transfer) for each conversion as it completes.

Perhaps review assorted example for boards in the F0 family of parts

STM32Cube_FW_F0_V1.9.0\Projects\STM32091C_EVAL\Examples\ADC

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..