cancel
Showing results for 
Search instead for 
Did you mean: 

reading multiple ADC channel in stm32l0 using polling method

kudiarasum
Associate II
Posted on April 19, 2016 at 07:00

Hi, one of our project we are using stm32l053  and using HAL driver for accessing peripherals, i have read the single ADC channel (ADC channel 13)successfully, but i was unable to read  multiple channnel at same time.

Any one can share the sample code  to read ADC multiple channel using polling method.

Regard

MK

 

 
2 REPLIES 2
slimen
Senior
Posted on April 19, 2016 at 11:19

Hi,

For multiple channel, you need to use DMA.

You can refer to the RM0377 (13.6.5 Managing converted data using the DMA)

http://www2.st.com/content/ccc/resource/technical/document/reference_manual/21/bd/0f/bd/1c/88/40/f0/DM00108282.pdf/files/DM00108282.pdf/jcr:content/translations/en.DM00108282.pdf

In this reference manual, you can find Appendix A8 ADC Code examples (page 827) that can help you.

In the section (10.3.7 DMA request mapping) the ''table 48'' lists the DMA requests for each channel: Table 48. Summary of the DMA requests for each channel (page 246)

You should be able to identify the free/usable pins, as given in section ''13.12.12 ADC register map''

Regards
kudiarasum
Associate II
Posted on April 19, 2016 at 15:39

Hi ,

Thanks for your information,

let me check and let you know.