Bosch Sensortec Community

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

    BMI160: How do you properly use "softreset"?

    Member

    BMI160: How do you properly use "softreset"?

    I'm able to configure the BMI160 to run both its accelerometer and its gyroscope at 400Hz ODR with Data Ready coming out of INT1. I'd like the ability to reset the chip if something goes wrong. There's a "softreset" command available by writing 0xB6 to the CMD register at 0x7E.

    I've tried writing 0xB6 to 0x7E, but when I do the chip becomes completely unresponsive. I've included a 100mS delay after the softreset command but that doesn't fix it. I've even tried much longer delays, manually by stalling the debugger, but again that doesn't fix it.

    To be precise: If I write my configuration values without first doing a "softreset" via CMD (0x7E), the BMI160 configures fine, my configuration values can be read back from the chip, the INT1 pin indicates Data Ready, and data is available by reading the Acc and Gyro registers. But if I change nothing else except precede the above sequence with a "softreset", the chip never starts working... no INT1, no changing data in the Acc and Gyro registers.

    Why would resetting the chip cause an otherwise successful configuration to fail? My natural presumption was that I wasn't waiting long enough after softreset before starting to write configuration values, but no amount of delay seems to fix this.

    What are the tricks to using "softreset"? Any assistance gratefully appreciated... thanks!

    Tags (1)
    7 REPLIES 7
    Member

    Re: BMI160: How do you properly use "softreset"?

    Just to be clear: I'm only sending the "softreset" command BEFORE I write all of the configuration registers. I understand that "softreset" is supposed to reset all registers to their power-up defaults (which is exactly what I want "softreset" to do), so I follow my "softreset" with my proven-successful configuration data. I know that "softreset" will stop the chip from emitting INT1/Data Ready and new sensor data, that is obvious and to be expected. My question is, why can't the chip be successfully configured AFTER a "softreset" is sent?

    zgg
    New Poster

    Re: BMI160: How do you properly use "softreset"?

    Hi

    Are you using I2C or SPI?

    Member

    Re: BMI160: How do you properly use "softreset"?

    4-wire SPI.

    Community Moderator

    Re: BMI160: How do you properly use "softreset"?

    Here is a short example made under COINES, the programable UI from our website.

    data = 0xB6;

    rslt = bmi160_set_regs(BMI160_COMMAND_REG_ADDR, &data, 1, &bmi160dev);

    coines_delay_msec(200);

    rslt = bmi160_get_regs(BMI160_PMU_STATUS_ADDR, &data, 1, &bmi160dev);

    printf("power status is 0x%X\n", data);

    data = 0x11;

    rslt = bmi160_set_regs(BMI160_COMMAND_REG_ADDR, &data, 1, &bmi160dev);

    coines_delay_msec(65);

    rslt = bmi160_get_regs(BMI160_PMU_STATUS_ADDR, &data, 1, &bmi160dev);

    printf("power status is 0x%X\n", data);

     

    From the result, you can see the power mode are successfully changed after softrest. 

     

    If you still have problem using softrest, please post your source code here. 🙂

    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