MKM35Z Vref

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

MKM35Z Vref

347 Views
dporada
Contributor III

Hello, I'm trying to set up the Vref on a MKM35ZX512VLL7.  I am unable to get voltage on the Vref pin, but I have voltage on the Vrefh pin.  I ran the Vref demo on the TWR-KM35Z75M board and the Vref pin has an output.  I tried running the demo code on my board, but I still have no output.

I tried pasting the Vref demo configuration into my code, but still no output.

Am I missing something to enable the output pin?

Thanks,

Don

0 Kudos
5 Replies

311 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

On the TWR-KM35Z75M board, you test the pin2 of J2 which is VREF pin.

As the following fig, if you want to output 1,2V internal reference to the Vref pin, you must close S2 and S1, in other words, the S2 is connected to 1.2V internal reference.

Pls configure the two reg:

S1 corresponds to VREF Buffer Output Enable:
SIM_MISC_CTL[VREFBUFOUTEN];
• S2 corresponds to VREF Buffer Input Select:
SIM_MISC_CTL[VREFBUFINSEL];

xiangjun_rong_0-1708412713363.png

Hope it can help you

BR

XiangJun Rong

0 Kudos

297 Views
dporada
Contributor III
I thought you had my answer since I didn't have the registers configured.
 
Here's how they are currently configured:
 
VREFBUFOUTEN Value_1 RW [29] VrefBuffer Output Enable
VREFBUFINSEL Value_0 RW [30] VrefBuffer Input Select
VREFBUFPD Value_0 RW [31] VrefBuffer Power Down
 
Still no output.

 

0 Kudos

289 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls try to use the code:

void vrefinit(void)

{

//enable Vref gated clock'

SIM->SCGC4|=1<<15;

//set the Vref output via Vref pin

SIM->MISC_CTL&=0x1FFFFFFF;

SIM->MISC_CTL|=1<<29;

/*

* vrefConfig.bufferMode = kVREF_ModeHighPowerBuffer;

* vrefConfig.enableExternalVoltRef = false;

* vrefConfig.enableLowRef = false;

*/

VREF_GetDefaultConfig(&vrefConfig);

/* Initialize the VREF mode. */

VREF_Init(DEMO_VREF_BASE, &vrefConfig);

 

}

 

I have not the KM35 tower board on hand, pls try the above code and check the Vref pin voltage.

If it does not work, I will look for one board and have a test.

 

BR

XiangJun Rong

0 Kudos

277 Views
dporada
Contributor III

Just to be sure you understand, programs work on the TWR board, but not on my board.

I tried you code, but the output still reads 0V with 1.2V on VrefH.

0 Kudos

268 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As you know that the Vref and Vrefh are two independent pins for KM35, if you test vrefh pin voltage, pls see the routing, S3 must switch to 1.2V internal reference.

xiangjun_rong_0-1708573029245.png

 

Pls try to use the code.

I have not the TWR-KM35 board, I can not have a test, sorry.

/* VrefBuffer Power on: Buffer Enabled */

SIM->MISC_CTL &= ~SIM_MISC_CTL_VREFBUFPD_MASK;

PRINTF("\r\nVREF example\r\n");

 

/*

* vrefConfig.bufferMode = kVREF_ModeHighPowerBuffer;

* vrefConfig.enableExternalVoltRef = false;

* vrefConfig.enableLowRef = false;

*/

VREF_GetDefaultConfig(&vrefConfig);

vrefConfig.enableExternalVoltRef=true;

/* Initialize the VREF mode. */

VREF_Init(DEMO_VREF_BASE, &vrefConfig);

Pls have a try.

Hope it can help you

BR

XiangJun Rong

0 Kudos