Skip to main content
kasun_duminda92
Associate II
July 26, 2013
Question

STM32F0 I2C Example code

  • July 26, 2013
  • 15 replies
  • 6378 views
Posted on July 26, 2013 at 04:06

I have been trying to make a slave I2C device communicate with my STM32F0 board, with no success. Can anyone give me an example code to config, init and send and receive data through the I2C bus.

    This topic has been closed for replies.

    15 replies

    saiyaswanth97
    Visitor II
    June 11, 2016
    Posted on June 11, 2016 at 16:58

    saiyaswanth97
    Visitor II
    June 11, 2016
    Posted on June 11, 2016 at 17:02

    What is the i2c address of RTC

    Tesla DeLorean
    Guru
    June 11, 2016
    Posted on June 11, 2016 at 17:12

    Let's try and think this through and supply enough detail in the question so people not inside your head can figure out what you're using?

    Which RTC chip are you using?

    What does the Data Sheet for the RTC say?

    What specific STM32 part are you attempting to attach this too?

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    saiyaswanth97
    Visitor II
    June 11, 2016
    Posted on June 11, 2016 at 17:18

    The address of RTC in this code.

    Sorry for the before post.

    Thanks in advance.

    Tesla DeLorean
    Guru
    June 11, 2016
    Posted on June 11, 2016 at 22:57

    The

    http://datasheets.maximintegrated.com/en/ds/DS1307.pdf

    specifies the address as 0x68, so in this context (0x68 << 1) for the high order 7-bits used by the STM32

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..