• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » OMAP™ Processors » OMAP35x Processors Forum » [OMAP35xx] i2c bus, slave mode?
Share
OMAP™ Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS
Resources
  • OMAP-L1x DSP+ARM9™-based Processors Product Folder
  • OMAP3525/30 DSP+ARM Cortex™-A8-based SOCs Product Folder

  • Top OMAPL Wiki Links
  • OMAPL3x Schematic Review Checklist
  • OMAPL13x Boot resources

  • OMAPL Document Resources
  • OMAPL137 Technical reference manual
  • OMAPL138 Technical reference manual
  • OMAPL Boot loader App Notes
  • [OMAP35xx] i2c bus, slave mode?

    [OMAP35xx] i2c bus, slave mode?

    This question is not answered
    Youssef Djalali
    Posted by Youssef Djalali
    on Feb 13 2010 15:12 PM

    I need to use the I2C bus interface in slave mode, but I can't  find any hint on how to proceed.

    Is there a Linux module or some demonstration software to use the I2C Bus in slave mode for OMAP35xx  processor
    family?

    Thanks for any suggestions.


    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Sebastian Geissler
      Posted by Sebastian Geissler
      on Mar 30 2010 16:45 PM
      Prodigy160 points

      Hello,

       

      I don't know if you're still waiting for an answer... I currently try to implement an I2C-slave-driver in linux (the easy way) - that means I take the standard I2c-master code for the OMAP3530 and expand it so that it can also operate in slave mode.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Youssef Djalali
      Posted by Youssef Djalali
      on Mar 31 2010 01:38 AM
      Prodigy0 points

      Oh Yes! I'm still looking for a i2c bus slave driver under Linux. I'd like to find something that could solve my problem. Can you tell me something  when this driver is ready?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sebastian Geissler
      Posted by Sebastian Geissler
      on Mar 31 2010 08:50 AM
      Prodigy160 points

      I'm currently running a test version of it and I already received many bytes ;-). One issue is that my driver has to extract the first databyte out of a stream to evaluate it. (this is due to a specific protocol that I have to implement). I should remove this feature for general purposes.

      Another thing to be aware of is, that my driver isn't completely independent of the kernel version because it extends the available driver. I use kernel 2.6.32 (git://www.sakoman.com/git/linux-omap-2.6.git;branch=omap3-2.6.32) but an adaption to another kernel is possible of course.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sebastian Geissler
      Posted by Sebastian Geissler
      on Apr 01 2010 07:34 AM
      Prodigy160 points

      If you don't have a more official solution to the i2c slave problem I could prepare a kernel patch that extends the standard i2c master driver for a specific kernel. My current version supports the open(), close(), read() and write()-systemcalls. I tested it at a single master bus and it seems to work so far.

      Eventually one could include some more features, but this depends on the application.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Youssef Djalali
      Posted by Youssef Djalali
      on Apr 01 2010 09:34 AM
      Prodigy0 points

      I am waiting for your driver: as soon as possible I'll try it when it will be available. The version of my the kernel is "2.6.29-rc3-omap1. Thanks!!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sebastian Geissler
      Posted by Sebastian Geissler
      on Apr 01 2010 19:15 PM
      Prodigy160 points

      Hi Youssef,

      spontaneously I haven't found the 2.6.29-rc3-omap1 kernel source code - so a driver patch might break because of little differences between your actual kernel and my version. I have adapted my current driver version to the interfaces provided by the 2.6.29-omap1 driver (which are probably / hopefully compatible to your rc3-version). You can download the driver file, a little application example and a readme from http://www-user.tu-chemnitz.de/~sebag/i2c_omap_slave.tar.gz . Just try whether it compiles without errors... If you notice a bug please post again

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Youssef Djalali
      Posted by Youssef Djalali
      on Apr 02 2010 02:07 AM
      Prodigy0 points

      I am very happy today, finally some good news about this eagerly awaited driver! Thank you very much for your help and the attached explanations (all seems very clear). The eve of Easter does not allow me to test this driver immediately, Tuesday morning it will be my first priority!
      Happy Easter !!!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sebastian Geissler
      Posted by Sebastian Geissler
      on Apr 02 2010 20:12 PM
      Prodigy160 points

      Thanks ;-) - I'm curious whether it will work for you. Two things that I forgot to write: the OMAPs I2C address is currently hardcoded in the driver (as a define, I think it's set to address 0x01). And before you connect the I2c-bus make sure that the voltage levels fit because the OMAP expects a 1,8V bus - voltage shifters might be necessary. Have some nice holidays...

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Youssef Djalali
      Posted by Youssef Djalali
      on Apr 08 2010 04:00 AM
      Prodigy0 points

      Is Working!!!!!!! Really thanks for your help, everything works fine. Now I can proceed as I had decided from the beginning of the project. Still compliments for how you've changed the i2c bus Linux's driver.

      Gianni.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sebastian Geissler
      Posted by Sebastian Geissler
      on Apr 09 2010 08:26 AM
      Prodigy160 points

       Hey, that sounds great. Meanwhile I've  just made a minor change in the driver so that it supports to send more than 200 bytes at once (write systemcall implementation). So don't wonder if the driver rejects sending more than 200 bytes at once in the older version. Everything else should work. Good luck with your project!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Youssef Djalali
      Posted by Youssef Djalali
      on Apr 12 2010 09:39 AM
      Prodigy0 points

      I recommend! keep me informed when is ready your new version.

      Have a good day!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sebastian Geissler
      Posted by Sebastian Geissler
      on Apr 12 2010 10:51 AM
      Prodigy160 points

      You can download the driver having the new write-systemcall integrated now. Either using the old link or from my TI profile, where uploads obviously should be located.

      Cheers

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Hideki Ohba
      Posted by Hideki Ohba
      on Jun 13 2012 05:24 AM
      Prodigy10 points

      Hello Geissler-san,

      I'm using Kernel version 2.6.37,  I need also slave mode driver of that version.

      I compared your i2c-omap.c of 2.6.32 and 2.6.37 one, but there are many differences between your i2c-omap.c of 2.6.32 and 2.6.37.

      Do you have i2c-omap.c of 2.6.37 with slave mode supported?

      Thank you.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sebastian Geissler
      Posted by Sebastian Geissler
      on Oct 06 2012 11:08 AM
      Prodigy160 points

      Sorry, but I don't adapt the driver any further for newer kernels because my field of work changed. You could try to extend the newer kernel on your own or -- if the interfaces to the I2C core didn't change -- use my old C-file together with the newer kernel. This way you would just have to check if the interfaces to the core still work and the hardware-specific part would stay old (and hopefully working as it did in 2.6.32)

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Serkan Erdogan
      Posted by Serkan Erdogan
      on Dec 21 2012 06:52 AM
      Prodigy70 points

      Hi Sebastian,

          I use Omap 3530 and my kernel version 2.6.32. And I need i2c slave mode driver. But I couldn't find your patch anywhere. Do you mind sending me your i2c slave mode patch for omap?

      Thanks.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use