S32K14x port

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

S32K14x port

835 Views
chuanlin
Contributor III

chuanlin_0-1708666778049.png

Hello, about how to enable the pull-up and pull-down of the Port port in the S32K14x series software

0 Kudos
Reply
1 Reply

799 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @chuanlin,

You can change the configuration for the pins inside the Pins view for Config Tools:

Julin_AragnM_2-1708948490712.png

Julin_AragnM_3-1708948504088.png

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

0 Kudos
Reply