cancel
Showing results for 
Search instead for 
Did you mean: 

can i use tim19 to triger sdadc1 & sdadc2 sync?(my platform is stm32f373)

eason87lee
Associate II
Posted on May 29, 2013 at 12:42

can i trigger sdadc1 with  OC2 of tim19 ,and trigger sdadc2 with OC3 of tim19? then sdadc1 trigger dma2 in channel3,sdadc2 trigger dma2 in channel4.can stm32f373 do this ??

#stm32f373
6 REPLIES 6
Posted on May 29, 2013 at 13:50

Signs point to yes.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
eason87lee
Associate II
Posted on May 29, 2013 at 14:40

thanks for your reply.and another question(ha ha):

can i trigger sdadc1 & sdadc2 with oc2 of tim19 at the same time?

Posted on May 29, 2013 at 15:39

The documentation suggests you can't, but I'm not sure this is a big problem because the channels can be programmed the same (generate same edges, at same time), and are synchronous, and don't need to reach a physical pin. TIM19 has to run at your sample rate anyway, so it's not as if you really free up any resources.

DMA is just a side-effect of the conversion completing.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
eason87lee
Associate II
Posted on May 29, 2013 at 16:01

thanks for your reply.yes,i want to sample sdadc1 & sdadc2 synchronously,and save the data in different array.how can i do to make it? I don't want to use sdadc in simultaneous mode.because the dma does not have ping-pong mode.

''The documentation suggests you can't'', which document?

Posted on May 29, 2013 at 16:28

I was reviewing the RM0313

I built similar code on all the other STM32 series parts by going through the docs, and example code in the libraries, and cut-n-pasting the pieces I could, and coding whatever I needed to stitch them together.

All of the DMA units on these parts should have a circular mode, with HT (Half Transfer) and TC (Transfer Complete) interrupts, and are perfectly adept at doing ping-pong operation to two halves of a linear buffer. Some of the parts offer the ability to handle two fragmented buffers, although I think that just adds more complexity than is required.

Not for the F3, but illustrative

[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&currentviews=128]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=128

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
eason87lee
Associate II
Posted on May 30, 2013 at 03:14

thanks for reply

which page of RM0313 suggests me can't?

page 213 says''This timing trigger control is capable of triggering simultaneous conversion or inserting a programmable delay between the SDADCS''