cancel
Showing results for 
Search instead for 
Did you mean: 

Can not get I3C state

Hexu
Associate II

Hi all,

I use STM32-H503RB as the controller to test IBI function with I3C. After I3C initialization and configuration of the target, the target will be enabled to send IBI requests.

I use  while (HAL_I3C_GetState(hi3c1) != HAL_I3C_STATE_READY)  to check if the transfer finished or not.

However, once the device is enabled by setting a register and then starting to send IBI requests, I can not get I3C state anymore. 

HAL_I3C_GetState(hi3c1) can not get state ready signal even when the bus and the device are free. The program will be blocked in the while loop and can not go into the next step.

Why I can not get the correct state signal after enabling the IBI?

Any kind of help is appreciated. 🙂

 

 

2 REPLIES 2
Foued_KH
ST Employee

Hello @Hexu , 

Could you please use an oscilloscope to check the SDA and SCL behavior.

Also you can check the available example in the STM32H5 CubeFW : 
STM32Cube_FW_H5_V1.2.0\Projects\NUCLEO-H503RB\Examples\I3C\I3C_Controller_InBandInterrupt_IT

STM32Cube_FW_H5_V1.2.0\Projects\NUCLEO-H503RB\Examples\I3C\I3C_Target_InBandInterrupt_IT

GH: STM32CubeH5/Projects/NUCLEO-H503RB/Examples/I3C at main · STMicroelectronics/STM32CubeH5 · GitHub

Let me know!
Foued

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.

Hi @Foued_KH ,

 Thanks for your kind reply. Actually, I modified the example in the STM32H5 CubeFW I3C_Controller_InBandInterrupt_IT to control my device:

Here are the SDA and SCL behavior images detected by using Saleae:

After enabling my device (send data 0x0F to register 0x30), the device keeps sending IBI requests. But the program is blocked in the while loop of while (HAL_I3C_GetState(hi3c1) != HAL_I3C_STATE_READY), and I can still receive the IBI request.

once I use if ((start_addr==0x30)&(data[0]==0xF)) to avoid the while check loop, the program can keep running and I can process the IBI request on the controller side.

Hexu_0-1713948579920.png

Hexu_1-1713948735532.pngHexu_2-1713948779266.png