I am seeing an issue on the I2C bus when my project starts up, where the SDA line is always low, so the Stellaris waits forever for the bus to be idle. There's not much info available in the LM48901 on how/when it initiates I2C master mode, so I'm wondering if there is a master vs master problem here. My code to initialize the Stellaris I2C is provided here (I've stripped the code I'm using down to bare minimum to test only the I2C)
ROM_SysCtlClockSet((SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ));
// Enable necessary peripherals
//
ROM_SysCtlPeripheralEnable( SYSCTL_PERIPH_I2C0 );
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
// Configure the pin functions on the GPIO port
//
GPIOPinConfigure( GPIO_PB2_I2C0SCL );
GPIOPinConfigure( GPIO_PB3_I2C0SDA );
ROM_GPIOPinTypeI2C( GPIO_PORTB_BASE, GPIO_PIN_2 | GPIO_PIN_3 );
// configure the I2C peripheral speed to 100kbs
//
ROM_I2CMasterInitExpClk( I2C0_MASTER_BASE, ROM_SysCtlClockGet(), 0);
//
// Turn on all interrupts in the system.
//
ROM_IntMasterEnable();
Further information, the only devices on the I2C bus are the Stellaris, the LM48901, and an I2C EEPROM.
Any suggestions would be greatly appreciated.
Ron