ICM-42688 RTC mode, PIN9 as CLKIN

By altinellergmailcom , 17 October 2023

Hello,

Following datasheet, to set pin9 as clkin I have done the following:

uint8_t data;

write_byte(ICM42688_REG_BANK_SEL, 1); // bank sel 1
read_byte(ICM42688_INTF_CONFIG5, &data); // read INTF_CONFIG5
data |= 0b00000100; // [2:1] PIN9_FUNCTION: CLKIN: 10
write_byte(ICM42688_INTF_CONFIG5, data); // write INTF_CONFIG5

write_byte(ICM42688_REG_BANK_SEL, 0); // bank sel 0
read_byte(ICM42688_INTF_CONFIG1, &data); // read INTF_CONFIG1
data |= 0b00000101; // [2] RTC_MODE: 1, [1:0] CLKSEL: 01 (PLL)
write_byte(ICM42688_INTF_CONFIG1, data); // write INTF_CONFIG1

I am also using FIFO, and have gyro and accel ODR of 1khz, with FSR=0 for both. I have INT1 also configured, that pulses, when fifo data is ready.
I also read the timestamp from the FIFO header.

The problem is when RTC_MODE (bit2 of ICM42688_INTF_CONFIG1) is set to 1, the sensor freezes, and does not output any data.

If I dont set RTC_MODE=1, then I read the timestamps from the fifo header, but change in clk frequency is not reflected on the timestamps.

How can I take advantage of the CLKIN feature? How can I verify that CLKIN feature is configured correctly and working? (I tried varying the clk frequency from 32khz to 50khz, and I was not able to observe any changes)

Can the clkin feature be used when we are using fifo mode, and 1 interrupt.

Best Regards,
-C.

robertbohnboro…

1 year 6 months ago

Hello,
have you found a solution for the not working CLKIN? I just stumbled over this problem in my project.

Best Regards

phpbb Post ID
46703

altinellergmailcom

1 year 6 months ago

Hello,

Yes I had made a small mistake and it works now, so the datasheet is exact, but I dont remember what it was :)

phpbb Post ID
46717
phpbb Topic ID
45276