Bosch Sensortec Community

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

    BMA400 Generic interrupt set-up

    BMA400 Generic interrupt set-up

    NanaVuku
    Member

    Hello,

    I just got a BMA400 to check its abilities inhouse. But regardless how many times i'd tried I could not make generic interrupts work.

    Flowchart from the datasheet pg15Flowchart from the datasheet pg15First i tried the "inactivity interrupt" flow from the datasheet(pg15)

    Then i tried the  "koziymf"s answered question here  but with output_lvl_high setting (both latched and non-latched)

    But both with no luck. Regardless of interrupt latched | non-latched, the int1 pin goes high when i set the interrupt and never releases again. I tried reading status register (with and without latched setting-just to check out) to clear the flag bu nothing happens.

    I don't have a main board to connect and configure from desktop app. I'm working with a custom card connected to a STM32F4 (I double-checked the registers that i configured them according the flow on both cases)

     

     

    EDIT: I'm still testing the issue and i got a new info;

    • First readings are after power-up;
      1. Status register : 0x10
      2. Error register: 0x00
      3. Event register: 0x01
      4. Int_stat0_reg: 0x00
      5. Int_stat1_reg: 0x00
      6. Int_stat2_reg: 0x00
    • Second readins are after soft reset;
      1. Status register :0x10
      2. Error register: 0x00
      3. Event register: 0x01
      4. Int_stat0_reg: 0x00
      5. Int_stat1_reg: 0x00
      6. Int_stat2_reg: 0x00
    • Third readings are after interrupt configuration/set routine(which by the way returns with success with each register write)
      1. ACC_CONFIG0: 0x02
      2. Status register : 0x94
      3. Event register: 0x00
      4. Int_stat0_reg: 0x00
      5. Int_stat1_reg: 0x00
      6. Int_stat2_reg: 0x00
    2 REPLIES 2

    Minhwan
    Community Moderator
    Community Moderator

    Hello, 

     

    There is two possibilities why you didn't get interrupt. 

    1) Didn't set normal mode before interrupt guide

    2) Didn't connect to INT pin to your MCU. 

     

    I tested based on Arduino, and got an interrupt properly.  

    This inerrupt can get when your sensor is stopped after moving. 

    Thanks, 

     

    "1) Didn't set normal mode before interrupt guide"

    No, i double checked that situation. Device is in normal mode when i'm starting the process.

    "2) Didn't connect to INT pin to your MCU. "

    Int pin is connected to MCU, because i receive first interrupt right after i set it(I can confirm it with the MCU EXTI callback function and an oscilloscope)

    The main problem is the interrupt does not go away or resets whether latched/non-latched (does not matter how many times i read status reg). The INT1 pin state is  lvl_High always.

    The interesting part is INT2 pin is high also and i didn't even configure it?!

    After your post i tried with your sequence again and checked if the register values are correct (as i programmed) and everything seems just fine. Still interrupt fires while configuration and never goes back to lvl_Low.

     

    Edit1:And i don't think it makes a difference but i'm working with Accel5Click board, not a custom designed one or Bosch's shuttle board.

    The communication is I2C btw.

    Edit2: Wierd thing happened after i found out INT2 is also lvl_HIGH. Interrupt generates from there. When i shake the board or tap the desk, i can see the int2_pin goes low and then high again. I guess the interrupt pins are labeled wrong on the board?

    Edit3: I controlled the interrupt pins and confirm that they are cross labelled, therefore you are right "I did not connect the right interrupt pin to my MCU". Thanks for your time.

    Thanks

    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