Hello Xiangiun Rong,
Thank's for your reply.
1) One told me that it is a typical case where we "must" use DMA.
2) I am discovering DMA, I find this small "machine", very clever and pleasant to use. Mainly PDB triggering, Scatter/Gather and channel linking, which give so many possibilities...
3) Moreover the sampling rate should be rather high, 32k samples/S per channel. Thus the idea that the MCU remains free, makes me feel better.
This said a lot of people tells me that it does not work as what we believe, in some cases... And when you discover it becomes difficult to understand if the probleme comes from the code or from the hard.
That is why I expect from experts of this forum, to know if it exists some (uncommented) cases which should work for a new innocent user but dont work for obvious but not trivial reasons...
Sincerely,Yannick.
De : xiangjun.rong <admin@community.nxp.com>
À : yannick jeantet <mice.recorder@yahoo.fr>
Envoyé le : Lundi 18 décembre 2017 4h35
Objet : Re: - Re: PDB continuous mode, 2 ADCs in parallel, DMA linking & scatter/gather
#yiv2650043635 * #yiv2650043635 a #yiv2650043635 body {font-family:Helvetica, Arial, sans-serif;}#yiv2650043635 #yiv2650043635 h1, #yiv2650043635 h2, #yiv2650043635 h3, #yiv2650043635 h4, #yiv2650043635 h5, #yiv2650043635 h6, #yiv2650043635 p, #yiv2650043635 hr {}#yiv2650043635 .yiv2650043635button td {}
|
|
Re: PDB continuous mode, 2 ADCs in parallel, DMA linking & scatter/gather
reply from xiangjun.rong in Kinetis Microcontrollers - View the full discussionHi, yannick,I think your idea is possible. But why do you use DMA to transfer samples from ADC registe to memory and transfer ADC channels from memory to ADC_SC1x registers? it is complicated. If the core workload is not big, i suggest you use ADC interrupt, in the ADC ISR, you can read the two ADC samples to memory , then write the ADC_SC1x registers, it is simple.BTW, it is okay to set the PDB in contionuous mode, which means that the PDB counts tick from 0 to PDB_MOD repeatedly. You can set the PDB0_CH0DLY0 to set the instant to trigger ADC_0_A, set the PDB0_CH0DLY1 to set the instant to trigger ADC_0_B. You can set the PDB0_CH1DLY0 to set the instant to trigger ADC_1_A, set the PDB0_CH1DLY1 to set the instant to trigger ADC_1_B, in this way, you can use Ping-pong mode to sample two channels for each ADC converter, of course, this is not backtoback mode of PDB.If you use DMA, for each ADC converter, when the ADC_x_B conversion is over, you can trigger DMA, the DMA can transfer two samples from ADC_x_RA and ADC_x_RB to memory, you can use minor link of DMA, which can transfer ADC channels data in memory to ADC_x_SC1A and ADC_x_SC1B.Hope it can help youBRXiangjun Rong
Reply to this message by replying to this email, or go to the message on NXP Community |
Start a new discussion in Kinetis Microcontrollers by email or at NXP Community |
Following Re: PDB continuous mode, 2 ADCs in parallel, DMA linking & scatter/gather in these streams: Inbox |
This email was sent by NXP Community because you are a registered user.
You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences |
|