Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 10 months ago.
Sample using ADC, DMA, and a Timer
I have been working with the FRDM-k64f all week to setup sampling using a timer to trigger the ADC, and then the ADC triggers the DMA to save the value in memory. So far I have the ADC working with the DMA, but I can't seem to get any timers to trigger the ADC. I have attempted to trigger the ADC using a PIT and a PDB (not at the same time obviously). Has anyone attempted something like this or does anyone have example code?
I believe I setup the DMAMUX, and the ADC trigger selection in the SIM_SOPT7. Any help is appreciated.
which pta channel are you using? Because us ticker in mbed uses PIT , 2 channels as I recall. You can share the code, without the code, its just guessing game.
posted by Martin Kojtal 30 Jan 2015Mbed now uses all 4 PIT channels, two for wait, two for ticker. So if you are also using any functions which use mbed wait it will setup the PIT channels for that.
posted by Erik - 30 Jan 2015I finally figured it out. To use the PDB, I needed to put ADC0 to trigger B, and ADC1 to trigger A because I'm triggering them both at the same time.
posted by Joey McElderry 03 Feb 2015