2 simultaneously sampling ADCs, hw timer triggered

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

Moderator: RoccoMarco

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

2 simultaneously sampling ADCs, hw timer triggered

Post by pito »

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: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: 2 simultaneously sampling ADCs, hw timer triggered

Post by Giovanni »

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

Post by pito »

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
Post Reply