2006-09-18 07:59 AM
2011-05-17 02:31 AM
QUESTIONS:
1. What is the correct way to reset the I2C hardware to initiate another write or read if error condition? 2. How can I get the status of the BUSY flag (in the ST C-compiler) without affecting the reset of the flags in I2CSR1? BACKGROUND:I curerntly have I2C working in master mode on ST92F150 with interrupts (no DMA) with an EEPROM and RTC with no problems. However, I have trouble trying to detect these I2C cards that are not always in the system. I do this on initalization. I count the number of AF interrupts I get and if greater than 5, I indicate there is nothing at this address and check another one. When not detected, I found that clearing the START bit sometimes works. I have also tried clearing the START and setting the STOP. In both cases, it sometime causes the interface to fail reading the RTC or EEPROM. I think it fails because the interface is alsway busy. [ This message was edited by: Smiles on 18-09-2006 20:30 ]