Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    Getting wrong answer for BME280 CHIP ID

    Getting wrong answer for BME280 CHIP ID

    Josy
    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. 

     

    Thanks

     

    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 statement..it is supposed to cause the interface is SPI. Attcahed is a snapshot of the point am referring to.

    3 REPLIES 3

    Josy
    New Poster

    Hi,

    never mind, solved the problem.

    pankajverma190
    Occasional Visitor

    Hello,

    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?

    Regards,
    kgoveas

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist