cancel
Showing results for 
Search instead for 
Did you mean: 

There are no signals on pins I2C5 in CM4 mode in the custom device tree.

KOver.1
Associate

Hello.

I created a custom device tree in CubMH and added its instructions "How to create your own machine" (https://wiki.st.com/stm32mpu/wiki/How_to_create_your_own_machine)

I wanted to run I2C5 in production mode. Running my code stops CM4 and CA9, which then leads to a reboot. At the same time, there are no signals on the pins.

Running the example I2C_TwoBoards_ComIT (STM32CubeMP1 / Projects / STM32MP157C-DK2 / Examples / I2C / I2C_TwoBoards_ComIT) CM4 loops at the following code fragment:

while (HAL_I2C_GetState (& hi2c5)! = HAL_I2C_STATE_READY)

  {

  }

In this case, CA9 is working normally.

In engineering mode, my code and example code work fine, signals appear on pins.

I2c5 setup:

m4_i2c5_pins_mx: m4_i2c5_mx-0 {

pins {

pinmux = <STM32_PINMUX('A', 11, RSVD)>, /* I2C5_SCL */

<STM32_PINMUX('A', 12, RSVD)>; /* I2C5_SDA */

};

};

&m4_i2c5{

pinctrl-names = "default";

pinctrl-0 = <&m4_i2c5_pins_mx>;

status = "okay";

/* USER CODE BEGIN m4_i2c5 */

/* USER CODE END m4_i2c5 */

};

I attach the device tree file.

1 REPLY 1
Olivier GALLIEN
ST Employee

Hi @KOver.1​ ,

Sorry for late reply.

In case you are still stuck.

Same example is supposed to perfectly work booting with m4_example mode ( applying stm32mp157c-dk2-m4-examples.dts)

Could you please confirm and then compare provided vs custom dts ?

Please also check that you really used your custom dts when boot.

Enabling one led on board is a good trick.

see https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Distribution_Package#Modifying_the_Linux_kernel_device_tree

Hope it help,

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.