ICM-20689 Porting to a different processor

By cyd , 22 June 2021

Hello,

I am looking for some clarity on hooking another processor into the ICM-20689 through the ICM-20789-20689_DMP-1.1.0. I have unhooked the SAMG54/55, and included all necessary files from the motion library. The project compiles with added library files. I am no attempting to build the functionality of the application from the processor to the ICM-20689. The revised project has instantiated a inv_icm20789_serif structure as well as a inv_icm20789_t structure. The serif is copied into the other through inv_icm20789_reset_state function. I assume the instantiation of the serif structure is the hooks from a new processor to the ICM-20689 and the serial communication, I2C, from the processor to the ICM. The instantiation identifies the functions idd_io_hal_read/write which eventually points to functions of a particular processor for reading and writing over I2C. So, when I call setupsensor and it fails to read the correct whoami value for the ICM-20689 I assume there is a disconnect between my I2C communication and the library. Tracing down the calls to read the who am i register leads me all the way to the file ICM20789serif.h and the call to the function inv_icm20789_serif_read_reg, which does an arrest (s). I am not overly familiar with the assert statement, but basically evaluates an argument. S is a place holder for the structure inv-ICM20789 structure.
I could use some help in getting a handle on reading the who am i register with the tdk library, thank you. If the I2C read function associated with the processor is called to read the who am i register it read 0x98.

phpbb Topic ID
39062