Hello,
I am trying to run the I2C bus on a TD1208R.
In the debug mode it’s working (I see the signal on the SDA and SCL pins with an oscilloscope) but in release mode I see nothing and the program is blocked in the while function.
My configuration in the both case is the same. Take note that in both case I’m using the corresponding files (debug files for debug mode and release files for release mode)
I’m using the portable eclipse found in the SDK.
Here is my code:
CMU_ClockEnable(cmuClock_I2C0, true);
GPIO_PinModeSet(SCL_PORT, SCL_BIT, gpioModeWiredAnd, 1);
GPIO_PinModeSet(SDA_PORT, SDA_BIT, gpioModeWiredAnd, 1);
I2C0>ROUTE=I2C_ROUTE_SDAPEN|I2C_ROUTE_SCLPEN|_I2C_ROUTE_LOCATION_LOC;
i2cInit.enable =true;
i2cInit.master =true;
i2cInit.refFreq =0;
i2cInit.freq =I2C_FREQ_FAST_MAX;
i2cInit.clhr = i2cClockHLRStandard;
I2C_Init(I2C0, &i2cInit);
i2cTransfert.addr = ADRESSE_I2C_ADD;
i2cTransfert.flags = I2C_FLAG_WRITE;
i2cTransfert.buf[0].data = values;
i2cTransfert.buf[0].len = 0;
_status = I2C_TransferInit(I2C0, &i2cTransfert);
while (_status == i2cTransferInProgress)
{
_status = I2C_Transfer(I2C0);
}
Thanks,
Regards,
Gterrier.