2020-09-28 04:30 AM
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.
2020-10-16 01:51 AM
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.
Hope it help,
Olivier