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
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];
Hope it can help you
BR
XiangJun Rong
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
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.
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