ADC DMA Reading

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

ADC DMA Reading

Jump to solution
615 Views
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 Kudos
1 Solution
441 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
442 Views
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 Kudos
441 Views
davidzhou
Contributor V

Thank you, Hui Ma.

David Zhou

0 Kudos