This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problems when using Mpu925x sereis with nrf52840(Keil C,sdk15.3.0)

Hi ,I'm now using the nrf52840-dk(SDK 15.3.0, Keil C)  testing the mpu925X series data, but I am using the sample based on sdk14.2.0,their our lots of errors when buiding the project(like loose "nrf_gpio.h".etc) I see the migration page but still don't know the main method, can every teach me how to migration, or use others libraries(like EH-HAL,but don't know how to implement), or just use the i2c and register data of mpu925x to get the data

Parents Reply Children
  • OK.

    So remember that the Mpu925x neither knows nor cares what microcontroller you use - let alone whether you use an SDK, or what version it is.

    Separate-out the parts that are specific to the SDK from the parts that are to do with the Mpu925x .

    Provide a "clean" interface which is independent of SDK version - with functions like send_byte()  and read_byte().

    Then you will be able to incorporate  your Mpu925x code into any SDK - or, in fact, onto any other microcontroller.

    This is the basis of good, modular, portable software design!

  • Invensense has already done this with the drivers they've made for the MPU925x, called Embedded MotionDriver 6.12. Just swap out the read and write implementations with applicable nRF SDK TWI/SPI driver calls.

    Also note from TDK Invensense: 

    "Note: The MPU9250 is Not Recommended for New Designs"
    You should really consider using their newer series of MPUs as they consider this a legacy product. 

Related