Fluctuation/Instability in ADC of K60

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Fluctuation/Instability in ADC of K60

1,089 次查看
rafaelwerneck0
Contributor I

Hello.

My tests were based on the sample project "adc_demo" of the IAR directory (C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\examples\Freescale\Kinetis\adc_demo).

This example make the measurement of the potentiometer on the ADC1_DM1 channel, as shown below:

26115_26115.pngpastedImage_3.png

When the potentiometer is at 0V position (I also put the ADC1_DM1 pin on GND to make sure that the value is 0V), I have unstable measurements of this ADC channel after a reset (either at reset button SW3, or reset by IAR software).

Below the stable measurement:

26116_26116.pngpastedImage_4.png

 

After the reset, we have the following values, with a wide variation in R1B (potentiometer channel):

26120_26120.pngpastedImage_5.png

 

After a few more resets it back to be stable.

In the original example of IAR, only made some small modifications, such as:

- PMC_REGSC |= 1;        // To enable the bandgap buffer to read bandgap value.

- Master_Adc_Config.STATUS1A = AIEN_ON | DIFF_SINGLE | ADC_SC1_ADCH(0x1B); // Bandgap Read in ADC0_RA.

- Master_Adc_Config.STATUS1B = AIEN_ON | DIFF_SINGLE | ADC_SC1_ADCH(0x1B); // Vrefsh read in ADC0_RB.

- Master_Adc_Config.STATUS1A = AIEN_ON | DIFF_SINGLE | ADC_SC1_ADCH(0x1E); // Vrefsl read in ADC1_RA.

- Master_Adc_Config.STATUS1B = AIEN_ON | DIFF_SINGLE | ADC_SC1_ADCH(ADC1_CHANB);             // Potentiometer read.

- printf("Bandgap=%6d  VREFSH=%6d  VREFSL=%6d  R1B=%6d\r\n", result0A,result0B,result1A,result1B);        // To show the results in console (UART).

 

 

The sample project is attached.

Original Attachment has been moved to: adc_demo.zip

标签 (1)
标记 (2)
0 项奖励
回复
5 回复数

781 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

There are two tower boards for K60 product. TWR-K60D100M and TWR-K60N512 boards, which board you are testing with?


Have a great day,
Ma Hui

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

0 项奖励
回复

781 次查看
rafaelwerneck0
Contributor I

Hello Ma Hui,

I'm using the TWR-K60F120M. The MCU that is in the board is the "PK60FN1M0VLQ12".

For schematic reference, SCH-27167 rev C.

Best Regards,

Rafael Werneck

0 项奖励
回复

781 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Rafael,

I had done a same test with TWR-K60F120M board (SCH-27167 rev C1) and below is the test hardware platform:

test environment.png

I don't modify any hardware design and during the test, the ADC conversion result is stable.

Please check my test result video record.

I am using [FLASH-1M] target and program the TWR-K60F120M board with debugger tool connection.


Have a great day,
Ma Hui

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

0 项奖励
回复

781 次查看
rafaelwerneck0
Contributor I

Hi Ma Hui,

In the SCH-27167, what the difference between rev C and rev C1?

Did you make the reset by the SW3 button? If so, could you try to make the reset by debugger software?

Best Regards,

Rafael Werneck

0 项奖励
回复

781 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Rafael,

The difference between Rev C vs. Rev C1 is Rev C1 just replace two obsolete resistors (R13 and R14) with new resistor part number, which does not affect Potention-meter circuit.

In the video, I am using SW3 to reset the board.

I try to use debugger to reset the board, there without any change about ADC conversion result value.


Have a great day,
Ma Hui

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

0 项奖励
回复