I need to read multiple ADC channels using DMA, I found a document
(Using DMA to emulate flexible scan method )which describes about a flexible scan method using DMA . I feel some difficulties regarding configuration and linking process in the development stage of the code. so I need solve it with the help of a sample code, for :- Using DMA to emulate flexible scan.
using latest MCU Xpresso for the board FRDM K64f
#ADC #DMA #flexible scan method #K64F #MCUXpresso
Thanks, It is possible, but I wanted to know that, is it possible to configure both ADC0(PTB2,PTB3) and ADC1(PTB10,PTB11) channels using the same method ? doubts regarding Different trigger source for DMA1 and TCD configuration,
As you might know, the structure of the example proposed is that one DMA channel is in charge of transfer from ADC register to memory buffer, and the other channel is in charge of modify the ADC channel configuration (from memory g_ADC_mux to ADC_SC1 peripheral register). With this structure, you can add more channels, with the FRDM up to 4 channels.
This is the purpose of the original example, to be able to multiplex between different channels of the same ADC.
ADC0 Channel 12
ADC0 Channel 13
ADC0 Channel 14
ADC0 Channel 15
Thanks, how can I configure both ADC0 and ADC1 channels using the same method , Is it possible to configure both ADC's Using Flexible scan method ? how to configure EDMA .
#ADC #DMA # #K64F #MCUXpresso
With the code from the document, you can change the mux of ADC0 Channels. If you make a small change in the code, you can add the Channel 13, and modify the g_ADC_mux array.
With this, you have the Channel 12 in PTB2 and the Channel 13 in PTB3, both Channels of ADC0.
Hope this helps. If you have any question please let me know.