Skip to main content
Visitor II
January 10, 2025
Solved

STM32 I2C - both lines continuously held LOW

  • January 10, 2025
  • 2 replies
  • 590 views

Hi, for my diploma project I made a DSP guitar effects pedal - designed a custom PCB and everything. On it I have an STM32F405RGT7 and a TLV320AIC33IRGZT audio codec. The codec is set up using I2C. The problem occurs when I try to communicate with it - I used a logic analyser and both lines (SDA and SCL) are continuously held LOW. I tried a new project and did the setup again with a simple I2C scanner - still nothing. I then tried to set the pins as GPIO pins and held them HIGH and then they both remained HIGH as they should - I think that hardware is not an issue since I have triple checked every connection, and given that the GPIO can hold the lines HIGH nothing appears to be shorted. I now believe the problem lies in the code but I just can see what could go wrong - does anyone have any idea?

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello @KolbicJan and welcome to the community,

    What about the pull-up resistors on SDA and SCL lines? did you mount them?

    2 replies

    mƎALLEmAnswer
    Technical Moderator
    January 10, 2025

    Hello @KolbicJan and welcome to the community,

    What about the pull-up resistors on SDA and SCL lines? did you mount them?

    Super User
    January 10, 2025

    Welcome to the forum.

     


    @KolbicJan wrote:

    both lines (SDA and SCL) are continuously held LOW.


    In your post title, you say that they are being held low - how do you determine that?

    The fact that you can set the lines high by using the pins as plain GPIO suggests that they are not being held low.

    Maybe you're just missing the pullups ... ?

     


    @KolbicJan wrote:

    I think that hardware is not an issue 


    Have you showed it to your teacher/supervisor for review?

    Please post the schematic.

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228