ADC sample by DMA on discontinuous channel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC sample by DMA on discontinuous channel

544 Views
834981225
Contributor I

Hi:

      I want to implement normal conversion for ADC0,such as channel 1,channel 3,channel 8 and so on.

And then how to setting the address of source and the Source Offset.

Thanks in advance.

0 Kudos
3 Replies

422 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you please specify used device?

0 Kudos

422 Views
834981225
Contributor I

Hi:

David Tosenovjan        It is the MPC5643L.

Best regards.

0 Kudos

422 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

You have basically 2 main options:

1) either you can configure separate DMA TCD for every transfer. As for ADC there is only one DMA trigger source, these TCDs must be linked (let only last converted channel to trigger first DMA transfer) either by link feature or by scatter gather feature.

2) read the all channel data registers at once. Even in case some channels are unused, it may be easier for instance if target destination in RAM memory followed by certain SW processing.

Yes, you can use proper channel offset if gaps between converted channnel are regular i.e. you may sequentially read for example channels 0, 2, 4, 6, 8, 10, 12, 14 or 1, 3, 5, 7, 9, 11, 13, 15 or similar way.  Your sequence cannot be configured by address offsets.

0 Kudos