cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 H5 I3C CCC transmit

Sunwaz
Associate III

I used STM32H563 transmit a message through I3C CCC direct.

I create a new CCC command "0xA0".Control send the command to target.But target will enter 

HAL_I3C_ER_IRQHandler

Uesd the general command "0x89".The target can receive this command. The Buffer is same.

Sunwaz_0-1708916889390.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Foued_KH
ST Employee

Hello @Sunwaz , 

You can't create a new CCC command because these commands are pre-defined.
You should use the available commands for the CCC direct transfert.

Thank you!
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.

View solution in original post

8 REPLIES 8
Sunwaz
Associate III

I need to send a buffer to the target via the contorller's I3C CCC direct.

Foued_KH
ST Employee

Hello @Sunwaz , 

You can't create a new CCC command because these commands are pre-defined.
You should use the available commands for the CCC direct transfert.

Thank you!
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 a lot!

    And i have another question: can the target of I3C send data to the master of I2C?My system doesn't necessarily have an I3C controller.

   

The I3C bus only supports I2C targets.
You can configure the I3C bus : 

 

Foued_KH_1-1709107687392.png

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.

Sunwaz
Associate III

Hi @Foued_KH 

    When the controller sends data to the target, if the sending fails, the system will enter a hardfault.

    The reason is that the hi3c->ptrTxFunc pointer will be cleared in the  I3C_ErrorTreatment function, but the hi3c->ptrTxFunc null pointer will be called in the retransmission function, resulting in an error, which is unreasonable.

Sunwaz_0-1709194723267.pngSunwaz_1-1709194756623.png

 

For communication : I3C controller with I3C target or I2C target on I3C bus : 
Make sure that you are using the dynamic address first for the I3C target after the dynamic address process ( pure bus ) or the static address of the I2C target ( mixed bus ) before starting the Private/Direct transfers.

For more details about I3C communication, you can check  : 
I3C Application NoteIntroduction to I3C for STM32H5 series MCU - Application note

I3C WIKIGetting started with I3C - stm32mcu

You can also check the available examples in the STM32H5  CubeFW STM32Cube_FW_H5_V1.1.1\Projects\NUCLEO-H503RB\Examples\I3C 

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.

Hello @Foued_KH 

My target got dynamic Address . My controller send "HAL_I3C_Ctrl_IsDeviceI3C_Ready",the target will enter frame error.Error code is 0x100000.

I dont understand.

Sunwaz_0-1709808266185.pngSunwaz_1-1709808289120.png

 

I know the cause,ST's library only supports fixed-length receptions. If Tx size is not amount Rx size , it will generate 

HAL_I3C_ERROR_SIZE error code.