How to remove stop condition after MDB when I3C IBI comes on LPC55S36

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to remove stop condition after MDB when I3C IBI comes on LPC55S36

578 Views
sam_wu_7911
Contributor II

Hi there,

I'm trying to program I3C IBI without a stop condition after the mandatory byte data, and connecting a restart condition to read data afterwards. How could I do?

Below is the IBI waveform that I did with MDB.

IBI with stop condition.png

 

 void i3c_master_ibi_callback(I3C_Type *base,
                                    i3c_master_handle_t *handle,
                                    i3c_ibi_type_t ibiType,
                                    i3c_ibi_state_t ibiState)
{
    switch (ibiType)
    {
        case kI3C_IbiNormal:
            if (ibiState == kI3C_IbiDataBuffNeed)
            {
                handle->ibiBuff = g_master_ibiBuff;
            }
            else if (ibiState == kI3C_IbiReady)
            {
                memcpy(g_ibiUserBuff, (void *)handle->ibiBuff, handle->ibiPayloadSize);
            }
            break;
        case kI3C_IbiHotJoin:
            I3C_MasterEmitIBIResponse(EXAMPLE_MASTER, kI3C_IbiRespManual);
            break;
        default:
            assert(false);
            break;
    }
}

void i3c_master_callback(I3C_Type *base, i3c_master_handle_t *handle, status_t status, void *userData)
{
    if (status == kStatus_I3C_IBIWon)
    {
        g_ibiWonFlag = true;
    }
    else
    {
        /* Signal transfer complete when received complete status. */
        g_masterCompletionFlag = true;
    }
    g_completionStatus = status;
}
0 Kudos
Reply
6 Replies

539 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @sam_wu_7911 

According to the LPC553x Reference Manual.

Harry_Zhang_0-1761014283371.png

The controller automatically stops IBI data after nine total bytes (including Mandatory Data
byte).

May I ask what your specific application is?

BR

Harry

0 Kudos
Reply

535 Views
sam_wu_7911
Contributor II

Hi @Harry_Zhang 

This application is a bridge between the target and the PC/laptop with HID-I3C Protocol.

According to the document of HID-I3C Protocol, after the MDB shall be a restart condition directly. Please see the figure below. 

I wonder if LPC55S36 cannot match this requirement, is there another NXP MCU that can match?

sam_wu_7911_0-1761015226332.png

 

0 Kudos
Reply

478 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @sam_wu_7911 

I have confirmed with internal team.

The lpc55s36 can match this requirement,

You just need to add

handle->state = (uint8_t)kWaitRepeatedStartCompleteState;

after

stateParams->result = kStatus_I3C_IBIWon;

Harry_Zhang_0-1761300339562.png

Harry_Zhang_1-1761300484785.png

Additionally, could you please tell me  which specification the shared image (HID-I3C Protocol) comes from? we are  quite interested and would like to study it.

BR

Harry

 

0 Kudos
Reply

436 Views
sam_wu_7911
Contributor II

Hi @Harry_Zhang 

 

OK, I'll try it asap and let you know.

 

This document was provided by Microsoft and requires an NDA.

 

BTW, I have another question that hasn't been solved, pls help with it. I'll appreciate it.

https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S36-I3C-SCL-isn-t-completed-during-Hot-Join/m...

0 Kudos
Reply

346 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @sam_wu_7911 

I just replied to this post.

BR

Harry

0 Kudos
Reply

511 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @sam_wu_7911 

I need to confirm with the internal team.

BR

Harry

0 Kudos
Reply