BMI270 interrupts seem not to be usable in nRF Connect SDK v2.2.0 with zephyr

Hi,

I am developing a nrf5340 based board containing the BMI270 IMU device via SPI interface like in the Thingy:53.

Unfortunately I am not able to set the device up for using the data ready interrupt and reacting to the interrupt via the zephyr device driver so far. The device works fine just polling for values regularly, but I need it interrupt driven. Looking at the official zephyr project documentation, the interrupt interface simply does not seem to be implemented for BMI270.

Is there a simple example I could take a look at for implementing an interrupt driven approach using the interrupt lines of the BMI270 that e.g. to send a data ready interrupt (which the device could provide, if configured accordingly) and react by just reading the 16 bit values via SPI? I need the zephyr RTOS for other things in the code, but maybe there is a simple way of implementing the BMI270 interrupt interface without using the BMI270 zephyr driver?

How is the BMI270 interrupt line 1 (that is connected in the schematics) used in the thingy:53 software?

Any help is appreciated!

Regards,

Jens

nRF Connect SDK v2.2.0 on macOS Ventura 13.2.1, Apple M1 Pro
nrf5340 on custom board

  • Hey,

    would it be possible for you to share your solution for interrupt handling with BMI270?

  • In case you don't get a response here MatiM, feel free to open a new ticket for this. We'll be happy to help.

    Regards,

    Elfving

  • Hi MatiM,

    I cannot share the full code with you, but some snippets and the concept, I think. Currently I am running it unter nRF Connect SDK v2.4.0 - and I have not checked, if any new version of the driver now is supporting the interrupts.

    So her are the snippets of my code (from a test version) - with everything referencing my project removed - so there are some includes removed and some short specifics of the code, but I hope it is still a guide helping you along with all related to interrupt processing included...

    The easiest way to use this in a test, would be to call "setup_bmi270" and then "wait_for_drdy" in a loop and "read_bmi270_data". On the HW side you would need to connect the BMI270 interrupts to the defined pins and configure those accordingly and you need to setup "Bosch_bmi270" for use with SPI in the device tree, of course.

    I hope, this is of some help to you.

    Regards,

    Jens

  • Thank you very much :D

1 2