This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129 I2C读写EEPROM时一直处于BUSY状态

#define E2PROM_I2C_PERIPH SYSCTL_PERIPH_I2C2
#define E2PROM_I2C_BASE I2C2_BASE
#define E2PROM_I2C_SCL_PERIPH SYSCTL_PERIPH_GPIOG
#define E2PROM_I2C_SCL_PORT GPIO_PORTG_BASE
#define E2PROM_I2C_SCL_PIN GPIO_PIN_2
#define E2PROM_I2C_SDA_PERIPH SYSCTL_PERIPH_GPIOG
#define E2PROM_I2C_SDA_PORT GPIO_PORTG_BASE
#define E2PROM_I2C_SDA_PIN GPIO_PIN_3

//+++++
// Enable Module
//+++++
SysCtlPeripheralEnable(E2PROM_I2C_PERIPH);
SysCtlPeripheralEnable(E2PROM_I2C_SCL_PERIPH);
SysCtlPeripheralEnable(E2PROM_I2C_SDA_PERIPH);
SysCtlPeripheralEnable(E2PROM_WP_PERIPH);
//+++++
// Configure GPIO Pins
//+++++

GPIOPinConfigure(GPIO_PG2_I2C2SCL);
GPIOPinConfigure(GPIO_PG3_I2C2SDA);


GPIOPinTypeI2CSCL(E2PROM_I2C_SCL_PORT, E2PROM_I2C_SCL_PIN);
GPIOPinTypeI2C(E2PROM_I2C_SDA_PORT, E2PROM_I2C_SDA_PIN);

I2CMasterInitExpClk(E2PROM_I2C_BASE, g_dwSystemClock, false); // false表示传输速率是100kbps,true则意味着传输速率是400kbps。
I2CMasterEnable(E2PROM_I2C_BASE);

I2CMasterSlaveAddrSet(E2PROM_I2C_BASE, E2PROM_AT24C512_WRITEADDRESS, FALSE);

I2CMasterDataPut(dwBase, byData);
I2CMasterControl(dwBase, wCmd);
while (I2CMasterBusy(dwBase)); //等待发送完毕

初始化完I2C后,发送数据后,一直等在while,这是怎么回事,请教各位了。。。