cancel
Showing results for 
Search instead for 
Did you mean: 

I2C on STM32F7 not working: Noob error or broken board?

joba1
Associate II

Hi all,

I recently bought my first drone flight controller based on STM32F722RET6 with I2C barometer.

The barometer is not working and the chip becomes quite hot (>70°C), although firmware settings are ok. So I started some error checking while waiting for the replacement.

Since I am completely new in the STM32 world, I'd like to have a confirmation that what I did makes some sense and the board is indeed broken (since it is very likely I did an error somewhere...). So here is what I did:

  • Connected GND and debug pads K and D of the flight controller to a Nucleo64's STLink CN4 connector.
  • Removed jumpers CN2 to cut off the Nucleo STM32F401 chip from its STLink.
  • Installed STM32IDE with CubeMx and configured a project reflecting the flight controllers chip and pin usage, e.g. I2C1 SDA/SCL is PB7/PB6 and led is PA15
  • Did a blink example with a blink counter -> onboard led blinks and live changes of the counter in the IDE. So debug setup seems to basically work.
  • Did an I2C example to check ready state of all I2C devices on the bus to generate traffic on SCL/SDA and sniffed it with a logic analyzer -> flat lines :(
  • Configured I2C3 (PA8/PC9) instead of I2C1 which also had pads I could connect to -> the logic analyzer sees a pulsed signal on SDA but nothing on SCL
  • Configured all 4 pins as normal GPIOs and toggled them on and off along with the blinking led -> SCL1 and SDA3 produced pulses on the logic analyzer. SDA1 and SCL3 remained flat.

The whole project can be seen on github: https://github.com/joba-1/jhemcu-base with one branch for each of the three test (not master), including the CubeMX edited ioc file and main.c with my few code additions.

So, what is it in your opinion? Noob error or broken board? Could I check something else? Clock configs to tweak? Possibilities to make errors seem endless to me 🙂

Regards,

Joachim

3 REPLIES 3

>>Possibilities to make errors seem endless to me 

It can certainly be a rabbit-hole

The think getting really hot seems problematic to me, as does the issue with the I2C vs GPIO not looking to work.

I look at these flight controllers, but never find good schematics, and hard to know how well any of it is tested properly. Power supplies and other components may have dependencies on GPIO and reset lines. Doing board bring-up is going to be a sizable task for anyone.

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

What you did makes sense.

Since the GPIO fails to drive 2 out of the 4 pins your tried, it suggests a hardware issue. Could be the barometer is pulling those lines down or something within the stm32 is blown.

I’d just wait for the replacement, but if you wanted to spend time you could remove the barometer and see if the problem persists, if you have the tools.

If you feel a post has answered your question, please click "Accept as Solution".
joba1
Associate II

Thanks. Since this should have worked, there is not much more I can do. SMD fiddling is not my cup of coffee.

But still, taking a closer look at the STM32 world was worth the effort. Nice platform.