FRDM-KL03Z Use Internal 1.2 V Reference for ADC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FRDM-KL03Z Use Internal 1.2 V Reference for ADC

ソリューションへジャンプ
2,231件の閲覧回数
Meechy
Contributor I

Hello

I am attempting to use the FRDM-KL03Z ADC with the internal voltage reference instead of  V_REFH which is tied to VDD inside the chip. 

I have the ADC running fine with the VREFH voltage at VDD = 3.3 V. 

I want to instead use the internal voltage reference of 1.2 V.

I have tried the following to change over to the voltage reference: 

1)  Set PMC_HAL_SetBandgapInLowPowerModeCmd(baseAddr, 1); to enable the voltage reference.


2) Set PMC_HAL_SetBandgapBufferCmd(baseAddr, 1); to enable the voltage reference buffer. 

 

3) Set ADC16_HAL_SetRefVoltSrcMode(baseAddr, 1U); to select the alternative reference pair of ValtH and ValtL.

After doing this the ADC producing exactly the same readings as before indicating that it is still using the old reference. Am I missing anything important here? 

0 件の賞賛
返信
1 解決策
2,163件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi,

I use MCUxpresso IDE and KL03 SDK2.3.1.  It only need several step to enable VREF_OUT.

   PORT_SetPinMux(PORTB, 2U, kPORT_PinDisabledOrAnalog);
   VREF_GetDefaultConfig(&vrefConfigStruct);
   VREF_Init(VREF, &vrefConfigStruct);

 

Regards,

Jing

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
2,150件の閲覧回数
Meechy
Contributor I

Hello Jing 

Thanks for your help, I have this working on my platform now.

Regards,

James

0 件の賞賛
返信
2,221件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi Meechy,

what's the voltage of VREF_OUT pin?

 

Regards,

Jing

0 件の賞賛
返信
2,209件の閲覧回数
Meechy
Contributor I

Hello Jing

Thanks for the fast reply. I get a voltage that floats around 0.05 V when measuring PTB2 with my meter. 

I believe this is wrong and is likely causing the problem. Am I right in thinking that the capacitor required for V_REF is already installed on the FRDM-KL03Z board? 

Do you have any suggestions on how I can troubleshoot this further? 

Best wishes,

James 

0 件の賞賛
返信
2,195件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi,

 Please check if you have configure VREF module correctly and mux PTB2 to Vref function.

 

Regards,

Jing

0 件の賞賛
返信
2,174件の閲覧回数
Meechy
Contributor I

Hello Jing

I have configured the mux and now a see a voltage of ~ 3 V between PTB2 and GND. 

Looking at document number: KL03P24M48SF0 it is not clear to me what I need to change to make this voltage 1.2 V. 

Do you have any tips? 

0 件の賞賛
返信
2,164件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi,

I use MCUxpresso IDE and KL03 SDK2.3.1.  It only need several step to enable VREF_OUT.

   PORT_SetPinMux(PORTB, 2U, kPORT_PinDisabledOrAnalog);
   VREF_GetDefaultConfig(&vrefConfigStruct);
   VREF_Init(VREF, &vrefConfigStruct);

 

Regards,

Jing

0 件の賞賛
返信