Hello,
I'm using
1) EK-LM3S2965
2) StellarisWare-10636
3) CCS-5.4
I'm able to see signal on SCL0 on PB2 and SDA-0 on PB3 by toggling them as GPIO Pin. So I'm looking at the right pin.
I then run the code below from StarterWare I2C Master example
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); // DIR=1:Out
GPIOPinTypeI2C(GPIO_PORTB_BASE, GPIO_PIN_2 | GPIO_PIN_3); // PB_2 : SCL
I2CMasterInitExpClk(I2C0_MASTER_BASE, SysCtlClockGet(), false);
I2CMasterSlaveAddrSet(I2C0_MASTER_BASE, SLAVE_ADDRESS, false);
while(1)
{
I2CMasterDataPut(I2C0_MASTER_BASE, 0x55);
I2CMasterControl(I2C0_MASTER_BASE, I2C_MASTER_CMD_SINGLE_SEND);
while(I2CMasterBusy(I2C0_MASTER_BASE));
} //
There is NO SCL0 signal on the pin
Below are what I found based on the example
1) GPIO_DIR = 0 : no output settings for I2C0 pins
2) GPIO_PUR = 0 : No pull-up for I2C0 pins
So I change
1) GPIO_DIR = 0xC : output for all I2C0 pins
2) GPIO_PUR = 0xC : pull-up for both I2C0 pins
But there's still no signal on those pins!
Am I missing something ?
Thanks,