Hello, about how to enable the pull-up and pull-down of the Port port in the S32K14x series software
Hi @chuanlin,
You can change the configuration for the pins inside the Pins view for Config Tools:
This changes the g_pin_mux_InitConfigArr0 array, which is used inside the PINS_Init function:
#if FEATURE_PINS_HAS_PULL_SELECTION
switch (config->pullConfig)
{
case PORT_INTERNAL_PULL_NOT_ENABLED:
{
regValue &= ~(PORT_PCR_PE_MASK);
}
break;
case PORT_INTERNAL_PULL_DOWN_ENABLED:
{
regValue &= ~(PORT_PCR_PS_MASK);
regValue |= PORT_PCR_PE(1U);
}
break;
case PORT_INTERNAL_PULL_UP_ENABLED:
{
regValue |= PORT_PCR_PE(1U);
regValue |= PORT_PCR_PS(1U);
}
break;
default:
/* invalid command */
DEV_ASSERT(false);
break;
Best regards,
Julián