cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DW12 wake up interrupt on int1 pin

yashg25
Associate II

Hello,

I have an issue related to LIS2DW12 wake up interrupt. When reading the wake interrupt src it is showing that wake up interrupt is being triggered I am getting value in loop from software interrupt. But after enabling interrupt on INT1 pin I am not getting interrupt over INT1 pin. It's being kept at 0.00 volts. Below is my code snippet (controller I am using is NRF52832):

uint32_t app_mpu_init(void) //LIS2DW12 INIT LOGIC
{
    uint32_t err_code;
    uint8_t data;
    // Initate TWI or SPI driver dependent on what is defined from the project
    err_code = nrf_drv_mpu_init();
    if(err_code != NRF_SUCCESS) return err_code;
   
    data = readRegister(LIS2DW12_WHO_AM_I);
    NRF_LOG_INFO("0X%02X ", data); //Getting 0x44 which is correct
 
    err_code = nrf_drv_mpu_write_single_register(LIS2DW12_CTRL2, 0x40);
    if(err_code != NRF_SUCCESS) return err_code;
    nrf_delay_ms(1);
    err_code = nrf_drv_mpu_write_single_register(LIS2DW12_CTRL2, 0x80);
    if(err_code != NRF_SUCCESS) return err_code;
    nrf_delay_ms(25);
 
    err_code = nrf_drv_mpu_write_single_register(LIS2DW12_CTRL1, 0x30);
    if(err_code != NRF_SUCCESS) return err_code;
 
    err_code = nrf_drv_mpu_write_single_register(LIS2DW12_CTRL3, 0x00);
    if(err_code != NRF_SUCCESS) return err_code;
 
    err_code = nrf_drv_mpu_write_single_register(LIS2DW12_CTRL6, 0x0C);
    if(err_code != NRF_SUCCESS) return err_code;
 
    return NRF_SUCCESS;
}

Below is the interrupt enable logic:

uint32_t app_mpu_int_enable(void) // Enabling interrupt on LIS2DW12 IC
{
  uint32_t err_code;
 
  err_code = nrf_drv_mpu_write_single_register(LIS2DW12_CTRL_REG7, 0x00);
  if(err_code != NRF_SUCCESS) return err_code;
  nrf_delay_ms(1);
 
  err_code = nrf_drv_mpu_write_single_register(LIS2DW12_CTRL4_INT1_PAD_CTRL, 0x20);
  if(err_code != NRF_SUCCESS) return err_code;
 
  err_code = nrf_drv_mpu_write_single_register(LIS2DW12_WAKE_UP_DUR, 0x00);
  if(err_code != NRF_SUCCESS) return err_code;
 
  err_code = nrf_drv_mpu_write_single_register(LIS2DW12_WAKE_UP_THS, 0x42);
  if(err_code != NRF_SUCCESS) return err_code;
 
  err_code = nrf_drv_mpu_write_single_register(LIS2DW12_CTRL_REG7, 0x60);
  if(err_code != NRF_SUCCESS) return err_code;
 
  return NRF_SUCCESS;
}
Need help in getting interrupt over INT1 pin checked with oscilloscope not interrupt is being routed to INT1 pin.
Please let me know if any further information you require. Our product is in final stage and we have a huge qty of 10k by this first quarter of 2025.

3 REPLIES 3
yashg25
Associate II

Hello, waiting for response

Federica Bossi
ST Employee

Hi @yashg25 ,

Did you try to follow our example on Github?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Federica Bossi 

I have tried the following example but still I am not getting any interrupt over INT1 pin.