Skip to content

I2C issue causes hang on driver load? #316

Closed

Description

@rfmerrill

So I have a raspberry pi connected to an array of 18 AVR microcontrollers through one of adafruit's I2C-friendly level shifters.

The ATMega328 datasheet is very clear in mentioning that a powered-off microcontroller will render an attached I2C bus inoperable. I'm fine with this (there are no other devices on the bus anyway), the problem is that when they are powered off (with grounds still connected together, and the level shifter powered on), the Pi gets stuck in the boot process at the point where the I2C driver would normally load.

Activity

  1. popcornmix commented on Jun 23, 2013

    @popcornmix
    Collaborator

    Are you able to rebuild the kerenel and insert logging?

  2. P33M commented on Jun 23, 2013

    @P33M
    Contributor

    So are you saying that to cause the hang, you just need to keep SCL and SDA pulled low while the driver is probing?

    Are you using just the BCM2708 I2C adapter driver and no other i2c modules?

  3. cbeytas commented on Jun 29, 2013

    @cbeytas

    If I have SCL1 (GPIO3) shorted to ground at power-up, it will boot the emergency kernel.
    You can place a regular .1" jumper across GPIO3 and GND (pins 5-6 on P1 for a rev2 board).
    It is almost as if something is looking at GPIO3 to determine which kernel to load.

    If SCL1 is shorted immediately after the normal kernel starts to load, everything goes well including loading the i2c driver. After it boots and the short is removed I can access my I2C devices with no problems.

  4. popcornmix commented on Jun 29, 2013

    @popcornmix
    Collaborator

    Sounds like safe mode:
    http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=12007

    Add avoid_safe_mode=1 to config.txt.

  5. cbeytas commented on Jun 29, 2013

    @cbeytas

    Ok that makes sense. The emergency kernel finishes booting right where you would expect the I2C driver to load. You have to press ENTER to get a prompt.

    I really wish they chose some other pin because I2C devices can hold that line low, especially during power-up when things are coming out of reset. Anyways, avoid_safe_mode works for me. Should be documented somewhere?

  6. popcornmix commented on Jun 30, 2013

    @popcornmix
    Collaborator

    It's described here: http://elinux.org/RPI_safe_mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions