HOW TO USE ADC

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

HOW TO USE ADC

2,392件の閲覧回数
letseatorange
Contributor III

I want to use one  AD channel,like ad13 ,contine to collect 100 data, how should i deal with

4 返答(返信)

1,522件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

There is an example code in Design Studio for ADC you can refer to.

 

Regards,

Daniel

0 件の賞賛

1,522件の閲覧回数
letseatorange
Contributor III

It's only can get one value ,how can i continue to get more valeu ,and then store in an array。

0 件の賞賛

1,522件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

You can enable continuous conversion in ADC_SC3[ADCO] register. Then a new conversion will be automatically triggered on completion of the previous one on the same channel (or configuration) until it is aborted (see 38.5.4.3 Aborting conversions). When each conversion is done, ADC interrupt can be triggered, so you can collect data in the interrupt handler.

 

To reduce load of the CPU, the conversion can be initiated with hardware trigger through PDB or TRGMUX. Also, the ADC can trigger a DMA request on conversion completion.

There is an example code Example S32K144 PDB ADC trigger DMA ISR S32DS, which can help.  

 

Regards,

Daniel

1,522件の閲覧回数
letseatorange
Contributor III

Hi,support team,now i want to use DMA to transfere some datas from Peripherals ADC0 to memory.but i don't use PDB.

I use a certain sample frequency to sample about 50 datas, then  using DMA to transfere data to memory, I use sdk to complete, but found that data can not be transferred to memory, how should I do? thanks!

0 件の賞賛