ADC DMA Reading

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

ADC DMA Reading

跳至解决方案
662 次查看
davidzhou
Contributor V

Hi,

I have K60 Tower board: MK60FN1M0VLQ12.

I had one channel DMA read working:

Data result is in the register: ADC0_RA

  ADC0_SC1(0)= 0x10;    // select channel 0x10
 

If I add another channel:

ADC0_SC1(0)= 0x10;     // select channel 0x10

ADC0_SC1(1)= 0x16;     // select channel 0x16

where is the data results:  for the channel 0x16 as above added second channel

is still in ADC0_RA register or in ADC0_RB ?

Thank you,

David Zhou

0 项奖励
1 解答
488 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi David

The ADC0 Status and Control Registers 1 (ADC0_SC1n) has two registers: ADC0_SC1A and ADC0_SC1B.

The ADC0_SC1A supports both software and hardware trigger; while the ADC0_SC1B only supports the hardware trigger.

Please check your below code is written value to ADC0_SC1A or ADC0_SC1B register.

ADC0_SC1(1)  = 0X16;

If write value to ADC0_SC1A, the ADC result located at ADC0_RA register;

While if write value to ADC0_SC1B, after hardware trigger, the ADC conversion value located at ADC0_RB register.
Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
2 回复数
489 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi David

The ADC0 Status and Control Registers 1 (ADC0_SC1n) has two registers: ADC0_SC1A and ADC0_SC1B.

The ADC0_SC1A supports both software and hardware trigger; while the ADC0_SC1B only supports the hardware trigger.

Please check your below code is written value to ADC0_SC1A or ADC0_SC1B register.

ADC0_SC1(1)  = 0X16;

If write value to ADC0_SC1A, the ADC result located at ADC0_RA register;

While if write value to ADC0_SC1B, after hardware trigger, the ADC conversion value located at ADC0_RB register.
Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
488 次查看
davidzhou
Contributor V

Thank you, Hui Ma.

David Zhou

0 项奖励