Hi!
ive already searched through various topics, API manuals (i2c.h) and so on, but still i cant achieve my goal (at least send write byte as master).
You can see my code below. After calling those two functions i can not see any activity on SDA or SCL pins via scope.
any help would be really appreciated!
cheers Jan
EDIT1: Weird is, that after ive add while(I2CMasterBusy(I2C0_BASE)); code stuck there (like master would be busy all the time?) But still nothing at SDA SCL pins :(
- using i2c.h library (TI driverlib)
void I2CInit(void)
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
GPIOPinConfigure(GPIO_PB2_I2C0SCL);
GPIOPinConfigure(GPIO_PB3_I2C0SDA);
GPIOPinTypeI2CSCL(GPIO_PORTB_BASE, GPIO_PIN_2);
GPIOPinTypeI2C(GPIO_PORTB_BASE, GPIO_PIN_3);
I2CMasterInitExpClk(I2C0_BASE, SysCtlClockGet(), false);
I2CMasterEnable(I2C0_BASE);
}
void test(void)
{
I2CMasterSlaveAddrSet(I2C0_BASE, SLAVE_ADDRESS, false);
I2CMasterDataPut(I2C0_BASE, 0xAC);
I2CMasterControl(I2C0_BASE, I2C_MASTER_CMD_SINGLE_SEND);
while(I2CMasterBusy(I2C0_BASE));
}