I2C transmission problem in STM32 NUCLEO H743ZI uC

Hello,

I want to use the I2C interface of the H743ZI microcontroller to communicate with the BM1422AGMV (3-axis magnetic sensor).

Code is programmed by arduino IDE, the link of code example is:

The problem is:

  1. This code can work in Arduino Uno board, but can not work in H743ZI.
  2. SCL and SDA have no signal.
  3. I'm not find any information about I2C connection in data sheet.

What do I need to set on the H743ZI??
Does this code be used only for the Arduino board??
Or just the board is broken??

  1. This code can work in Arduino Uno board, but can not work in H743ZI.

The library example should work as is in the STM32 world.

  1. SCL and SDA have no signal.

Why don't we see a wiring diagram in your post? Did you really read the sticky post at the top of the topic "How to use this forum - please read"?

  1. I'm not find any information about I2C connection in data sheet.

In which datasheet? I didn't find one in your post.

Does this code be used only for the Arduino board??

This code should run in every environment compatible with the Arduino IDE.

Wiring diagram is here.

this is BM1422AGMV sensor, and connect to 3.3V, GND and I2C.

Datasheet,

I try to output digital signal using I2C ports, which define as Digital Output, and they can work.
I think this board is no problem.
Maybe, the problem is in wire.h and wire.cpp.

Post images to the forum, no links to external sites!

this is BM1422AGMV sensor, and connect to 3.3V, GND and I2C.

That sensor is just a chip. Do you really use the chip alone? No breakout board? We need schematics of the breakout board.

I try to output digital signal using I2C ports, which define as Digital Output, and they can work.

Does that mean you were successful using a bit-bang interface? Post the code that worked!

Maybe, the problem is in wire.h and wire.cpp.

I doubt but depending on your specific case you may have to change the calling of the library.