Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Getting wrong answer for BME280 CHIP ID

    Getting wrong answer for BME280 CHIP ID

    New Poster

    Hi, i am using the Adafruit BME280 Breakout Board and SPI for communication with the sensor. I am using STM32L100 Discovery Board and the recommended BOSCH API,not at all tampered with.

    So far i am trying to read the CHIP ID from the address 0xD0 but instead of getting back an asnwer of 0x60, i get 0xFF. 

    For the spi initialisation for my microcontroller, i am sure its correct because i tried sending hello word randomly via spi to another microcontroller and it worked.

    Please any idea what the problem might be?


    I have attached my spi read function and the data sheet from adafruit board. 




    UPDATE: while debugging i noticed that in the bme280_get_regs fuction in the API the point where it is checked if the interface selected is SPI, it does not go into the if is supposed to cause the interface is SPI. Attcahed is a snapshot of the point am referring to.

    3 REPLIES 3

    New Poster


    never mind, solved the problem.

    Occasional Visitor


    I am trying to use bme 680  with stm32f030 MCU.

    I configure MCU with I2C   and also configure bme and include bme.c  ,  bme.h and bme_680 def.h file which is provided by Bosch.


    But my code is stuck in bme_init() function.


    Can you help me with this problem

    Hi pankajverma190,

    Can you please create a new post and  provide more references regarding your setup and what you would like to do?