RT685 I3C CCC transfer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RT685 I3C CCC transfer

624 次查看
KevinKim117
Contributor I

Hello.

I'm implementing CCC transfer between RT685 and ST's LSM6DSO.

The below image is what I expected. I tested other equipment. Broadcast 'Reset DAA'

KevinKim117_1-1674802101185.png

 

Here's my code. I didn't use ISR. MINTSET register set 0x8AF00.

enum eI3C_COMM_STATUS i3c_ccc_rstdaa_b(void)
{
uint32_t mctrlReg = I3C_MASTER->MCTRL;
uint32_t masterState;
size_t txCount = 0xFFUL;
uint32_t status;

I3C_MasterClearStatusFlags(I3C_MASTER, (uint32_t)kMasterClearFlags);

masterState = I3C_MasterGetState(I3C_MASTER);
if ((masterState != kI3C_MasterStateIdle) && (masterState != kI3C_MasterStateNormAct))
{
PRINTF("I3C busy...\r\n");
return COMM_FAILED;
}
I3C_MasterClearStatusFlags(I3C_MASTER, (uint32_t)kMasterClearFlags);

mctrlReg &= ~(I3C_MCTRL_REQUEST_MASK | I3C_MCTRL_TYPE_MASK | I3C_MCTRL_IBIRESP_MASK |
I3C_MCTRL_DIR_MASK | I3C_MCTRL_ADDR_MASK | I3C_MCTRL_RDTERM_MASK);
mctrlReg |= I3C_MCTRL_REQUEST(1) | I3C_MCTRL_TYPE(0) |
I3C_MCTRL_DIR(0) | I3C_MCTRL_ADDR(I3C_BCAST_ADDR);
I3C_MASTER->MCTRL = mctrlReg;

I3C_MASTER->MWDATABE = CCC_RSTDAA_B;

/*
do {
status = I3C_MasterGetStatusFlags(I3C_MASTER);
} while ((status & (uint32_t)kI3C_MasterControlDoneFlag) != (uint32_t)kI3C_MasterControlDoneFlag);
I3C_MasterClearStatusFlags(I3C_MASTER, (uint32_t)kI3C_MasterControlDoneFlag);
//*/

///*
do {
I3C_MasterGetFifoCounts(I3C_MASTER, NULL, &txCount);
} while (txCount != 0U);
//*/

I3C_MasterStop(I3C_MASTER);

return COMM_DONE_OK;
}

 

I thought, It look normal but there was not exist Ack part of 0x7E. So, It was not complete clearly, abnormal STOP.

How to fix it?

KevinKim117_3-1674802785568.png

 

Thanks.

 

 

标记 (3)
0 项奖励
回复
1 回复

589 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

I recommend using the example master and on the other board the example slave. The ACK part is answered by the slave, please review the examples.

Best regards,
Pavel

0 项奖励
回复