ADC sample by DMA on discontinuous channel

取消
显示结果 
搜索替代 
您的意思是: 

ADC sample by DMA on discontinuous channel

299 次查看
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 项奖励
3 回复数

177 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you please specify used device?

0 项奖励

177 次查看
834981225
Contributor I

Hi:

David Tosenovjan        It is the MPC5643L.

Best regards.

0 项奖励

177 次查看
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 项奖励