Hi,
Continuing on with my I2C "quest", I've got the FIFO DMA transfers nicely working. But when planning to start testing how much data can be transferred interrupt-less, I ran into contradicting information when checking the TivaWare manual, driverlib/i2c.c source code and the TM4C1294NCPDT datasheet.
TivaWare manual on the function I2CMasterBurstLengthSet(uint32_t ui32Base, uint8_t ui8Length):
The burst field is limited to 8 bits or 256 bytes.
TivaWare/driverlib/i2c.c source (I2CMasterBurstLengthSet, line 1986):
ASSERT(_I2CBaseValid(ui32Base) && (ui8Length < 255));
TM4C1294NCPDT datasheet, on Register 12: I2C Master Burst Length (I2CMBLEN):
(Bits 7:0)
I2C Burst Length
This field contains the programmed length of bytes of the Burst
Transaction. If BURST is enabled this register must be set to a non-zero
value otherwise an error will occur.
Thus, the impression one gets from reading the TivaWare manual is that the max. length of one burst transfer is 256 bytes (which given the data type would imply that the device interprets the transfer length as given + 1).
The datasheet, however, reveals that 0 is not a valid value. Thus, 255 must be the max. value.
But in the source code, an assert requires the length parameter to be less than 255, so max 254.
My conclusion is that the real maximum is 255, the function documentation is wrong and that the assert should actually be (ui8Length <= 255) - which by nature of the datatype would always evaluate to true. Amit, can you confirm?