2013-12-29 08:13 AM
Hi
I want to use ADC-DMA to read 4 input of voltage. PA0, PA1, PA2 and PA4 on ADC3 IN0, IN1, IN2 and IN4.I try to modify the code samples founded in STM32F4xx-Discovery_FW_V1.0.0 for STM32F4-DISCOVERY or for STM32F429-DISCOVERY but both don't work (my code) on theses boards.In final i must read this four ADC inputs with a stable frequency, i want to use a Timer.Someone can help me with sources please?ThanksI'm leaving in France2013-12-29 11:22 AM
Continuous mode, two channels.
[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/Multi%20Channel%20ADC%20reading&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=365]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2FMulti%20Channel%20ADC%20reading&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=365 Two channels, simultaneously, against timebase [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/stm32f207%20ADC%2BTIMER%2BDMA%20%20Poor%20Peripheral%20Library%20Examples&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=1573]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2Fstm32f207%20ADC%2BTIMER%2BDMA%20%20Poor%20Peripheral%20Library%20Examples&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=1573 Single channel, using timer/dma2014-01-07 02:46 PM
Happy New Year
I try your links and now the code works fine alone.But when i want to read 4 ADC3 channels synchronized with TIM4, it don't work.TIM4 is configuring to trig at frequency f2 TIM12 used for 1 PWM channel and it works. How configure one TIMx to trig the read of4 ADC3 channels at frequency f1 and TIM12 at frequency f2 ? f1 = 80x f2 with f2 = 1/60µs = 8,333 337 KHzThanks2014-01-07 03:49 PM
I don't have the time/resources to code this from scratch, post your semi-working example code framework and I'll see if I can understand it well enough to get it to working.
2014-01-08 04:00 AM
Hi CLive1
I prepare the project and take contact2014-01-08 09:01 AM
There are two more problems you need to consider:
PA4 is ADC12_IN4. PA4 is not connected to ADC3. And if you switch to ADC1 or ADC2, PA4 is also connected to the on board CS43L22 peripheral. PA0 (ADC123_IN0) is also connected to the board pushbutton. The discovery board User Manual has an MCU Pin Description table that identifies which pins are free for the user. Cheers, Hal2014-12-30 04:14 AM
Hi clive1
Thank you for your replyI'm looking the links and try to remake themA+