Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMG250 stuck at SUSPEND power mode

    WirelessMan
    New Poster

    BMG250 stuck at SUSPEND power mode

    Hello!  I am currently trying to make my BMG250 working, but it is always in suspended mode from startup. I can read ID, temperature and read/write some configuration registers, but nothing happens when I attempt to change power mode to normal. And all other readings are zeros.

    So my init procedure looks like that: 

     

    void BMG250_Init(SPI_DEVICE spi)
    {
    	bmg250.device = spi;
    
    	HAL_GPIO_WritePin(bmg250.device.cs_port,bmg250.device.cs_pin,GPIO_PIN_SET); // CS pin high
    	BMG250_IO_ReadID(); 	// Read from reg 0x00 to enable SPI mode
    	HAL_Delay(10);			// Delay 0x00
    	BMG250_IO_Start(); 		// Write 0x15 to 0x7E reg
    	HAL_Delay(1000);		// Waiting for reboot
    	BMG250_IO_ReadID();		// Read ID
    	BMG250_IO_ReadStatus(); // Read PMU status
    
    }

     

     And I end up with this

    WirelessMan_1-1647769700840.png

     

    I checked everything:

    • Power is OK. 3.3V and at least 300mA available
    • SPI works properly according to the logic analyzer
    • SPI speed is 1MHz
    • Rebooting, restarting, trying different power modes does not help
    • Error registers are clear

     

    I designed my code according to https://github.com/BoschSensortec/BMG250-API

    But it still does not work.

     

    Please help me!

    5 REPLIES 5
    BSTRobin
    Community Moderator

    Re: BMG250 stuck at SUSPEND power mode

    Hello WirelessMan,

    Suggest you refer to the flow of the example program to run it.
    https://github.com/BoschSensortec/BMG250-API/tree/master/examples

    WirelessMan
    New Poster

    Re: BMG250 stuck at SUSPEND power mode

    Dear BSTRobin,

    As I said, I followed examples on this GitHub page. It does not help.

    BSTRobin
    Community Moderator

    Re: BMG250 stuck at SUSPEND power mode

    Hello WirelessMan,

    Could we know what is the specific phenomenon that you can't use it normally? This is a tested code, which is finally put on GitHub.

    WirelessMan
    New Poster

    Re: BMG250 stuck at SUSPEND power mode

    Hello BSTRobin,

    I made mistake in spi read function. It took more than week to find the error, because other devices were working fine on the same SPI lane using same function.

    Sorry for disturbance and thank you!
    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