I am using I2C on the launchpad connected to a TelAire ChipCap2 that reads humidity and temperature. I cant get beyond the very first MasterBusy(). My code is: g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000); uint32_t baseAddress = I2C0_BASE; uint32_t sysCtlPeripheral = SYSCTL_PERIPH_I2C0; // // Disable, Reset and Enable the I2C Module Instance // ROM_SysCtlPeripheralDisable(sysCtlPeripheral); ROM_SysCtlPeripheralReset(sysCtlPeripheral); ROM_SysCtlPeripheralEnable(sysCtlPeripheral); ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); GPIOPinConfigure(GPIO_PB2_I2C0SCL); GPIOPinConfigure(GPIO_PB3_I2C0SDA); GPIOPinTypeI2C(GPIO_PORTB_BASE, GPIO_PIN_3); // SDA GPIOPinTypeI2CSCL(GPIO_PORTB_BASE, GPIO_PIN_2); // SCL // // Configure the I2C Baud Rate // I2CMasterInitExpClk(baseAddress,g_ui32SysClock,false); // true = 400Kbps, false = 100Kbps // // Enable I2C Master Operation // I2CMasterEnable(baseAddress); ROM_SysCtlDelay(10000); // suggested from someones example between I2CMasterInitExpClk and I2CMasterSlaveAddrSet uint8_t testData[4]; //uint32_t baseAddress = I2C0_BASE; uint32_t i2cAddress = 0x28; I2CMasterSlaveAddrSet(baseAddress, i2cAddress, I2C_READ); I2CMasterControl(baseAddress, I2C_MASTER_CMD_BURST_RECEIVE_START); // does this actually puts something out on bus? while(I2CMasterBusy(baseAddress)); // after this would be the correct time to check for I2C_ACK ? ##### Always Stuck Here ####### testData[0] = I2CMasterDataGet(baseAddress); I2CMasterControl(baseAddress, I2C_MASTER_CMD_BURST_RECEIVE_CONT); // does this actually puts something out on bus? while(I2CMasterBusy(baseAddress)); testData[1] = I2CMasterDataGet(baseAddress); I2CMasterControl(baseAddress, I2C_MASTER_CMD_BURST_RECEIVE_CONT); // does this actually puts something out on bus? while(I2CMasterBusy(baseAddress)); testData[2] = I2CMasterDataGet(baseAddress); I2CMasterControl(baseAddress, I2C_MASTER_CMD_BURST_RECEIVE_FINISH); // does this actually puts something out on bus? while(I2CMasterBusy(baseAddress)); testData[3] = I2CMasterDataGet(baseAddress); I have tried variations in MasterControl of I2C_MASTER_CMD_SINGLE_RECEIVE I2C_MASTER_CMD_BURST_RECEIVE_START I have connected this device to a different processor to make sure device works, I2C address is correct and my pinout is correct. I have connected on the breadboard adaptor: 61 - shield 62 - ground 67 - I2C0SCL (PB2 on processor) 69 - I2C0SDA (PB3 on processor) 98 - (+3.3 volts) I'm not sure if pins are properly configured in software on launchpad (ie no conflict with other operations) or that the read is not properly constructed. (Shouldnt I need to explicitly test for slave ACK or is completion of MasterBusy() sufficient?) The device has no command writes, just a single read multiple times.
Sorry if this is too much info, but can't see why I never get past the first MasterBusy(). Thanks for any help, -Phil B