Part Number: TMS320F2800157
Hi Experts,
We just find out the i2c driverlib function might cause the STT to be set unexpectly in some conner causes.
The typicle i2c examples uses the below sequence:

An interrupt may arrives between send start condition and send stop condition. which will delays the send stop condition a little bit.
In the I2C_sendStopCondition(I2CA_BASE);

The |= operand is used, which would first read the MDR, calculate the logic OR. and then writes MDR.
in the mean time the I2C would clear the STT bit when the start condition has been sent, if this action happens to be between the |= operand, the STT bit would set unexpectedly.
Here's an example.
- read MDR = (STT=1, STP=0) into temp reg, temp reg = (STT=1, STP=0)
- STT get cleard by hardward MDR = (STT=0, STP=0)
- Logic OR with STP bit, temp reg = (STT=1, STP=1)
- write MDR with temp reg, MDR = (STT=1, STP=1)
A workaround is applyed by combining the the STT and STP set into a single writes, such that interrupt can't not come in.
Could you please check how this should be solved in the driberlib?
Regards,
Hang
