Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Linux kernel provides a device driver for the I2C controller of the STM32H7 BSPs, enabled in the kernel with the CONFIG_I2C_STM32F7 build-time option. Another kernel configuration option that you will require is CONFIG_I2C_CHARDEV. This option enables the kernel API that allows accessing I2C devices from user-space application code. These kernel configuration options are enabled by default in the rootfs project.

The STM32H7 device provide four I2C bus controllers. The parameters of each bus controller are specified in the i2c* child nodes properties in the corresponding linux/arch/arm/boot/dts/stm32h743.dtsi file:

...

The functionality described above is enabled by default in the rootfs project. So, just run the rootfs.uImage binary on your target and observe the kernel messages about the I2C bus being enabled:

...