AnsweredAssumed Answered

missing PORT_PCR_PS in Pull Select configuration

Question asked by Guillaume Audirac Employee on Jul 19, 2018
Latest reply on Jul 29, 2018 by Jorge Antonio Alcala Vazquez

When using the Config Tools v4.1 (MCUXpresso 10.2)

 

Conditions:

product: Pins v4.1
processor: MK64FN1M0xxx12
package_id: MK64FN1M0VMD12
mcu_data: ksdk2_0
processor_version: 4.0.0
board: FRDM-K64F

pin_mux.c extract:

/* PORTE26 (pin K4) is configured as PTE26 */
PORT_SetPinMux(BOARD_INITPINS_KW41_UART_RTS_PORT, BOARD_INITPINS_KW41_UART_RTS_PIN, kPORT_MuxAsGpio);

/* Interrupt configuration on PORTE26 (pin K4): Interrupt on rising edge */
PORT_SetPinInterruptConfig(BOARD_INITPINS_KW41_UART_RTS_PORT, BOARD_INITPINS_KW41_UART_RTS_PIN, kPORT_InterruptRisingEdge);

PORTE->PCR[26] = ((PORTE->PCR[26] &
    /* Mask bits to zero which are setting */
    (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_PFE_MASK | PORT_PCR_ISF_MASK)))

    /* Pull Select: Internal pulldown resistor is enabled on the corresponding pin, if the
     * corresponding PE field is set. */
    | (uint32_t)(kPORT_PullDown)

    /* Passive Filter Enable: Passive input filter is enabled on the corresponding pin, if the
     * pin is configured as a digital input.
     * Refer to the device data sheet for filter characteristics. */
    | PORT_PCR_PFE(kPORT_PassiveFilterEnable));

Why "(uint32_t)(kPORT_PullDown)" and not "PORT_PCR_PS(kPORT_PullDown)"?

Even if it is functionaly identical, it creates some discrepancies in the pin_mux.c file.

Outcomes