37.2.8 Hot-Join Mechanism

The Hot-Join mechanism allows for the Target to join the I3C bus after it has already been configured as per I3C Bus Configuration. Hot-Join is used when the Target is mounted on the same I3C bus and remains depowered until needed or until the Target is physically inserted into the I3C bus without disrupting the SDA and SCL lines.

The Target module on this device can be configured as a Hot-Joining device using the HJCAP bit. When the HJCAP bit is set (HJCAP = 1), the Target is configured as a Hot-Join capable device. In this configuration, the Target will not participate in the Dynamic Address Assignment procedure (Target NACKs ENTDAA CCC) unless a Hot-Join is requested by the Target first (HJREQ bit). Once the Target receives a Dynamic Address and the Controller sends the RSTDAA CCC to clear the Dynamic Address, the Target will participate in all future Dynamic Address Assignment process (Target ACKs ENTDAA CCC) even if it did not perform a Hot-Join request again.

Alternatively, when the HJCAP bit is cleared (HJCAP = 0), the Target is configured to not have Hot-Join capability. In this configuration, the Target cannot request for Hot-Join, however the Target will participate in the Dynamic Address Assignment procedure (Target ACKs ENTDAA CCC) anytime it does not have a Dynamic Address assigned.

In summary, the following conditions must be met for the Target to perform a Hot-Join request by setting the HJREQ bit. If these conditions are not met, then setting the HJREQ bit will not have any effect until the conditions are met.

  • The Target is Hot-Join capable (HJCAP = 1)
  • The Target does not have a Dynamic Address assigned
  • Hot-Join is enabled on the bus by the Controller (HJEN = 1)
Important:
  1. It is highly recommended to change the configuration of the HJCAP bit only when the I3C module is disabled (EN = 0).
  2. The Hot-Join mechanism does not allow Targets to join the I3C bus before the bus has been configured. The Controller cannot acknowledge the request until the bus is configured as described in I3C Bus Configuration.
Tip: To configure this I3C Target module to always operate in I2C mode (OPMD = 0b00), the user can set the HJCAP bit and never request for a Hot-Join. In this scenario, the Target will respond to an ENTDAA CCC and continue operating in I2C mode.

The Target can request for a Hot-Join by setting the HJREQ bit. Once the HJREQ bit is set, the Target waits for the Bus Idle condition and then issues a Start on the bus by pulling the SDA line low (standard Hot-Join). The Active Controller acknowledges the Start condition by sending clocks on the SCL line(1) marking the beginning of the Arbitrable Address Header, during which the Target transmits the 7’h02/W Hot-Join Address on the bus.

However, the Target does not always need to wait for the Bus Idle condition to occur on the bus. If another device on the bus issues a Start signal before the Bus Idle condition occurs, the Target participates in the Address Arbitration by transmitting the 7’h02/W Hot-Join address on the bus (passive Hot-Join). Refer to Figure 37-43 for clarity.

Tip:
  1. If the Controller does not acknowledge the Start condition issued by the Target, the Bus Time-out feature can be used to abort the Hot-Join or In-Band Interrupt request.
  2. It is recommended to check the value of HJEN bit in the I3CxEC Events Command register before requesting Hot-Join. The Controller can enable/disable Hot-Join (ENHJ/DISHJ) globally on the bus by broadcasting the ENEC/DISEC CCC (Enable/Disable Target Events Command), which is reflected in the I3CxEC register. If the HJREQ bit is set when HJEN = 0, the Target module will begin the Hot-Join process as soon as the Controller enables Hot-Join and HJEN bit is set by the hardware.
Remember: The MIPI I3C® Specification allows multiple devices on the bus to request for Hot-Join together. In the event of such an occurrence, all eligible devices can participate in the Dynamic Address Assignment procedure together.

Once the Target wins the address arbitration and the Controller ACKs the Hot-Join request, the Controller then proceeds with sending the Broadcast ENTDAA CCC on the bus.(1) The Target then undergoes the Dynamic Address Assignment procedure as outlined in the Dynamic Address Assignment section. Upon successful completion of the Hot-Join request, the following changes happen:

  • The HJREQ bit is cleared
  • The Dynamic Address Changed DACHIF flag is set
  • The Dynamic Address assigned by the Controller is stored in the I3CxDADR register
  • The Target switches to operating in I3C SDR mode (OPMD = 0b01)
If the Hot-Join request is unsuccessful (Controller NACKs the Hot-Join request or the Target loses arbitration), the Target will continue to attempt Hot-Join request at the next Bus Idle condition (standard Hot-Join) or the next Start condition on the bus (passive Hot-Join). This process continues until the Hot-Join is successfully completed or until the number of unsuccessful attempts reaches the Arbitration Request Retry Limit as specified in the I3CxRETRY register and the HJEIF error flag is set. The HJREQ bit clears when the Hot-Join request is completed, regardless of the outcome.

The frame format of a successful Hot-Join transaction is shown in Figure 37-42. The Hot-Join mechanism that the Target follows is described in Figure 37-43 and an example pseudo-code is shown in Hot-Join Request Pseudo-code Using Polling below.

Important:
  1. The Controller may or may not immediately respond with an ENTDAA CCC after acknowledging the Hot-Join request. The MIPI I3C® Specification allows the Controller to perform other activities and bus transactions after acknowledging the Hot-Join request and before the following ENTDAA CCC.
Figure 37-42. Successful Hot-Join Frame Format
Figure 37-43. Flowchart of Hot-Join Mechanism

Hot-Join Request Pseudo-code Using Polling

void I3C1_Target_HotJoin_Setup()
{
    // Make Target HJ capable if necessary
    I3C1FEATbits.HJCAP = 1;     // Do this only when bus is idle

    // Set bus idle time
    I3C1BIDL = 12800;           // 200us @ I3C1CLK=64MHz

    // Set Bus Timeout (optional; to recover from stalled Controller)
    I3C1CON0bits.BTOEN = 0;
    I3C1BTO = 164;              // 32*F_scl @ F_scl=12.5MHz

    // Set retry limit
    I3C1RETRY = 3;              // 0=unlimited; 8-bit value 

    // Change PID/BCR/DCR if necessary (not shown)
}

uint8_t I3C1_Target_HotJoin()
{
    // Check if Target is ready for Hot-Join
    if(I3C1STAT0bits.OPMD == 0b00 && I3C1ECbits.HJEN && I3C1FEATbits.HJCAP) {
        // Begin Hot-Join request
        I3C1CON0bits.HJREQ = 1;

        // Dynamic Address Assignment occurs

        // Wait for Hot-Join process to complete (blocking)
        while(I3C1CON0bits.HJREQ);       // HJREQ clears when process is complete

        // Check if Hot-Join completed successfully
        if(I3C1PIR1bits.DACHIF && I3C1STAT0bits.OPMD==0b01) { /* Success */ }
        else if(I3C1ERRIR0bits.HJEIF) { /* Unsuccessful attempt */ return 0; }

        return I3C1DADR;    // Return dynamic address
    }

    return 0;
}