2009-01-28 02:49 AM
I2C problems
2011-05-17 03:30 AM
Hi jj.sprague,
I'm not saying that This AN is solving issues of I2C, but It is an announcement of a new AN that extends the use of I2C cell in an advanced way with more practice examples and comes to enrich the already provided examples in the FW libraries. For what regards the Library, we can refer to file ''version.txt'' where we can find all new improvements and evolution history of the Library and examples. Hope that you have found what you are seeking for then you appreciate it. Cheers, STOne-32. [ This message was edited by: STOne-32 on 24-09-2008 21:25 ]2011-05-17 03:30 AM
Hi all,
In our application we have the same I2C Rx extra byte problem. The problem has been solved by disabling the ACK and sending the STOP before the last byte is received. But now we have another problem. In our case all the communication routines have been implemented by using interrupts. In addition we allow nested interrupts and in the case of the I2C communication there is a SPI communication with higher priority. The problem occurs when during the I2C Rx sequence a SPI interrupt is received. If the interrupt is received during the byte reception the extra byte problem appears again. And after the SPI ISR is finished we are not able to recover the I2C communication (SCL AND SDA low). I attach an oscilloscope capture with this problem. The yellow signal is the SPI SCK, the blue signal is I2C SDA, the pink signal is I2C SCL and the green signal is a dummy signal that toggles when an I2C event interrupts. Therefore you can see that after the last green signal toggle (due a I2C_EVENT_MASTER_BYTE_RECEIVED event) 2 bytes are received and the second one is not due to an interrupt event. The problem is solved by disabling the SPI interrut during I2C Rx commands but we would like to keep the SPI running during I2C communications as SPI received data needs to be read in real time. Thanks in advance