Re: rp2040 a2d?

Liste des GroupesRevenir à se design 
Sujet : Re: rp2040 a2d?
De : pcdhSpamMeSenseless (at) *nospam* electrooptical.net (Phil Hobbs)
Groupes : sci.electronics.design
Date : 14. Mar 2025, 02:03:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqvv8v$7snb$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : NewsTap/5.5 (iPhone/iPod Touch)
Dave Platt <dplatt@coop.radagast.org> wrote:
In article <817668f6-ea2b-0fee-7a4e-839c333aa8a4@electrooptical.net>,
Phil Hobbs  <pcdhSpamMeSenseless@electrooptical.net> wrote:
 
Yup.  Or run the ADC from the DMA peripheral, with ping-pong buffers.
Either way, you can arrange to get good repeatable hardware timing.
 
Yup again.  I've got the ADC on the RP2040 Pico running at 500
kilosamples/second (as fast as it'll go), using two chained
DMA buffers.  Works like a charm and (with a sufficient amount
of RAM for the buffers) keeps the interrupt and task-switch
overhead down to a trivial minimum.  I'm sure the same trick is
possible if you decide to use an external ADC, using SPI or
the PIO block to fetch the samples.
 
Just do read all of the instructions in the programming manual about
how one must chain and un-chain buffers during the DMA-start and
DMA-stop processes.  I managed to get a situation where everything
worked right the first time, but after stopping and starting
acquisition again, both DMAs were active simultaneously and were doing
a King Solomon number on the samples coming from the ADC.  I found
myself whistling "Chain Of Fools" while coding up a fix for my error :-)

Fun!

These days Simon doesn’t let me near the firmware, so I have to make stuff
up.  ;)

Cheers

Phil Hobbs


--
Dr Philip C D Hobbs  Principal Consultant  ElectroOptical Innovations LLC /
Hobbs ElectroOptics  Optics, Electro-optics, Photonics, Analog Electronics

Date Sujet#  Auteur
11 Mar 25 * rp2040 a2d?14wmartin
11 Mar 25 +- Re: rp2040 a2d?1Uwe Bonnes
12 Mar 25 +- Re: rp2040 a2d?1Don Y
12 Mar 25 `* Re: rp2040 a2d?11wmartin
13 Mar 25  `* Re: rp2040 a2d?10john larkin
13 Mar 25   +* Re: rp2040 a2d?8wmartin
13 Mar 25   i+- Re: rp2040 a2d?1john larkin
13 Mar 25   i`* Re: rp2040 a2d?6Phil Hobbs
13 Mar 25   i +* Re: rp2040 a2d?4john larkin
13 Mar 25   i i`* Re: rp2040 a2d?3Phil Hobbs
13 Mar 25   i i +- Re: rp2040 a2d?1john larkin
14 Mar 25   i i `- Re: rp2040 a2d?1Phil Hobbs
16 Mar 25   i `- Re: rp2040 a2d?1wmartin
13 Mar 25   `- Re: rp2040 a2d?1Gerhard Hoffmann

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal