Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMA423 interrupts not working

    chris11seto
    New Poster

    BMA423 interrupts not working

    I'm attempting to use the example code in the Sensortec gitub repo to make the tap interrupt work.

    I have defined the shim functions, and have confirmed that all of the high level example code correctly returns OK. I am loading the "config file". I can read gyro XYZ fine, and the values look good. 

    No matter what I do, I cannot make the example code for the tap, double tap, no motion, or any motion interrupts actually fire. Using the exact example code from the repo doesn't work.

    Was this code ever tested? I suspect the driver is actually broken. 

    This is the exact code I am running: https://github.com/BoschSensortec/BMA423-Sensor-API/blob/master/examples/generic/wakeup_interrupt/wa...

    the return value for all function calls is `BMA4_OK`. I can see the I2C transactions occuring. The value assigned by `bma423_read_int_status` is always 0, no matter what.

     

    Thanks,

     

    4 REPLIES 4
    BSTRobin
    Community Moderator

    Re: BMA423 interrupts not working

    Hello chris11seto,

    For your SW code, change ODR to 200 Hz.
    accel_conf.odr = BMA4_OUTPUT_DATA_RATE_200HZ;

    Before you call bma423_map_interrupt() function, you could add the following code. And see whether it has interrupt signal change fromo INT1 pin when you do TAP operation.
    /* Variable to define two interrupt lines */
    uint8_t int_line = BMA4_INTR1_MAP;
    struct bma4_int_pin_config int_pin_config;
    rslt = bma4_get_int_pin_config(&int_pin_config, int_line, dev);
    int_pin_config.edge_ctrl |= BMA4_EDGE_TRIGGER;
    int_pin_config.lvl = BMA4_ACTIVE_HIGH;
    int_pin_config.od = BMA4_PUSH_PULL;
    int_pin_config.output_en = BMA4_OUTPUT_ENABLE;
    rslt = bma4_set_int_pin_config(&int_pin_config, int_line, dev);
    dev->delay(5);

    chris11seto
    New Poster

    Re: BMA423 interrupts not working

    Hi,

     

    Thank you for the reply. This is kind of my point though. I suspect that the example code from BST is outright broken. I have changed the ODR and it still doesn not work. Note that in the file below, ODR is set to 100hz, and the datasheet calls this out as too slow for the tap interrupt. Would it be possible for you to run this code and verify that it works at all on a known good platform? Thanks! 

     

    https://github.com/BoschSensortec/BMA423-Sensor-API/blob/master/examples/generic/wakeup_interrupt/wa...

    chris11seto
    New Poster

    Re: BMA423 interrupts not working

    Hi,

     

    Bumping this to follow up. I still need a solution to this issue.

    Minhwan
    Community Moderator

    Re: BMA423 interrupts not working

    Hello Chris, 

     

    First, we don't supply BMA423 anymore next year, so please consider BMA456. 

    BMA423 doesn't support tap function, but BMA456 currently supports tap functions. (Signle, double)

    https://www.bosch-sensortec.com/media/boschsensortec/downloads/application_notes_1/bst-bma456-an001-...

    What Robin said, technically our examples read interrupt status for the feature. 

    Therefore, if you want to fire physical interrupt configuration as below at the last congiruation part of example. 

    /* INT1 active high, output enable */
    int_pin_config.edge_ctrl = 0x00; // 0 = level, 1 = edge
    int_pin_config.lvl = 0x01; // 0 = active low, 1 = active high
    int_pin_config.od = 0x0; // 0 = push-pull, 1 = open drain
    int_pin_config.output_en = 0x01; // 0 = output disabled, 1 = output enabled
    int_pin_config.input_en = 0x0; // 0 = input disabled, 1 = input enabled. input used for fifo things
    // INT1 active high, pushpull, output enabled
    rslt = bma4_set_int_pin_config(&int_pin_config, 0, &bma);

    We released our examples before upload, but I checked the github source code, and quite old. 

    Please download COINES example. 

    https://www.bosch-sensortec.com/software-tools/tools/coines/

    There is motion interrupt and it should work. 

    Thanks, 

     

     

    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