2014-03-30 10:25 AM
Hello,
I have been having some trouble initializing multiple ADC on my STM32F0 discovery board. I need to sample 4 ADC at a time (or at least one after the other). Does anyone have some example code for initializing 4 ADC and activating the DMA properly to do this?Thank you! #lmgtfy2014-03-30 11:05 AM
Google could be you friend...If you let it.
[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F0%20ADC-DMA%20touble&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=35]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FSTM32F0%20ADC-DMA%20touble&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=352014-11-24 03:41 PM
Hello,
I get the Discovery kit firmware ''STSW-STM32049'' from ST web below:
http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257885
We used example ''ADC_LowPower'' with one ADC channel. It is working well. When I added one more channel (two channels) total in the example. it didn't work. Is it possible to reading multi ADC channels without using DMA? How can I select (MUX) channel for reading its vale from decicate channel? Thanks!2014-11-24 04:53 PM
I'm not using the F0, but as I understand it the device has a singular ADC. The model used by ST for multiple channels is to DMA the values into an array, as the values are coming quickly, with well define periodicity and the IRQ loading would be ridiculous to do otherwise. It scans sequential through a list, this can be triggered, or looped continuously.