I2C on STM32F7 not working: Noob error or broken board?
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
