Skip to main content
rbishundeo
Associate
November 24, 2008
Question

Generating Reset & I2C

  • November 24, 2008
  • 4 replies
  • 1054 views
Posted on November 24, 2008 at 06:13

Generating Reset & I2C

    This topic has been closed for replies.

    4 replies

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

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

    rbishundeo
    Associate
    May 17, 2011
    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?

    janek
    Associate III
    May 17, 2011
    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

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

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