WeAct black pill multiple i2c ports #43782
-
I'm working with the WeAct black pill V2.0 (stm32f411ce) for a project. I've installed the zephyr RTOS blinky project on VSCode to start working with the board and i've managed to establish an I2C communication through the i2c1 node (pins B8(SCL) and B9(SDA)) which is the default i2c mapped bus in a zephyr project. My problem now is that I'm trying to enable the 2 other i2c ports on the board but doesn't seem to be able to get it to work. What've done:
&{/soc/i2c@40005800/} {
The problem My question: If needed, I could post my code in another comment. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Let's start from a known working point In blackpill_f411ce, i2c1 node is enabled in the following way zephyr/boards/arm/blackpill_f411ce/blackpill_f411ce.dts Lines 96 to 102 in 1add69b If you need to enable to enable i2c2, you can add the following in a .overlay:
In your code:
|
Beta Was this translation helpful? Give feedback.
-
Figured it out. Pins PB6-PB7 are still the i2c1 bus. I was interacting with it as an "i2c2" bus and it seems it didn't enjoy it. Changed the mux-pins to scl_pb10 and sda_pb3. I find it a bit weird tho that the the bus didn't work just because its name was not the good one. Thank you for your time @erwango |
Beta Was this translation helpful? Give feedback.
Figured it out.
Pins PB6-PB7 are still the i2c1 bus. I was interacting with it as an "i2c2" bus and it seems it didn't enjoy it. Changed the mux-pins to scl_pb10 and sda_pb3.
I find it a bit weird tho that the the bus didn't work just because its name was not the good one.
Thank you for your time @erwango