Bosch Sensortec Community

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

    BMA400 Auto low-power and auto wake-up

    BMA400 Auto low-power and auto wake-up

    NanaVuku
    Member

    Hello, 

    I've been working on BMA400 (on accel 5 click board) for some time and been able to map each generic interrupt to the both pins. 

    Now I'm working on automating things as discussed here,  and configured the BMA400 based on the document as mod FAE_CA1  shared in Auto low power and auto wake up .

    But somehow the wake-up sequence does not fire, and i cannot see the hardware interrupt (at the oscilloscope) as shown in the document.

    Here is my configuration pseudo-code, 

     

    write 0x02 => 0x19 (ACC_CONFIG0.power_mode.b10) // NORMAL MODE
    
    write 0x04 => 0x1F (INT_CONFIG0.gen1_int_en) // GEN1 INTERRUPT ENABLE
    
    write 0x80 => 0x20 (INT_CONFIG1.latch_int.b1) // INTERRUPT LATCHED
    
    write 0x02 => 0x24 (INT12_IO_CTRL.int1_lvl.b1) // INT1 LEVEL HIGH
    
    write 0x02 => 0x2D (AUTOWAKEUP_1.wkup_int.b1) // WKUP INT ENABLE
    
    write 0x01 => 0x21 (INT1_MAP.wkup_int1.b1) // WKUP INT MAPPED TO INT1
    
    write 0xE6 => 0x2F (WKUP_INT_CONFIG0.wkup_z/y/x_en.b1, .num_of_samples.b001, .wkup_refu.b10)
    
    // X/Y/Z ENABLE, NUM OF SAMPLES 2, WAKEUP REFERENCE EVERYTIME, HYSTERESIS NONE
    
    write 0x03 => 0x30 (WKUP_INT_CONFIG1.int_wkup_thres.b00000011) // WKUP INTERRUPT THRESHOLD = 3
    
    write 0x02 => 0x2B (AUTOLOWPOW_1.gen1_int.b1) // GEN1 INTERRUPT TRIGGER AUTO LOW POWER
    
    write 0xF8 => 0x3F (GEN1INT_CONFIG0.gen1_act_z/y/x_en.b1, .gen1_data_src.b1, gen1_act_refu.b10, gen1_act_hyst.b00)
    
    // X/Y/Z ENABLE, DATA SOURCE FILT2, REF UP EVERYTIME, HYSTERESIS NONE
    
    write 0x01 => 0x40 (GEN1INT_CONFIG1.gen1_criterion_sel.b0, .gen1_comb_sel.b1) // CRITERION INACTIVITY, COMBINATION AND
    
    write 0x02 => 0x41 (GEN1INT_CONFIG2.gen1_int_thres.b00000010) // GEN1 INTERRUPT THRESHOLD 2 
    
    write 0x00 => 0x42 (GEN1INT_CONFIG3.gen1_int_dur_15_8.b00000000) // GEN1 INTERRUPT DURATION HIGH 0
    
    write 0x64 => 0x43 (GEN1INT_CONFIG31.gen1_int_dur_7_0.b01100100) // GEN1 INTERRUPT DURATION LOW 100

     

     

    Any help is appreciated.

    Thanks

    NANA

     

    4 REPLIES 4

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    I tried your pseudo code on my eval. board and I can see the pulse on INT1 pin when I tap the board to trigger the wakeup interrupt. BMA400 automatically switches from low power mode at 25Hz ODR to normal mode at 200Hz ODR. After a short while stationary BMA400 automatically switches back to low power mode. If you write value of 0x04 to register 0x22 to map Gen1 interrupt to INT2 pin, then you should see the falling edge on INT2 pin as shown in the attached picture because INT2 pin is set to active-low in your pseudo code below.

    Thanks.

    Oh I see.

    I saw the spikes as shown as well but I was trying to configure as the document image shows;Screenshot from 2020-10-16 09-25-46.png

    I mean wakeup interrupt(INT1 pin) being High as long as a motion exist and after motion stops this high lvl still hangs ~t seconds (1 seconds based on the configuration) and drops low.

    Where should i make changes to get the shown image?

    Thanks in advance

    Nana

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    The image shows BMA400 data and interrupt signal by continuously reading data registers and interrupt status registers. Reading interrupt status registers will clear the interrupt signal. So when you see wakeup interrupt you can read register 0x0E. Then the interrupt signal will go low immediately.

    Thanks.

    Hello,

    There is the problem actually. Does not matter if i configure latched or non-latched interrupt. The wake-up interrupt i get is like the spikes in your attachment. So there is no stable state for the given amount of time, just spike up or down and interrupt goes-off.

    I guess i didn't express myself clearly enough. So my aim is;

    • Configure auto low-power and auto wake-up
    write 0x02 => 0x19 (ACC_CONFIG0.power_mode.b10) // NORMAL MODE
    
    write 0x04 => 0x1F (INT_CONFIG0.gen1_int_en) // GEN1 INTERRUPT ENABLE
    
    write 0x02 => 0x2D (AUTOWAKEUP_1.wkup_int.b1) // WKUP INT ENABLE
    
    write 0x01 => 0x21 (INT1_MAP.wkup_int1.b1) // WKUP INT MAPPED TO INT1
    
    
    write 0x02 => 0x2B (AUTOLOWPOW_1.gen1_int.b1) // GEN1 INTERRUPT TRIGGER AUTO LOW POWER
    • When the sensor is in steady state(as in no motion present and in low power mode) I'd like to have low on INT1(WAKEUP1) pin
    • When there is motion present, I'd like to have high level following a rising edge on INT1(WAKEUP1) pin
    write 0x80 => 0x20 (INT_CONFIG1.latch_int.b1) // INTERRUPT LATCHED
    
    write 0x02 => 0x24 (INT12_IO_CTRL.int1_lvl.b1) // INT1 LEVEL HIGH
    • When the motion stops, I'd like to have high level on INT1 pin to go on desired amount of time
    write 0x00 => 0x42 (GEN1INT_CONFIG3.gen1_int_dur_15_8.b00000000) // GEN1 INTERRUPT DURATION HIGH 0
    
    write 0x64 => 0x43 (GEN1INT_CONFIG31.gen1_int_dur_7_0.b01100100) // GEN1 INTERRUPT DURATION LOW 100

     

     At least that is what i thought my configuration (the document referring to) is doing.

    If I cannot (as it is not possible) program the sensor to work this way, I'll have to make it work in normal mode all the time, because I'd achieved that configuration without any problems. But what i understand from the documents and forum discussions it could be done.

    Are there any onther application notes you can direct me maybe? Because I cannot see where the problem is stuck in this state.

    Thanks in advance.

    Nana

    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