2024-03-11 03:06 AM
My I3C target don't send ACK after controller send an arbitration header ,and it will generate a DOVER flag and ERRF flag.
ex.
Send HAL_I3C_Ctrl_IsDeviceI3C_Ready before controller transmit data.
Send HAL_I3C_DIRECTION_READ
and so on
2024-03-11 03:19 AM
Hello @Sunwaz ,
Did you assign a dynamic address for the slave before starting the I3C communication ?
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.
2024-03-11 06:19 PM
Hi @Foued_KH
Yes.
I can enter I3C interrupt handle.But it will generate a HAL_I3C_ERROR_DOVER or HAL_I3C_ERROR_SIZE failed.
void bsp_i3c_config( void ){
aContextBuffers_Tmp.RxBuf.pBuffer = i3cRxBuffer_Tmp;
aContextBuffers_Tmp.RxBuf.Size = sizeof(i3cRxBuffer_Tmp);
aContextBuffers_Tmp.TxBuf.pBuffer = i3cTxBuffer_Tmp;
aContextBuffers_Tmp.TxBuf.Size = sizeof(i3cTxBuffer_Tmp);
aContextBuffers.RxBuf.pBuffer = i3cRxBuffer;
aContextBuffers.RxBuf.Size = sizeof(i3cTxBuffer);
aContextBuffers.CtrlBuf.pBuffer = i3cCtrlBuffer;
aContextBuffers.CtrlBuf.Size = 1;
if(HAL_I3C_ActivateNotification(&hi3c1 , &aContextBuffers_Tmp , HAL_I3C_ALL_TGT_ITS) != HAL_OK){
TARGT_DEBUG("[i3c error]start active notification failed!\r\n");
Error_Handler();
}
if(HAL_I3C_Tgt_HotJoinReq_IT(&hi3c1) != HAL_OK){
TARGT_DEBUG("[i3c error]enable hot join function failed!\r\n");
Error_Handler();
}
}
void bsp_i3c_app( void ){
if(i3c_Event & 0x01){
if(LL_I3C_IsEnabledOwnDynAddress(hi3c1.Instance)){
TARGT_DEBUG("[i3c event]update Dynamic Address [%d]\r\n",LL_I3C_GetOwnDynamicAddress(hi3c1.Instance));
if(HAL_I3C_Tgt_Receive_DMA(&hi3c1, &aContextBuffers) != HAL_OK){
TARGT_DEBUG("[i3c error]enable receive it failed!\r\n");
Error_Handler();
}
i3c_Event &=~ (0x01);
}
}else if(i3c_Event & 0x02){
bsp_i3c_errorHandle();
i3c_Event &=~ 0x02;
}else if(i3c_Event & 0x04){
uint16_t bufferSize = LL_I3C_GetXferDataCount(hi3c1.Instance);
if( bufferSize != 0){
TARGT_DEBUG("[i3c event]Rx data done!Size [%d]\r\n\t[Rx]%s\r\n",bufferSize,aContextBuffers.RxBuf.pBuffer);
memset(aContextBuffers.RxBuf.pBuffer , 0 , bufferSize);
bsp_i3c_ProtocolParsing(aContextBuffers.RxBuf.pBuffer , bufferSize);
}
if(HAL_I3C_Tgt_Receive_DMA(&hi3c1, &aContextBuffers) != HAL_OK){
TARGT_DEBUG("[i3c error]enable receive it failed!\r\n");
Error_Handler();
}
i3c_Event &=~ 0X04;
}
}
2024-03-11 06:35 PM
When the controller send this command, the target will report HAL_I3C_ERROR_DOVER code.
2024-03-11 06:37 PM
And when the dynamic address of the target does not match,it will not respond to this command.