Bosch Sensortec Community

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

    BMX055 Magnetometer Data Ready Interrupt

    BMX055 Magnetometer Data Ready Interrupt

    BobbyTables
    New Poster

    Hello,

    I'm facing some issues with the bmx055 magnetometer data ready interrupt line. The sensor is mounted on the shuttle board. I want to establish an interrupt based data readout with an ATmega via SPI and it works just fine - but only for some time. After a certain period the magnetometer data ready interrupt just stays high. If I'm lucky than it starts working again, but will fail again, too. I can continue the data readout by polling, but I would like to avoid that solution. I also noticed that the pulse width of the interrupt signal, while working, varies greatly, but the width of the other two for accelerometer and gyroscope remains constant (all in non-latched mode). Is this a known issue or is there a workaround like a reinitialization after some time?

    Normal and advanced self-test seem to be fine, whereas I get margins of up to 50uT. Concerning the magnetometer my initialization routine (without the self-tests & trim data) does the following:

    -set power control bit(set reg 0x48 bit 0)

    -set high precision mode (reg 0x51 write 0x17, reg0x52 write0x29)

    -set to normal mode & ODR to 20Hz(reg 0x4c write 0x28)

    -enable DRDY interrupt, map to pin &active high(reg 0x4e write 0x84)

    After the initialization I do not modify any registers, only updating data and doing some further calculations. Am I missing something?

     

    Much thanks in advance and have a nice weekend!

    9 REPLIES 9

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    The problem is on your fist line. You should write value of 0x01 to register 0x4B to bring the magnetometer inside BMX055 to sleep mode from the default suspend mode after power on. But you write value of 0x01 to register 0x48 which is read-only register to show the data ready status.

    Now you should be able to see the magnetometer DRDY interrupt signal. If the problem is solved, then please click "Accept for solution" button to close this case.

    Thanks.

    Hello,

    sorry for the confusion. That is a typo in the fist line. I'm actually doing what you saying, otherwise I would not be able to read the chip ID, do the self-tests, read the data etc I guess. From the pictures you can see that the interrupt line is working for some time from the start, but with different pulse widths and at some point it just stops. It shows always the same behaviour, only the time period until stopping varies. I hope I made my problem clear. Is there a possibility that this part is broken? Everything else works just fine.

    Thanks

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Sorry for the late response.

    I tried your configurations on my BMX055 shuttle board and I can get the magnetometer DRDY interrupt signal as shown below at 20Hz when I enable data polling. If I stop polling data, then DRDY interrupt stays high all the time.

    BMM150 DRDY interrupt.jpg

    When BMX055 new magnetometer data measurement is finished, 8 bytes mag data registers will be updated. Then DRDY interrupt is generated with rising edge. When data polling of the 8 bytes data registers is finished, DRDY interrupt signal will be cleared with falling edge. 50ms later which is what you set ODR to 20Hz the DRDY signal will go high again. Then you read data registers to clear the DRDY. So the pulse width depends on how fast you read the 8 bytes data registers through SPI or I2C interface and it varies, while the total period remains constant of 50ms or 20Hz.

    If the BMX055 magnetometer DRDY interrupt signal issue still exists, then it means that BMX055 might be broken. Please try another BMX055 for testing.

    Thanks.

    Hello,

    Thanks a lot.  I will investigate whether there is a clash with my interrupt service routines. Guess I was confused, thinking the DRDY interrupt is non-latched. Thank you again for your help!

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your reply. BMX055 magnetometer DRDY signal is always non-latched. But you need to read 8 bytes data registers to clear the DRDY signal. Otherwise, it will stay high all the time.

    If the issue is resolved on your side, please click the "Accept as Solution" button.

    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