Could you shre some demo of I3C?

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

Could you shre some demo of I3C?

5,742 Views
melanie
Contributor III

Could you share some demo about ICM-42688  project for the RT685?

I need to verify the other products of TDK about the I3C.

@kerryzhou thanks

0 Kudos
Reply
15 Replies

5,710 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @melanie ,

  I find some screenshot about the 42688 +RT500 test result on myside.

  Please check my attached picture, it will helps your understanding, it also use i3c_bus_master_read_icm42688p.

 

Wish it helps you!

Best Regards,

Kerry

 

0 Kudos
Reply

5,648 Views
melanie
Contributor III

Hi @kerryzhou 

 

非常感谢你的回复。

请问如何导入AUD的SDK?好像没有办法通过这个界面导入IDE。

我目前只是下载了你给我链接中的压缩包。

 

我只是把I3C-master_read_sensor_icm42688p该文件夹中的

melanie_1-1661133539568.png

这个C文件移植到了我的工程,目前没有办法正常运行。

是因为我没有把完整的SDK文件导入其中么?

melanie_0-1661133360117.png

 

0 Kudos
Reply

5,645 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @melanie ,

   你把SDK 包下载了,直接拖到MCUXpresso IDE 的installed SDK, 然后就可以导入工程了。

   你可以参考下这个文档:

SDK_2_12_0_MIMXRT685-AUD-EVK\docs\Getting Started with MCUXpresso SDK for EVK-MIMXRT685.pdf

chapter 3 Run a demo using MCUXpresso IDE.

Best Regards,

Kerry

0 Kudos
Reply

5,637 Views
melanie
Contributor III

 

Hi @kerryzhou 

谢谢你的回复。

我根据文档内容,将压缩包拖入installed SDK,会出现如下图所示的错误。我把原来的SDK(不是MIMXRT685-AUD-EVK的SDK)删除,重新导入新的SDK也会报下面的错误。

melanie_0-1661149456300.png

报错框中的ERROR LOG打不开

melanie_1-1661149609669.png

Thanks

0 Kudos
Reply

5,635 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @melanie ,

不急不急,我知道什么原因,你这个问题是在于MCUXpresso IDE版本问题:

• MCUXpresso IDE, version is 11.6.0

你更新下,SDK2.12.0要用11.6.0版本的mcuxpress IDE。

 

Best Regards,

Kerry

0 Kudos
Reply

5,627 Views
melanie
Contributor III

Hi @kerryzhou 

谢谢你的回复

更新IDE后可以成功的import SDK examples

但是,我用ICM42688+RT685 运行时,出现以下问题

melanie_1-1661154775360.png

 

melanie_0-1661154734276.png

Thanks

0 Kudos
Reply

5,622 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @melanie ,

   你忘了之前我和你说的了,这个代码的flash和你EVK的flash不一样。

  所以测试要注意下,有两个办法:

1. 你可以跑到RAM里面

kerryzhou_0-1661158325899.png

注意,RAM代码就是要debug,掉电就没了。

 

2.你需要修改FCB为RT685-EVK,下载算法也改成RT685-EVK的。

flash_config.c内容修改为MIMXRT685-EVK 对应的flash_config.c代码。

下载改为MIMXRT685-EVK的下载算法:

kerryzhou_1-1661158585544.png

这样修改后,你就可以直接跑到你的MIMXRT685-EVK flash了。

你试试看。

Best Regards,

Kerry

 

0 Kudos
Reply

5,547 Views
melanie
Contributor III

Hi @kerryzhou 

谢谢你的回复。

icm42688目前没办法正常运行。卡在如图所示的地方

result=0x1edc

硬件接线没有问题。请问这个可能时什么原因导致的?

 

melanie_3-1661843951104.png

 

melanie_0-1661843759017.png

 

0 Kudos
Reply

5,541 Views
kerryzhou
NXP TechSupport
NXP TechSupport

你还到你的新帖子里面回复我,这个是老贴。

https://community.nxp.com/t5/i-MX-RT/%E5%A6%82%E4%BD%95%E5%BE%97%E5%88%B0%E5%8A%A8%E6%80%81%E5%9C%B0...

并且把你那边的ENTDAA的波形发一下,看看是不是从机就没有反馈了。

 

 

0 Kudos
Reply

5,737 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @melanie ,

   Thanks for your interest in the NXP MIMXRT product, I would like to provide service for you.

   Yes, we have the RT600 I3C ICM-42688 demo.

   Do you know, we also have a RT600 EVK board named as MIMXRT685-AUD-EVK? This board contains the ICM-42688, so the related SDK also contains the demo:

https://mcuxpresso.nxp.com/en/builder?hw=MIMXRT685-AUD-EVK

After you download the SDK, you can find the demo from this path:

\SDK_2_12_0_MIMXRT685-AUD-EVK\boards\mimxrt685audevk\driver_examples\i3c\master_read_sensor_icm42688p

 

Wish it helps you!

Best Regards,

Kerry

 

0 Kudos
Reply

5,735 Views
melanie
Contributor III

Hi @kerryzhou 

thanks for your reply.

I use EVK-MIMXRT685 , not MIMXRT685-AUD-EVK.

Another question:

int main(void)
{
uint8_t result;
i3c_master_config_t masterConfig;
uint8_t fifodata[16];
i3c_master_transfer_t masterXfer;

/* Attach main clock to I3C, 396MHz / 4 = 99MHz. */
CLOCK_AttachClk(kMAIN_CLK_to_I3C_CLK);
CLOCK_SetClkDiv(kCLOCK_DivI3cClk, 20);

BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitDebugConsole();

PRINTF("\r\nI3C master read sensor data example.\r\n\r\n");

I3C_MasterGetDefaultConfig(&masterConfig);
masterConfig.baudRate_Hz.i2cBaud = EXAMPLE_I2C_BAUDRATE;
masterConfig.baudRate_Hz.i3cPushPullBaud = 12500000U;
masterConfig.baudRate_Hz.i3cOpenDrainBaud = 2500000U;
masterConfig.enableOpenDrainStop = false;
I3C_MasterInit(EXAMPLE_MASTER, &masterConfig, I3C_MASTER_CLOCK_FREQUENCY);

/* Create master handle. */
I3C_MasterTransferCreateHandle(EXAMPLE_MASTER, &g_i3c_m_handle, &masterCallback, NULL);


PRINTF("i3cPushPullBaud: %d\r\n", masterConfig.baudRate_Hz.i3cPushPullBaud);
PRINTF("i3cOpenDrainBaud: %d\r\n", masterConfig.baudRate_Hz.i3cOpenDrainBaud);
PRINTF("Broadcast CCC DISEC (DISHJ + DISMR + DISINT): ");
display_ccc_status(i3c_ccc_disec_b(CCC_DISEC_BYTE_DISHJ | CCC_DISEC_BYTE_DISMR | CCC_DISEC_BYTE_DISINT));
PRINTF("\r\n");

PRINTF("Broadcast CCC RSTDAA: ");
display_ccc_status(i3c_ccc_rstdaa_b());
PRINTF("\r\n");

i3c_demo_setdasa(0x68, 0x27);

When I use this demo to get the dynamic address. the code can't jump this while loop.

melanie_1-1660812189813.png

 

melanie_0-1660812037379.png

Could you help me ?  thanks

0 Kudos
Reply

5,730 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @melanie ,

  MIMXRT685-AUD-EVK is similar to the MIMXRT685-EVK board, just the AUD-EVK on board contains the ICM-42688 sensor.

  So, please still check my mentioned SDK code at first, then you can port the related I3C demo to your own project and test.

kerryzhou_0-1660812768344.png

Please check my mentioned SDK code at first, thanks.

Best Regards,

kerry

 

0 Kudos
Reply

5,718 Views
melanie
Contributor III

Hi @kerryzhou 

Thanks for your reply

I check the SDK you mentioned.

melanie_0-1660874318958.png

melanie_1-1660874343749.png

 

I use similar sensor to test the code. But there are some error. could you help me?Thanks

0 Kudos
Reply

5,714 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @melanie ,

   Talk about my experience for I3C.

    I think, just check the code debug result is not enough, do you have the logic analyzer? It's better to contains the I3C function, then check the bus, it will helps you to find the detail area issues.

   About the testing, you can download the SDK and test it on the EVK directly, just run it in RAM, not the flash, as I know EVK and audio EVK used external flash have differences, others should be similar.

  About the connection to your sensor, make sure you add the external pull up.

  Then test the I3C wave, whether it has response or not? Check the DAA works or not?

The wave should like this:

kerryzhou_0-1660882022795.png

 

   I checked my previous wave, but seems my logic tool meet issues, it deletes all my saved old 42688 I3C wave, so can't share you directly now. Maybe you need to test it by yourself.

If you have the AUDIO-EVK, that will be more useful to you.

 

Best Regards,

kerry

 

0 Kudos
Reply

5,731 Views
melanie
Contributor III

melanie_0-1660812735092.png

 

0 Kudos
Reply