KDS on TRK-KEA64 ADC

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

KDS on TRK-KEA64 ADC

1,206 Views
dli1
Contributor I


I am trying to read four channels of ADC using KDS on TRK-KEA64 and I read all zeros including the light sensor channel.  I have used the same KDS project on TRK-KEA128 to do the same thing and it worked fine.  Then I switched to TRK-KEA64 and selected the processor SKEAZN64MLH2, All four channels read zeros.  Do I have to configure clock and ADC differently from TRK-KEA128 in addition to choosing different processors?

Tags (1)
0 Kudos
Reply
4 Replies

893 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi David,

The KEA64 is using the same ADC module with KEA128, there should without any different with software code.

Please check TRK-KEA64 ADC example code for CodeWarrior software, you could refer related code and check if there with any difference with yours.

TRK-KEA64 CodeWarrior LAB3 - Analog to Digital Converter (ADC) module download here.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

893 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello  david,

There are some difference , for example , KEA128 have the  register " Status and Control Register 5 (ADC_SC5 ) ",

while KEA64 have not . 

BR

Alice

0 Kudos
Reply

893 Views
dli1
Contributor I

Hi Alice,

In the code ADC0.c file if I change the ADC_SC2 = ADC_SC2_REFSEL(0x00) to ADC_SC2 = ADC_SC2_REFSEL(0x01) I can get some ADC readings.  However if you generate code, you erase this change.  So the question is in the KDS how do I configure the ADC reference voltages?  I configured as below but in the code the line ADC_SC2 = ADC_SC2_REFSEL(0x00) set to default.

Capture.PNG

0 Kudos
Reply

893 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello david,

I have test on my side ,it is the same wiht you , ,maybe there are some problem here.

And you can do like this : change the ADC_SC2 = ADC_SC2_REFSEL(0x00) to ADC_SC2 = ADC_SC2_REFSEL(0x01) ;

    then right click the ADC component , select "Don't write genereated component modules" .

pastedImage_0.png


Have a great day,

Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply