cancel
Showing results for 
Search instead for 
Did you mean: 

I2C

scott239955
Associate II
Posted on September 18, 2006 at 16:59

I2C

1 REPLY 1
scott239955
Associate II
Posted on May 17, 2011 at 11:31

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 ]