Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Dear TI Team
I'm using the 20-pin M0G3105QDGS20Q1 chip.
I'm assigning pin PA18 as a GPIO input, reading it at certain times, and using it as a GPIO output under normal circumstances.
I implemented it using the following function sequence, but it's not working properly. Could you please check it?
1) SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void)
DL_GPIO_initDigitalOutput(I2C_SDA_MCU_PA18_IOMUX); // GPIO Output setting
2) main function : GPIO Read is not working
// I want to change the GPIO Input mode for Data reading
DL_GPIO_initDigitalInputFeatures(I2C_SDA_MCU_PA18_IOMUX,
DL_GPIO_INVERSION_DISABLE, DL_GPIO_RESISTOR_NONE,
DL_GPIO_HYSTERESIS_DISABLE, DL_GPIO_WAKEUP_DISABLE);
3) GPIO Read
temp = DL_GPIO_readPins(GPIOA, I2C_SDA_MCU_PA18_PIN);
--> not reading correctly ,
2) main function : GPIO Write , function is ok
DL_GPIO_initDigitalOutput(I2C_SDA_MCU_PA18_IOMUX); // GPIO Output setting
DL_GPIO_setPins(GPIOA, I2C_SDA_MCU_PA18_PIN);
DL_GPIO_clearPins(GPIOA, I2C_SDA_MCU_PA18_PIN);
I'm wondering if there's something wrong with switching the GPIO mode between input and output and reading it when set to input. I want to read it in polling mode, not interrupt mode.