Skip to main content
Visitor II
November 15, 2017
Question

I2C not working on STM8S103K3P6. what am I doing wrong?

  • November 15, 2017
  • 1 reply
  • 2192 views
Posted on November 15, 2017 at 16:25

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    1 reply

    Super User
    November 22, 2017
    Posted on November 22, 2017 at 14:43

    What exactly is not working? Do you have the same issue as in this thread ?

    https://community.st.com/0D50X00009XkafxSAB

    -- pa

    Visitor II
    November 22, 2017
    Posted on November 22, 2017 at 15:10

    0690X00000608tNQAQ.png

    First, somehow DR (data register is not showing anything), I clean ADDR by reading SR1 and SR3, clean TXE by writing DR twice, but can't get any data to buffer from MXL90614 temperature sensor

    Super User
    November 22, 2017
    Posted on November 22, 2017 at 20:44

    Well, the code *may be* correct - though it does not use the official STM library for i2c and system clock.

    You need to hook a logic analyzer on i2c lines and see what the host sends and what the sensor answers.

    -- pa