Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BMI270 GYRO data using SPI in C

    BMI270 GYRO data using SPI in C


    Hi i am a fresher in development and I am trying  to get only gyroscope data from BMI270 sensor. Initially I have tried to get the data from example code from github  - boschsensortec /BMI270_SensorAPI , I tried to build -  bmi270_examples/gyro/gyro.c . I got error that  COINES is not included later i included COINES package as well and set the directory path correctly . Even though I didnot get any data .


    Hardware wise I am only using BMI270 and I have made the connections to microprocessor as per the documentaion of 4 wire SPI .

    so i want to get more clarification how to get data from BMI270

    - does it require any other hardware like Application board or shuttle board .

    - does the sensor require any configuration through software , if so , please list down them with thier dependicies.

    - can we build the cdoe without using COINES package .

    - or list any other way of getting gyro data from sensor using C code without external dependicies.


    4 REPLIES 4

    Community Moderator
    Community Moderator

    Hi manivt,

    Thanks for your inquiry.
    If you want to use COINES code directly, you need the APP 3.0 board and the BMI270 Shuttle board 3.0
    If you don't have an APP 3.0 board and a BMI270 Shuttle Board 3.0 board, you can refer to the BMI270 sensor API and examples on Github( and migrate them to your host hardware.
    I also uploaed BMI270 example code on STM32 for your reference, hope it will be helpful for you.

    Thanks for the response , I have earlier tried using  github example code ( boschsensortec/BMI270_SensorAPI/bmi270_examples/gyro ) and I have inculded all the required depedencies .

    In Make of gyro it is asking for path for COINES but i want to use the sensor without COINES

    COINES_INSTALL_PATH ?= ../../../..

    EXAMPLE_FILE ?= gyro.c

    API_LOCATION ?= ../..


    C_SRCS += \
    $(API_LOCATION)/bmi2.c \
    $(API_LOCATION)/bmi270.c \


    include $(COINES_INSTALL_PATH)/


    - Can I remove COINES path and its code file and use the code

    - Or am I using the wrong example code for using the sensor

    - Do I have to make any changes in code to make sensor work

    Community Moderator
    Community Moderator

    Hi manivt,

    If you would like to run BMI270 sensor API and examples on your own host & BMI270 hardware, you don't need code related to Coines, replace it with code from your host platform.

    can you list me down where do need to make changes on code to make example code running