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

defining MPU in SES insted of Keil - Target options

Hello,

I have two quastions

(1)

     I am trying to run nrf5-mpu-simple written by , but there are just Keil's examples on Github and I am working in SES. There is written : Define your MPU in Keil's "Target Options -> C/C++". Use define "MPU9255", "MPU9150", or "MPU60x0". But how can I do the same thing in SES? I tried define it as is shown in attached printscreen, but it had error saying : "too many filenames given. Type cc1 --help for sage". So how can I do this right?

(2)

Also planning to migrate to SDK15.2 with these drivers, so the question is, what changes should I do? I read on infocenter that the drivers changed a bit, so I think it will be necesary to overwrite the nrf_mpu_twi driver where the old TWI API is used and also GPIO library for interrupts (not using yet, but planning). And what should be changed in config.h when migrating to SDK15.2?

using SDK 14.2, https://github.com/Martinsbl/nrf5-mpu-examples , nRF52832 with SES and MPU6050

thank you

Parents
  • No, you don't write #define on the command line like that!

    The place to do it is in the Preprocessor defines.

    https://wiki.segger.com/Embedded_Studio_Code_Options#Preprocessor

    Have you tried contacting the Author via Github ?

    When changing SDK, it's often simpler to just start with a fresh, clean project for that SDK, and merge-in your specific application stuff ...

  • Thank you for your answer. It compiled, but crashed on some error in hardfault handler. Anyway, I wanted run this example just to demonstrate myself if it works and see basics of how it works. I really want to move to sdk15.2 and run mpu6050 with driver provided by Nordic which is placed in sdk. I understand basically how it works, but I have one question. I just want read gyro data from register and do some basic setup but I don't understand how to write values to registers. For example , here in attached screen shot from mpu register map, there is register 26 (decimal) and there are numbers you can write the numbers to make required setup. Please, can you guide me a bit, how to do this with mpu6050 driver provided in sdk15.2 using function "bool mpu6050_register_write(uint8_t register_address, const uint8_t value)

    Thanks a lot

Reply
  • Thank you for your answer. It compiled, but crashed on some error in hardfault handler. Anyway, I wanted run this example just to demonstrate myself if it works and see basics of how it works. I really want to move to sdk15.2 and run mpu6050 with driver provided by Nordic which is placed in sdk. I understand basically how it works, but I have one question. I just want read gyro data from register and do some basic setup but I don't understand how to write values to registers. For example , here in attached screen shot from mpu register map, there is register 26 (decimal) and there are numbers you can write the numbers to make required setup. Please, can you guide me a bit, how to do this with mpu6050 driver provided in sdk15.2 using function "bool mpu6050_register_write(uint8_t register_address, const uint8_t value)

    Thanks a lot

Children
Related