element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Or choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development How to use DS3231M PMOD
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Avnet Boards Forums requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 4 replies
  • Subscribers 175 subscribers
  • Views 221 views
  • Users 0 members are here
Related

How to use DS3231M PMOD

hai.bi
hai.bi over 8 years ago

My ultimate goal is to use an RTC and I have bought DS3231M PMOD so I am going to try it on MicroZed.


I have gone through Vivado and configured I2C0 on 14-15 and exported according to the link http://microzed.org/content/problem-linaro-and-i2c-devices


I am wondering what to do in kernel config?  Since I am using the MIO, what do I need to do for the I2C hardware bus support?  Then what to do with the driver?  there is only DS3232 driver should I use it?


Then should I modify the device tree manually before build?


Regards,

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 8 years ago

    I don't have a foolproof answer for you, but if it were me I would try the following:

    1. Modify the device tree manually as per the link you referenced, and see if you can achieve the same results.  Sounds like you set up your platform with the same I2C connection.

    2. There is an Ubuntu design for Zynq (Zedboard or Mini-ITX) that uses I2C devices.  You can check the kernel configuration in either design to see how the I2c drivers are connected, and how their device tree looks.  (Assuming 1 doesn't get you where you need to be).

    3. You may need to do some detective work on the kernel configuration by checking the .config file for I2C references.  Then you can search for those same references in the menuconfig tool and that will ensure when you change a setting, dependencies are also set.  If you know your way around the .config thoroughly, then it's ok to modify it by hand.  But I think in most cases you're better off using the tool.

    Hope that gets you going.  Let us know how you make out.

    Ron

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 8 years ago

    This post on the Xilinx Community forums indicates one user found a problem with the Zynq PS (Processing System) I2C controller and solved his issue by moving to a PL (Programmable Logic) based AXI I2C controller: 

    http://forums.xilinx.com/t5/Embedded-Linux/Zedboard-Digilent-Pmod-Real-Time-Clock-cannot-detect/td-p/534271

     

    You will not be able to do that via the MIO based PMOD on the MicroZed but, if you do have access to PL based PMODs on a carrier card in your system, you might want to give his solution a try.

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hai.bi
    0 hai.bi over 8 years ago

    Thanks to all your comments.  I have reached a deeper level.  I am able to use i2cset 0 0x68 0xD0 to send out commands and see response on the scope.  And I am using the PMOD on the J5 so it's MIO. There was a glitch problem on the MIO i2C but I want to see it's working before I move on to a better eMIO.

    However, when I boot the board, there was no i2c activity (before I use i2cset manually).  The following was taken out of the output:

    i2c /dev entries driver
    cdns-i2c e00004000.i2c: 400 kHz mmio e00004000 irq 57
    ...
    /opt/pkg/.... drivers/rtc/hctosys.c: unable to open rtc device (rtc0)


    So I am thinking there has to be some configuration not right resulting in the Linux not accessing the i2c 0 correctly for rtc0.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • hai.bi
    0 hai.bi over 8 years ago

    I think I have made further:

    I am using the following command to link the rtc with the i2c:

    echo ds3232 0x68 > /sys/class/i2c-adapter/i2c-0/new_device

    Then I can see that the system instantiated device.  So I think it's working.  I was just I didn't know you have to do that under Linux command prompt.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube