Page 1 of 1

Please adapt I2c_Rd and I2c_Wr w.r.t. interrupts

Posted: 19 Aug 2008 12:16
by Dany
Hi,
Please adapt I2c_Rd and I2c_Wr with respect to (other) interrupts (mP v 8.0.0.1). The current versions of those routines tend to block (do not "return") when an interrupt occurs in the beginning of the routines.
This is because the "done" flag ("SSPIF" in this case) is cleared while the I2c activity has been already started. If the interrupt occurs between starting reading/writing and the clearance of the "done" flag, then the problem occurs.

see http://www.mikroe.com/forum/viewtopic.p ... highlight=

Thanks in advance! :D

p.s. I assume this problem is not only a mikroPascal problem, so it can be valid for other wish lists too.