Enable Wake on motion with ICM20948

By uttkarshtak , 28 June 2019

Please guide me to enable wake on motion with icm20948 on nrf52832. I put my host controller in sleep but I am unable to wake it using wake on motion interrupt. I have used spi to connect the icm20948 with nrf52832.
Here is the code I'm using to enable wom and set threshold.

nrf_drv_mpu_write_registers(REG_LP_CONFIG, 0x00, 4);
nrf_drv_mpu_write_registers(REG_PWR_MGMT_1, 0x2A, 4);
nrf_drv_mpu_write_registers(REG_PWR_MGMT_2, 0x07, 4);

nrf_drv_mpu_write_registers(REG_ACCEL_CONFIG , 0x0B, 4);
nrf_drv_mpu_write_registers(REG_INT_ENABLE, 0x40, 4);

dmp_icm20948_set_wom_enable(de, 1);
dmp_icm20948_set_wom_motion_threshold(de, 1);

//nrf_drv_mpu_write_registers(ICM20648_REG_ACCEL_INTEL_CTRL , 0x03, 4);
//nrf_drv_mpu_write_registers(ICM20648_REG_ACCEL_WOM_THR, 0x1E, 4);

nrf_drv_mpu_write_registers(REG_PWR_MGMT_1, (1 << 5), 4);
nrf_drv_mpu_write_registers(REG_PWR_MGMT_1, (1 << 5), 4);
nrf_drv_mpu_write_registers(REG_LP_CONFIG, (1 << 5), 4);
phpbb Topic ID
37530