cancel
Showing results for 
Search instead for 
Did you mean: 

I want insert I3C repeated start bit Not Stop Bit in I3C Private 1 byte Read at Stm32H503RB

LEE_SE
Visitor

Hi , 

 

I tested  example " I3C_Controller_Private_Command_IT "  with  Controller  H503RB board 

and  modified for JEDEC SMBUS for DDR5  

( JEDEC smbus is more simple than MIPI I3C ,

No  DynAddrAssign function ,  Initially  I2C   after  CCC SetAASA ,  it change  I2C ==>  I3C ) 

 

1.  CCC SetAASA   is OK ,   When I  read   register address 0x1  with I3C  1byte private read ,   I3C read value is  not   what i want .  Read value is  pointing   register  address  0x0 value and  fixed .  I think  there is a stop bit  in  Read protocol  and  after Stop bit , Internal read pointer in my chip is cleared 

example an5879,  9.8 Private Read code ,  also  Stop Bit  in  I3C private Read  command 

 

* It is JEDEC I3C Specification  ,  repeated start bit  , No Stop Bit  in  Read  Command

 

LEE_SE_2-1721573784343.png

* example 9.8  code 

LEE_SE_3-1721574206107.png

 

2.  I  tried to change it when TX frame setting ,    but   Not cleared 

 I3C_PRIVATE_WITH_ARB_STOP ==> I3C_PRIVATE_WITH_ARB_RESTART ,   MEND=0

 

Can  u tell me  how to do it ? 

Thanks 

 

 

* My test Code  for CCC SetAASA 

/* Enable arbitration header */
LL_I3C_EnableArbitrationHeader(hi3c->Instance);

/* Write CCC information in the control register */
LL_I3C_ControllerHandleCCC(hi3c->Instance, I3C_BROADCAST_AASA_0x29, 0U, LL_I3C_GENERATE_STOP);

 HAL_Delay(100);

 LL_I3C_DisableArbitrationHeader(hi3c->Instance);

 HAL_Delay(100);

 

/*##- 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_STOP  ==>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_IT(&hi3c1, &aContextBuffers[I3C_IDX_FRAME_1]) != HAL_OK)
{
/* Error_Handler() function is called when error occurs. */
Error_Handler();
}

 

if (HAL_I3C_AddDescToFrame(&hi3c1,
NULL,
&aPrivateDescriptor[I3C_IDX_FRAME_2],
&aContextBuffers[I3C_IDX_FRAME_2],
aContextBuffers[I3C_IDX_FRAME_2].CtrlBuf.Size,
I3C_PRIVATE_WITH_ARB_STOP) != HAL_OK)
{
/* Error_Handler() function is called when error occurs. */
Error_Handler();
}

/* Wait for USER push-button press before starting the Communication */
while (BSP_PB_GetState(BUTTON_USER) != GPIO_PIN_RESET)
{
}

/* Wait for USER push-button release before starting the Communication */
while (BSP_PB_GetState(BUTTON_USER) != GPIO_PIN_SET)
{
}

/*##- Start the reception process ######################################*/
/* Receive private data processus */
if (HAL_I3C_Ctrl_Receive_IT(&hi3c1, &aContextBuffers[I3C_IDX_FRAME_2]) != HAL_OK)
{
/* Error_Handler() function is called when error occurs. */
Error_Handler();
}

 

 

 

 

 

 

 

0 REPLIES 0