Changing the BeagleBoard I2C Bus Frequency

The stock kernel runs the I2C bus exposed on the BeagleBoard’s expansion header (bus 2) at 400KHz  (‘Fast’ mode). This is fine for most I2C slaves, however it seems to be too fast for slaves running on ATTiny and ATMega microcontrollers, even when running with an 8MHz clock. For me this was resulting in intermittent bus lock-ups when attempting to access the slave.

The I2C bus speed is set in the kernel in /arch/arm/mach-omap2/board-omap3beagle.c on this line:

omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, ARRAY_SIZE(beagle_i2c2_boardinfo));

A bus speed of 100KHz seems to work reliably with the ATTiny2313. If you’re using Ubuntu you can use the instructions at the end of this article to rebuild a BeagleBoard-specific kernel.

Advertisements
This entry was posted in BeagleBoard, I2C, Microcontrollers, Uncategorized and tagged , , , . Bookmark the permalink.

One Response to Changing the BeagleBoard I2C Bus Frequency

  1. Pingback: Installing Ubuntu (Natty) on the BeagleBoard with RootStock | Yet Another Hacker's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s