FRDM-KL43Z- ADC not receiving any input

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

FRDM-KL43Z- ADC not receiving any input

1,041 Views
keihitomi
Contributor I

I was trying to run the sample project in the SDK that utilize the DAC and ADC but whenever I read the value on the output of the ADC the values are always constant even if I try to change the ADC input values using the DAC's output.  The ADC would always return 3.3V even if I set the DAC's voltage so 1V. This seems to hint that the ADC isn't receiving it's input from the DAC.

I also noticed that the FRDM-KL43Z was listed as a board that needs external sine wave connected either because of lack of the DAC hardware feature support or lack of the SoC/Board signal connection support.  However when I look at the board schematic it seems the DAC is indeed connected to the ADC.

The sample project lists the FRDM-KL43Z as a supported board and it mentions that it uses internal connections to connect the DAC out to the ADC in.

There are also suggestions to jump GPIO pins in some of the sample projects to get the ADC to function however, I'm not sure if I need to jump certain GPIO pins for the ADC to function properly on the FRDM-KL43Z or if it's a software issue.

Tags (1)
0 Kudos
4 Replies

564 Views
dereksnell
NXP Employee
NXP Employee

Hi Kei,

I’ve tried this example using the FRDM-KL43Z board, and I didn’t have an issue with it, see the terminal screenshot below.  I loaded the KSDK example \KSDK_1.2.0\examples\frdmkl43z\demo_apps\dac_adc_demo\iar, and did not need to make any changes to the board for the example to work correctly.

Terminal output.jpg

The document “Kinetis SDK v.1.2.0 Demo Applications User's Guide.pdf” covers the Hardware settings for the “DAC ADC Demo” in section 7.4.2.  This section says “This table shows the connections that are required for each of the supported platforms. Not mentioned platforms use the internal connection.”  The FRDM-KL43Z is not mentioned, and it is using internal connection for the demo

The example firmware sets the ADC channel to convert to BOARD_DAC_DEMO_ADC_CHANNEL, which is defined in the board.h file for that board.  For the FRDM-KL43Z board, this is defined as channel 23 in \KSDK_1.2.0\examples\frdmkl43z\board.h.  From the KL43 reference manual, the channel assignment table below shows channel 23 will read DAC0 output and ADC0_SE23 for external signal. 

ADC Channel Table.jpg

Looking in the pinout of the KL43, the DAC0_OUT signal is shared on the same pin as ADC0_SE23, see pinout below.  So if the DAC0 output is enabled, then the DAC voltage will come out on this pin, and at the same time, the ADC can read it back in.  This is why no hardware modification is required on this board.

Pinout.jpg

This DAC0_OUT signal comes out to the header pins on the FRDM-KL43Z board.  Header J1 pin 16 is tied to this pin.  Since you are always reading 3.3V back in the example, can you try measuring the voltage on this header pin when using the example?  Perhaps there is an issue with your board where this signal is shorted to VDD or some other signal.  When I test it, I’m able to see the DAC voltage change when using the example, and when measuring the voltage, it matches the settings in the example.

Let us know what you find. Thanks

0 Kudos

564 Views
keihitomi
Contributor I

We ran the sample code again with a scope on header J1 pin 16 and it seems like the DAC is working properly.  The measured voltage does change appropriately with the different voltage values selected in the program. However, the ADC still returns the same value.  We ran the same setup with another board as well and got the same results. 

I also noticed on the scope though that the measured voltage seemed to be around 0.2 volts lower than the voltage setup in the program.  For example, if I chose to output 1.5volts in the program the scope would would give a measured voltage of 1.3volts.

I am using IAR to build and setup the example project and nothing in the code has been changed.  I am able to successfully build and download the project to the board but is there anything perhaps in IAR that I need to setup to get the ADC to function properly?

0 Kudos

564 Views
srcoolz
Contributor II

Hello Kei,

I'm running to the same issue that you have mentioned in your post. The only different is that I have a potentiometer connected to the pin (PTE30) instead of using the DAC. Can you please let me know if you have a solution for this problem? The value I get from the ADC is always 4095 (since I have it in the 12-bit mode)

Thank you for your help.

Regards

Santhosh

0 Kudos

564 Views
srcoolz
Contributor II

It seems that I had a problem with the potentiometer, once I fixed it the ADC is working correctly.

Regards

Santhosh

0 Kudos