cancel
Showing results for 
Search instead for 
Did you mean: 

Generating Reset & I2C

rbishundeo
Associate II
Posted on November 24, 2008 at 06:13

Generating Reset & I2C

4 REPLIES 4
rbishundeo
Associate II
Posted on May 17, 2011 at 12:53

After searching through the forums I've finally figured out how to trigger a software reset in my code (other than watchdog). My problem now is with the I2C bus always being set to busy whenever I come out of a reset and try to re-initialize the bus. So far my only solution to be able to clear the busy bit is to power down/up my device. I've tried DeIntI2C() library function, which does clear the busy bit, but as soon as I re-int the I2C, the bit is set again. This inherently causes my code to continuously reset due to wdt timeout every time I access the I2C bus. Any ideas?

brianforde9
Associate II
Posted on May 17, 2011 at 12:53

Did you init the GPIO pins before taking the I2C out of reset?

rbishundeo
Associate II
Posted on May 17, 2011 at 12:53

yeah. on powerup i reset all the GPIO's before initializing any peripherials.

janek
Associate II
Posted on May 17, 2011 at 12:53

Any luck yet?

If not, try the following:

- check if both CLK and DATA lines are high (assume you have a 4.7k pullup resistors to VCC)

- apply the same code to second I2C module

Good luck.

Jan