AnsweredAssumed Answered

RT106x - Using GPIO and special function on the same pin at the same time

Question asked by Carsten Groen on Mar 20, 2019
Latest reply on Mar 22, 2019 by Carsten Groen

Hello,

I'm working on the software for a RT1064 design, and I'm having a hard time understanding the (complex) GPIO/MUX/PAD thing....

 

I have a device connected to LPSPI3, and I need to monitor the level of the LPSPI3 SDI input at some point during initialization of the SPI device.

 

I initialize the LPSPI3 SDI/SDO and SCK with this (I control the CS signals "manually"):

IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_13_LPSPI3_SDI, 0U);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_14_LPSPI3_SDO, 0U);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_15_LPSPI3_SCK, 0U);

IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_13_LPSPI3_SDI, 0x10B0u);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_14_LPSPI3_SDO, 0x10B0u);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_15_LPSPI3_SCK, 0x10B0u);

 

and this works perfect (I have another device on the SPI bus which I can talk with)

 

Now, I also need to be able to do:

GPIO_PinRead(GPIO1, 29)

 

to monitor the level of the SDI pin.

What kind of initialization do I need to have both the GPIO_AD_B1_13 pin connected to the LPSPI3 SDI and the GPIO1.29 signal ?

Outcomes