Hello,
We're having some trouble using I2C5 on the TM4C123GH6PGE. When the Pins are configured as I2C, the SDA line is pulled low and subsequently stays low... resulting in the bus always being busy. We have used the same TIVA device successfully with other I2C peripherals, and we've never seen this issue before. Is there some quirk of I2C5 (compared to I2C0..4) that I'm missing? Or something specific to GPIOG_7?
This is the pin configuration sequence in TivaWare Code:
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C5); //Enable I2C5 while( !SysCtlPeripheralReady(SYSCTL_PERIPH_I2C5)){ //Wait until peripheral Ready } SysCtlPeripheralReset(SYSCTL_PERIPH_I2C5); //Reset I2C0 Peripheral GPIOPinConfigure( GPIO_PCTL_PG6_I2C5SCL ); //I2C 5 GPIOPinConfigure( GPIO_PCTL_PG7_I2C5SDA ); GPIOPinTypeI2CSCL( GPIO_PORTG_BASE, GPIO_PIN_6 ); I2CMasterGlitchFilterConfigSet( I2C5_BASE, I2C_MASTER_GLITCH_FILTER_16 ); // Configure SDA GPIODirModeSet(GPIO_PORTG_BASE, GPIO_PIN_7, GPIO_DIR_MODE_HW); // Make the pin(s) be peripheral controlled. GPIOPadConfigSet(GPIO_PORTG_BASE, GPIO_PIN_7 , GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD); // Set the pad(s) for open-drain operation with a weak pull-up. //SDA Line pulled low after GPIOPadConfigSet! I2C_WaitBusy(I2C5_BASE);
Many Thanks,
Tom