2 simultaneously sampling ADCs, hw timer triggered

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

2 simultaneously sampling ADCs, hw timer triggered

Postby pito » Thu Feb 06, 2014 10:50 pm

Hi, new with ADCs. I want to run (STM32F4) 2 ADCs simultaneously, conversion triggered by a hw timer (ie 20kHz sample rate), no jitter, and fill two buffers (I/Q signals). To keep it simple a linear buffer operation (fill the buffer and stop), no DMA. Based what I've seen here the CG cannot do it, as the CG does the conversion with 2 ADCs in a sequence. Do I need to configure 2 CGs? Is there any experience/code sample to share, how to configure such a mode?
Thanks!

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: 2 simultaneously sampling ADCs, hw timer triggered

Postby Giovanni » Fri Feb 07, 2014 8:18 am

I never used it that way but I believe is that you need the "Regular simultaneous mode", see the reference manual.

The F4 driver does not support yet that mode but the F3 driver supports something similar, you may start from studying the dual mode on the F3. You may also consider using the F3, it has way better ADCs.

Giovanni

pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: 2 simultaneously sampling ADCs, hw timer triggered

Postby pito » Fri Feb 07, 2014 10:59 am

I've found a source at my.st.com forum doing that (for F4) but that is not under chibios, a pity. F4's adcs are ok for that, moreover you need speed and ram space for toying with dsp and F3 does not offer it.
https://my.st.com/public/STe2ecommuniti ... tviews=235


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 42 guests