cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 I2C - both lines continuously held LOW

KolbicJan
Visitor

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?

2 REPLIES 2
SofLit
ST Employee

Hello @KolbicJan and welcome to the community,

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

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

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