Skip to main content
gil_dobjanschi
Associate III
June 21, 2026
Question

I3C Controller Initialization Problem

  • June 21, 2026
  • 5 replies
  • 111 views

Hello,

I have a project that uses I3C to connect a Nucleo-C562RE with an STM32C542CCT6 MCU. The setup was working fine with HAL 2.0.0 but it does not work in 2.1.0. I generated the code with MX2 and I observed that it is identical to the code in the private_it_controller example code. I stepped through the mx_i3c1_init function and I noticed that the moment the GPIO for SDA and SCL are enabled, the I3C clock (SCL) is turned on (visible on the oscilloscope) and does not stop. I don’t see how this could be correct. When I try to start DAA it fails instantly (the error callback is invoked) and the SDA line never changes state (it stays HIGH after reset).

Can someone help with this issue?

Thank you,

Gil

5 replies

ST Technical Moderator
June 22, 2026

Hello ​@gil_dobjanschi 

It seems the issue is related to the generated code from MX. An internal ticket CDM0063708 is submitted to dedicated team for further investigation.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
gil_dobjanschi
Associate III
August 5, 2026

Hi ​@FBL,

 

Could you kindly provide an update for this issue? I tested ny application with MX2 version 1.1.1 generated code and I am getting the same behavior.

 

Thank you,

Gil

ST Technical Moderator
August 6, 2026

Hi ​@gil_dobjanschi 

Sorry for my late reply. Our teams were not able to reproduce the issue on our side. Could you please confirm whether, during debugging, you start the target application before launching the controller?

This step is important to ensure that the target is fully initialized and ready to respond to the controller’s private I3C communication requests.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
gil_dobjanschi
Associate III
August 6, 2026

Hi ​@FBL,

I did more debugging to try to understand the nature of the problem. I have a few comments/observations:

  1. The target is started before launching the controller. I don’t see any errors on the target side.
  2. The clock that is started on I3C_SCL during initialization is 2.5MHz.
  3. I noticed that after reset I3C_SDA goes LOW for 150ms (or more) and during this time the I3C_SCL stops. Once I3C_SDA goes HIGH again the I3C_SCL resumes.
  4. The error that occurs on the controller side as soon as I start the Dynamic Address Allocation is 0x11.

In stm32c5xx_hal_i3c.h this error code is defined as follows:

#define HAL_I3C_CTRL_ERROR_1          (LL_I3C_CONTROLLER_ERROR_CE1 | I3C_SER_PERR) 
/*!< 0x11 Controller detected that transmitted data on the bus is different from expected */

I attached the controller and target ioc2 files for reference.

Thank you,

Gil

Visitor II
August 6, 2026

Thanks for sharing the details. Since the same hardware worked with HAL 2.0.0 but fails after moving to HAL 2.1.0, it does sound like a software or code-generation regression rather than a hardware issue. Comparing the generated initialization code with a known working project and checking the GPIO/I3C initialization sequence carefully is a good approach. It's also helpful that an internal investigation has already been opened. Hopefully the root cause is identified soon, and it would be great if the final fix is shared here so others upgrading to HAL 2.1.0 can benefit.