2025-03-05 4:07 PM - edited 2025-03-06 9:24 AM
I am unable to get the I2C line on my STM32H750VB to connect with my PCA9685 PWM driver on my custom PCB. The I2C line is constantly high, which I have seen on multiple oscilloscopes. I got the software online from a tutorial on the PWM driver and was able to run it successfully on a Nucleo-H743ZI2 board which has a STM32H743ZI MCU with a breakout of the PCA9685 so the code unrelated to board setup should work. I attached the entire code file in case though. Things I've tried:
Layout
Schematic
Pinout
Any ideas for other things to try to get the I2C bus running or what could be causing the issue?
Edit: the code shows an I2C address of 0x80 from the breakout board I was testing with, though along with 0xAA I was unable to get a connection, also HAL_I2C_ISDeviceReady was not returning TRUE
Solved! Go to Solution.
2025-03-10 4:50 PM
Update:
2025-03-05 4:21 PM
> #define PCA9685_ADDRESS 0x80
The slave address is wrong. You're using 0x80 while clearly A0, A2, A4 are pulled up. Should be 0b10101010.
Ensure HAL_I2C_IsDeviceReady returns HAL_OK before using any other HAL_I2C_* function.
Look at return values from HAL function to understand why they failed.
2025-03-06 9:21 AM
Apologies, I forgot to mention that the PCA9685 breakout board I was trying to test with the custom PCB has an I2C address of 0x80. I had also tried 0xAA with the one soldered to the board and it failed to connect as well. I had run HAL_I2C_IsDeviceReady with an if statement and an LED to indicate the status and that wasn't working as well.
I haven't looked at other return values from the HAL function though so thanks for the advice!
2025-03-10 4:50 PM
Update: