ADC sample by DMA on discontinuous channel

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ADC sample by DMA on discontinuous channel

531件の閲覧回数
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 返答(返信)

409件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you please specify used device?

0 件の賞賛

409件の閲覧回数
834981225
Contributor I

Hi:

David Tosenovjan        It is the MPC5643L.

Best regards.

0 件の賞賛

409件の閲覧回数
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 件の賞賛