Hi
I am setting up the IMC-42688 to generate a WOM Interrupt however, the INT_Status2 is always zero when assigning the WOM interrupts to be routed to INT1.
Here is the code snippet configuring for WOM:
/* Select Register Bank 4 */
sl_icm42688_write_register(ICM42688_REG_BANK_SEL, 0x04);
/*Write to WOM X,Y,Z Registers */
sl_icm42688_write_register(UB4_REG_ACCEL_WOM_X_THR, 0x50);
sl_icm42688_write_register(UB4_REG_ACCEL_WOM_Y_THR, 0x50);
sl_icm42688_write_register(UB4_REG_ACCEL_WOM_Z_THR, 0x50);
/* Select Register Bank 0 */
sl_icm42688_write_register(ICM42688_REG_BANK_SEL, 0x00);
/*Write to INT_Source_1 Register */
sl_icm42688_write_register(UB0_REG_INT_SOURCE1, 0x07);
sl_sleeptimer_delay_millisecond(50);
/*Write to WOM_INT_MODE Register */
sl_icm42688_write_register(UB0_REG_SMD_CONFIG, 0x05);
Any suggestions on how to troubleshoot?
Hello,
Are you following the steps outlined in the datasheet section 8.7 Wake On Motion Programming?
Yes. I am. I also replicated the register write sequence from the DK firmware.
I noticed pins 7 and 11 are grounded for SPI comms. Datasheet suggest to ground it. How much is the impact of leaving them floating?
I would suggest them to ground them as pointed out in the datasheet.
I would suggest them to ground them as pointed out in the datasheet.
Hi,
I'm have the same issue. After port source code on "smartmotion-dkexamples-atmel-cm4-fpu-2.0.9" run on Silabs EFR32BG22 the example "example-raw-ag" is worked, but the example "example-wom" not worked. Interrupt not generated and INT1 status always LOW.
/* Initial WOM threshold to be applied to ICM in mg */
#define WOM_THRESHOLD_INITIAL_MG 200
/* WOM threshold to be applied to ICM, ranges from 1 to 255, in 4mg unit */
static uint8_t wom_threshold = WOM_THRESHOLD_INITIAL_MG / 4;
int ConfigureInvDevice(uint8_t is_low_noise_mode, ICM426XX_ACCEL_CONFIG0_FS_SEL_t acc_fsr_g,
ICM426XX_ACCEL_CONFIG0_ODR_t acc_freq)
{
int rc = 0;
rc |= inv_icm426xx_set_accel_fsr(&icm_driver, acc_fsr_g);
rc |= inv_icm426xx_set_accel_frequency(&icm_driver, acc_freq);
if (is_low_noise_mode) {
rc |= inv_icm426xx_enable_accel_low_noise_mode(&icm_driver);
} else {
/* Set 1x averaging, in order to minimize power consumption (16x by default) */
rc |= inv_icm426xx_set_accel_lp_avg(&icm_driver,
ICM426XX_GYRO_ACCEL_CONFIG0_ACCEL_FILT_AVG_1);
rc |= inv_icm426xx_enable_accel_low_power_mode(&icm_driver);
}
/* Configure WOM to produce signal when at least one axis exceed 200 mg */
// as reference: 0.4g = 0x66 = 104
rc |= inv_icm426xx_configure_smd_wom(&icm_driver, wom_threshold, wom_threshold, wom_threshold,
ICM426XX_SMD_CONFIG_WOM_INT_MODE_ORED,
ICM426XX_SMD_CONFIG_WOM_MODE_CMP_PREV);
rc |= inv_icm426xx_enable_wom(&icm_driver);
if (rc)
INV_MSG(INV_MSG_LEVEL_ERROR, "Error while configuring WOM threshold to initial value %c",
wom_threshold);
INV_MSG(INV_MSG_LEVEL_INFO, "Waiting for detection...");
return rc;
}
Did you guy has solved the problem?
Hello,
"smartmotion-dkexamples-atmel-cm4-fpu-2.0.9" is created for a specific Atmel SAMG55 MCU. Porting could be different from Silabs EFR32BG22, I would suggest you develop your own firmware for that.
Thank for response,
I know it's difference, but I not sure if I try with SAMG55 is worked too if not use DK. But I don't know where is problem it's not worked while I'm porting success the SPI communication and read raw acc and gyro with INT_1 is correct.
I guess it's problem with schematic our schematic has reference from datasheet connected over SPI(4-wire).
How do you think?
If you followed the datasheet reference for SPI on your design, it should be fine