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.
First 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;
Solved! Go to Solution.
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.
"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.