MKL16Z ADC not working with the MKL26Z config

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

MKL16Z ADC not working with the MKL26Z config

1,231 Views
bgraham
Contributor IV

My ADC does not appear to work on my MKL16Z with the project setup using the MKL26Z SDK.

I setup the project this why at the suggestion of Robin_Shen.

See https://community.nxp.com/thread/492442

SDK version 2.4.1 package for MKL26Z256xxx4 device

.

I was having problems with the lasted SDK for the MKL16Z.

I got conflicts between the SDK and the code generated by MCUxpresso.

SDK version 2.2.0 package for MKL16Z256xxx4 device

MCUXpresso IDE v10.2.1 [Build 795] [2018-07-25] 

.

I attempted to switch the project back to a MKL16Z by editing the MCU, but that left old MKL26Z files in the project, and did not add MKL16Z files.

How do I switch back to the MKL16Z SDK?

.

I went back to the MKL26Z SDK.

But my ADC is not working as I expect.

Is the MKL16Z ADC not working because the project is using the MKL26Z SDK?

.

Thanks,

Bruce

Tags (1)
0 Kudos
Reply
5 Replies

1,080 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Bruce,

Can you explain what is the problem with the ADC, isn't working at all or has some issues while running?

Also as a suggestion, I think is better to create a project for the KL16Z and base your code in the examples from the KL26Z, with this you won't need to modify the startup code or the linker file.

Best Regards,

Alexis Andalon

0 Kudos
Reply

1,080 Views
bgraham
Contributor IV

But when I build a KL16Z project, the SDK and the code generated by MCUxpresso does not compile.

This is due to the latest KL16Z SDK being a version too old for MCUxpresso.

Can you please update the KL16Z SDK?

.

When feed 1.3V and 0.0V, with the 3.3V ref, the ADC is returning 0x0FFF.

I have the pin mux set up. The problem occurs with polling or interrupts.

So, the ADC code for the KL16Z and KL26Z should work the same?

Thanks,

Bruce

0 Kudos
Reply

1,080 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Bruce,

I'm using the SDK from FRDM - KL26Z and MKL16Z128xxx4. Both SDK_2.2.0 Version, 

pastedImage_1.png

I create a new project for the KL16Z:

pastedImage_2.png

And import the libraries I need for the demo I want.

Using the example from the SDK FRDM_KL26 adc16_interrupt as an example, set the new project for the KL16Z. The files you would need to change are this, check the files from the KL26Z to base the new project.

pastedImage_4.png

The option Robin mention is also valid, the diferences between this MCU is only the inclusion of the USB, the linker and the start up  code is almost the same with the inclusion of the USB interruption.

For reference i'm using MCUXpresso 10.3.1.

0 Kudos
Reply

1,080 Views
bgraham
Contributor IV

Thanks for the info. I will try the ADC16 example with a new KL16Z project.

If the KL16Z project works with the ADC16 example, then the KL26Z SDK has a problem with the KL16Z.

.

I would prefer that NXP make a newer KL16Z SDK that works with the new MCUxpresso.

Who did I need to send a request to, to get a new SDK?

.

Thanks,

Bruce

0 Kudos
Reply

1,080 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Thank you for the feedback,

 

Currently this is the only possible way to do this.

 

Sorry for the inconveniences this could cause you.

 

Best Regards,

Alexis Andalon

0 Kudos
Reply