Skip to main content
Visitor II
July 17, 2025
Question

Receiving data from ASM330LHHXG1 sensor with intterupt

  • July 17, 2025
  • 2 replies
  • 344 views

 

I am trying to collect accelerometer, gyroscope, and temperature data from the ASM330LHH IMU sensor via SPI by timestamping the exact moment the data is generated. I have connected the INT1 pin of the sensor to the STM32H735RGV6 microcontroller’s PB0 pin and configured it as an external interrupt input. I enabled both the data-ready (DRDY) interrupt and the FIFO threshold interrupt by setting the appropriate registers (CTRL3_C, INT1_CTRL, MD1_CFG, FIFO_CTRL1, FIFO_CTRL3, FIFO_CTRL5, etc.). I verified that SPI communication is working correctly — I can read raw sensor data via polling mode, and the WHO_AM_I register returns the correct device ID. However, the INT1 pin does not toggle or pulse when configured for interrupt generation. I checked the INT1 pin using an oscilloscope and confirmed that it remains static.  Additionally, DWT->CYCCNT is initialized and functional for timestamping.

Despite these checks, the interrupt callback (HAL_GPIO_EXTI_Callback()) never gets triggered when connected to the INT1 pin of the ASM330LHHXG1. It seems like the issue is not on the MCU side but on the sensor side — the sensor does not generate the interrupt. I would like to ask if there is a working example or reference configuration that sets up theASM330LHHXG1 sensor for interrupt generation over SPI using the STM32 HAL library. I am especially interested in a verified set of register writes or a working example project. Are there any known issues with interrupt signaling when using the sensor over SPI? Do I need to acknowledge or clear any specific flags after setting the configuration to make the INT1 pin toggle?

Any help or guidance would be greatly appreciated.

 

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    July 17, 2025

    Hi @yrnzdn ,

    Have you already looked at the examples on Github?

    Hope this helps :)

    yrnzdnAuthor
    Visitor II
    July 17, 2025

    I looked at examples but ı couldnt find a direct interrupt example about data ready interrupt with callback function.