ICM-42670-P problem with nRF

By toanbuiemotivcom , 25 July 2023

I’m trying to use ICM-42670-P as a sensor without the on-board SAMG55 MCU.
I use nRF5340 for make program with ICM-42670-P sensor and when I test SPI for WHOAMI register and it response 0x00 and 0xFF, it's fail .I would like to know if there is any support for this operation. How can I disable the on-board SAMG55 MCU and control the ICM-42688-P via an external processor?
Please provide me with any support to achieve this

mustafayildiri…

2 years 7 months ago

Hello,

Correct me if I am wrong, you are trying to communicate with the ICM-42670-P sensor on our DK-42670-P board. Could you please tell me how you connected the nRF5340 to DK-42670-P for SPI communication?

phpbb Post ID
45041

toanbuiemotivcom

2 years 7 months ago

Yes, I am trying to communicate with the ICM-42670-P sensor on our DK-42670-P board with DK-nRF5340. I connect that:
ICM-42670-P ..................... nRF5340-DK
Header J4 ..................... On board
CS ..................... P0.26
SCK ..................... P0.06
MOSI ..................... P0.07
MISO ..................... P0.25

Header J3
VDDIO - 3.3V

Header J2
FTDI

And I will send 0x75 from nRF5340 to ICM42670-P and the data of MOSI is 0x00. Please help me. Thank you.

phpbb Post ID
45047

mustafayildiri…

2 years 7 months ago

Hi,

It seems like you have two masters active on the bus, there is no way to cut the power to the Atmel MCU on DK board. You can either erase the preprogrammed Atmel firmware or get an EV_ICM-42670-P board which has no MCU, it's like a breakout board.

phpbb Post ID
45102

toanbuiemotivcom

2 years 7 months ago

Yes, I run SPI Protocol on nRF5340 chip with ICM-42670-P sensor. And now I am doing about get FIFO data but don't work and the data is wrong. Can you help me step to step about get data from FIFO and have to config which register ?

phpbb Post ID
45112

mustafayildiri…

2 years 7 months ago

Hi,

Were you able to erase the preprogrammed firmware that is on Atmel MCU? Are you reading correct who_am_I value back?

phpbb Post ID
45113

toanbuiemotivcom

2 years 7 months ago

Yes, I erase and SPI Protocol is working and when I read Who Am I Register and it return 0x47. It's correct. When I config FIFO for reading, the data is wrong. Please help me to get data from FIFO.

phpbb Post ID
45114

mustafayildiri…

2 years 7 months ago

I would suggest you to look at the datasheet of ICM-42670-P and SmartMotion eMD firmware to see how to properly setup the FIFO.

https://invensense.tdk.com/developers/software-downloads/#smartmotion

https://invensense.tdk.com/products/motion-tracking/6-axis/icm-42670-p/

phpbb Post ID
45115

toanbuiemotivcom

2 years 7 months ago

Yes, I read it and follow it but I see that the data is wrong. Now I use ICM-42688-P and follow link: https://invensense.tdk.com/developers/forums/topic/icm-42688-p-fifo-read-returns-0s/ .
But it don't work. Tell me where I am wrong. Pls.

phpbb Post ID
45116

mustafayildiri…

2 years 7 months ago

Unfortunately, I cannot troubleshoot your problem since I don't have any idea about nRF5340 board or the software. My best suggestion is for you to check out how the FiFo functionality works on eMD firmware and try to implement a similar algorithm with Nordic enviroment.

phpbb Post ID
45117

toanbuiemotivcom

2 years 7 months ago

Yes, thank you for your support. I have a problem about calculate the quaternion of motion sensor. If I can read data from FIFO but I don't calculate the quaternion of motion sensor. Please help me to calculate.

phpbb Post ID
45118

toanbuiemotivcom

2 years 7 months ago

When I read the document ICM-20948 Transition Guide in link: https://www.symmetryelectronics.com/getmedia/98a0ce24-a39e-46c6-a7b9-90187746be98/AN-000360-ICM-20948-Transition-Guide-v1-1.pdf. I see that the document say you will help me about the sensor fusion library. So please help me for calculate quaternions same as ICM-20948.
Now I use ICM-426888-P sensor.

phpbb Post ID
45121

mustafayildiri…

2 years 7 months ago

Hi,

Have you checked out the eMD_Software_Guide_ICM20948 under docs folder after you downloaded DK-20948 SmartMotion eMD 1.1.0 from the software downloads of the website?

phpbb Post ID
45126

toanbuiemotivcom

2 years 7 months ago

Yes, I checked the document but I want to use your algorithm for my project. I can read gyro and accel but I want to calculate Quaternions.
I see the project, have a function named invn_algo_agm_process(&input, &output); /* Process the AgmFusion Algo */ in file libInvnAlgoAGM.a ( I guess that ).
And I can not read for use. I am using ICM-42688-P.
Please help me.

phpbb Post ID
45130

mustafayildiri…

2 years 7 months ago

Hello,

I shared the wrong sensor part with you, sorry about that. I attached an image of quaternion explanation form our FAQ page. Let me know if you have any questions.

phpbb Post ID
45147

y30220933maile…

2 years 6 months ago

I read fifo data using nrf5340 when VDDIO is 3.3V. But when I switch the J3 to VDDIO 1.8V, the MISO will not respond.

phpbb Post ID
45211

mustafayildiri…

2 years 6 months ago

Hi,

I can't provide support for this, since I am not familiar with your setup, code and environment. Please make sure that signal integrity is not affected at 1.8V.

phpbb Post ID
45218
phpbb Topic ID
45040