Hi @Joey_z
That is helpful, thank you.
I was able to reproduce your result. I see open-drain behavior when I2C0 SCL is routed to PTB0 (pin 35).
I also see open-drain behavior on I2C1 SCL when it is routed to PTE1 (pin 2).
In the above two cases, I can successfully communicate with a target device that requires clock stretching.
However, I still see push-pull behavior on I2C1 SCL when routed to PTC1 (pin 44). Is there something different about this pin? Perhaps open-drain configuration is only available on specific pins? If that is the case, please point me to a table that describes which pins have open-drain configuration available to them.
Otherwise, maybe there is a hidden bit somewhere in the pin configuration that is responsible for the open-drain configuration? If so, please provide instructions for configuring a pin as open-drain.
Below I show scope traces for the 3 scenarios described above, along with the pin configuration for each. Note that the pin configurations generated by MCUXpresso Config Tools are identical.
1. Successful communication with I2C0 (open drain SCL)

/* PORTB0 (pin 35) is configured as I2C0_SCL */
PORT_SetPinMux(PORTB, 0U, kPORT_MuxAlt2);
PORTB->PCR[0] = ((PORTB->PCR[0] &
/* Mask bits to zero which are setting */
(~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK)))
/* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */
| (uint32_t)(PORT_PCR_PE_MASK));
/* PORTB1 (pin 36) is configured as I2C0_SDA */
PORT_SetPinMux(PORTB, 1U, kPORT_MuxAlt2);
PORTB->PCR[1] = ((PORTB->PCR[1] &
/* Mask bits to zero which are setting */
(~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK)))
/* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */
| (uint32_t)(PORT_PCR_PE_MASK));
2. Successful communication with I2C1 (open drain SCL)

/* PORTE0 (pin 1) is configured as I2C1_SDA */
PORT_SetPinMux(BOARD_I2C1_SDA_PORT, BOARD_I2C1_SDA_PIN, kPORT_MuxAlt6);
PORTE->PCR[0] = ((PORTE->PCR[0] &
/* Mask bits to zero which are setting */
(~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK)))
/* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */
| (uint32_t)(PORT_PCR_PE_MASK));
/* PORTE1 (pin 2) is configured as I2C1_SCL */
PORT_SetPinMux(BOARD_I2C1_SCL_PORT, BOARD_I2C1_SCL_PIN, kPORT_MuxAlt6);
PORTE->PCR[1] = ((PORTE->PCR[1] &
/* Mask bits to zero which are setting */
(~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK)))
/* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */
| (uint32_t)(PORT_PCR_PE_MASK));
3. Unsuccessful communication with I2C1 (push-pull SCL)

/* PORTC2 (pin 45) is configured as I2C1_SDA */
PORT_SetPinMux(PORTC, 2U, kPORT_MuxAlt2);
PORTC->PCR[2] = ((PORTC->PCR[2] &
/* Mask bits to zero which are setting */
(~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK)))
/* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */
| (uint32_t)(PORT_PCR_PE_MASK));
/* PORTC1 (pin 44) is configured as I2C1_SCL */
PORT_SetPinMux(PORTC, 1U, kPORT_MuxAlt2);
PORTC->PCR[1] = ((PORTC->PCR[1] &
/* Mask bits to zero which are setting */
(~(PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK)))
/* Pull Enable: Internal pullup or pulldown resistor is enabled on the corresponding pin. */
| (uint32_t)(PORT_PCR_PE_MASK));