2023-06-29 12:47 AM - edited 2023-06-29 12:48 AM
I am using the following slave device for I3C reading and writing. I can now read and write CMOS registers through private mode, but I cannot find any examples of entering and exiting HDR mode. Can you provide an example program for entering and exiting HDR mode? Thanks
Solved! Go to Solution.
2023-07-03 06:01 AM
Hello @taylor_quan ,
- HDR exit pattern generation on the I3C bus for error recovery.
You can enable the HDR exit via the I3C_CFGR register : [ Bit 4 EXITPTRN: HDR exit pattern enable (when I3C acts as a controller) ]
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.
2023-06-29 01:12 AM
Another issue is that I cannot cancel the reserved byte when using private read
I3C_PrivateTypeDef aPrivateDescriptor[3] = \
{
{TARGET1_DYN_ADDR, {aTxBuffer, 2}, {NULL, 0}, HAL_I3C_DIRECTION_WRITE},
{TARGET1_DYN_ADDR, {NULL, 0}, {aRxBuffer, 30}, HAL_I3C_DIRECTION_READ},
{TARGET1_DYN_ADDR, {aTxBuffer, 2}, {aRxBuffer, 30}, HAL_I3C_DIRECTION_BOTH}
};
/*##- Add context buffer transmit in Frame context #####################*/
if (HAL_I3C_AddDescToFrame(&hi3c1,
NULL,
&aPrivateDescriptor[I3C_IDX_FRAME_1],
&aContextBuffers[I3C_IDX_FRAME_1],
aContextBuffers[I3C_IDX_FRAME_1].CtrlBuf.Size,
I3C_PRIVATE_WITH_ARB_RESTART) != HAL_OK)
{
/* Error_Handler() function is called when error occurs. */
Error_Handler();
}
/*##- Start the transmission process ###################################*/
/* Transmit private data processus */
if (HAL_I3C_Ctrl_Transmit(&hi3c1, &aContextBuffers[0],100) != HAL_OK)
{
/* Error_Handler() function is called when error occurs. */
Error_Handler();
}
while (HAL_I3C_GetState(&hi3c1) != HAL_I3C_STATE_READY)
{
}
if (HAL_I3C_AddDescToFrame(&hi3c1,
NULL,
&aPrivateDescriptor[1],
&aContextBuffers[I3C_IDX_FRAME_2],
aContextBuffers[I3C_IDX_FRAME_2].CtrlBuf.Size,
I3C_PRIVATE_WITHOUT_ARB_STOP) != HAL_OK)
{
/* Error_Handler() function is called when error occurs. */
Error_Handler();
}
if(HAL_I3C_Ctrl_Receive(&hi3c1, &aContextBuffers[I3C_IDX_FRAME_2],100) != HAL_OK)
{
/* Error_Handler() function is called when error occurs. */
Error_Handler();
}
2023-07-03 06:01 AM
Hello @taylor_quan ,
- HDR exit pattern generation on the I3C bus for error recovery.
You can enable the HDR exit via the I3C_CFGR register : [ Bit 4 EXITPTRN: HDR exit pattern enable (when I3C acts as a controller) ]
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.