I'm using a BMX0155 sensor connected to a STM32 thanks a SPI Bus.
I've already implemented High-G interrupt for the accelerometer (IT is genererated when Accel X value is > 0.150g) and it works perfectly.
After this implementation i tried to do the same thing for the gyroscope but without succes, here is some code :
(a) Gyroscope register values :
(b) Gyroscope Interrupt register values :
So first, I configure the right port the same way as i configured accelerometer IT port
Then, I set GYRO registers with values of picture (a).
Then I set IT GYRO registers with values of picture (b).
finally i enable the right IT (high_en_z (bit 0) of 0x26 register is set)
The fact is that the interrupt is generated (high_int (GYR 0x09) status flag is set and high_first_z (GYR 0x0C) is set too)...
... but i can't catch this IT with the STM32.
Did i miss something with IT gyro configuration ?
Solved! Go to Solution.
Thanks for your anwser.
I've checked with the oscilloscope and an IT is generated but the problem comes from the STM32 that doesn't catch it.
I' ve another problem, in latched mode, status flags are reset whereas i do not set reset_int bit... any idea ?
PS : i've tried to map accel IT to INT1 and INT2 and both are ok.
[EDIT] : It seems that gyro electrical behavior register init value (0x0F) is not the same as the accelometer (0x05). Switching STM32 pin to pull down mode has fixed my problem.