Hi
Since I am presently doing some I2C investigations I have picked up on this old post.
The first thing to note is that I have used the uTasker master I2C driver for a couple of years in interrupt mode without any time delays. However I could imagine that a delay is used in some code to avoid a following I2C message from being started when the stop condition of a previous message has not completed. In the uTasker driver there is a check for the bus busy when a new message is to be sent (but a repeated start can not be used since there is no present activity that the SW "knows" about):
| while (*register_ptr & IIC_IBB) {} | // wait until the stop has actually been sent to avoid a further transmission being started in the mean time |
The reason is that a stop condition could have been sent to complete a previous transfer but the stop condition takes (from a SW point of view) quite a long time to actually take place and complete). For the SW driver the stop has been commanded and there is nothing else to do. When a follow on message is to be sent, checking the bus busy state will show whether a previously commanded stop condition has completed or not. If the bus is still busy due to this a new start can not yet be sent and so one needs to wait a "short time". The time that it takes is of course bus speed depended and also dependent on bus loading (capacitance - number of devices, length etc.) and so if this interval is to be protected by a delay the delay must be a worst case delay for the system.
If the bus busy check is doing effectively the same thing as the delay (waiting a short time for previous activity to complete) it is probably a more suitable solution due to two reasons:
1. it is self timed
2. It only takes place when actually needed. (No delays are required for repeated starts and it is possible to continuously use back-to-back transmissions without any spacing between them).
I haven't checked the code with the delay in it so it may be a different issue. However the uTasker I2C driver is used on all Kl and K devices and there is no knowledge of problems or errate workarounds needed.
Regards
Mark