Skip to main content
Rita Jonkute
Associate
Nov 15, 2017 3:25 PM UTC
Question

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

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.

    7 replies

    Pavel A.
    Nov 22, 2017 1:43 PM UTC
    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

    Rita Jonkute
    Associate
    Nov 22, 2017 3:10 PM UTC
    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

    Pavel A.
    Nov 22, 2017 8:44 PM UTC
    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