Hello. I am using the KL25z and I am running into an interesting problem. Some of the pins are outputting a constant 3.3v when connected through USB despite being configured differently. Specifically I am configuring PTE22 to be ADC input on channel 3 and when connected to the uVision debugger the values don't make any sense. When reading the voltage coming directly out of PTE22 I am seeing 3.3v. When I unplug the cable and power the device through the Vin I see 0v and I assume that means it is functioning as the ADC input. What could be causing this? The code configures everything correctly because I don’t see this problem on a different KL25z that is configured and wired the same way.
Hi owen Lee,
What the KL25 board you are using now? If you use the official board, you can try the official SDK ADC code on your side.
Please use the official SDK code from this link:
Welcome | MCUXpresso SDK Builder
Select the development board as FRDM-KL25, you can find the ADC code in folder:
SDK_2.2_FRDM-KL25Z\boards\frdmkl25z\driver_examples\adc16
Please test it at first, if you still have problems, please kindly let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------