kriswiner / MPU9250

Arduino sketches for MPU9250 9DoF with AHRS sensor fusion
1.04k stars 471 forks source link

Compile the STM code in Keil uVision5 #330

Open pmfmouta opened 6 years ago

pmfmouta commented 6 years ago

Hi! I'm trying to implement this code into an STM32f303k8 in Keil uVision 5, but it gives an error in mbed.h file. I'm tried to export the library in the mbed compiler to run in Keil uvision, but it's not working. How you do that?

Thanks

kriswiner commented 6 years ago

No idea, never used Keil uVision or the F303.

On Wed, Dec 5, 2018 at 7:20 AM pmfmouta notifications@github.com wrote:

Hi! I'm trying to implement this code into an STM32f303k8 in Keil uVision 5, but it gives an error in mbed.h file. I'm tried to export the library in the mbed compiler to run in Keil uvision, but it's not working. How you do that?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU9250/issues/330, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qu8drvJr_hEuocW68VcIAKylUk0Cks5u1-RLgaJpZM4ZC8kf .

pmfmouta commented 6 years ago

No idea, never used Keil uVision or the F303. On Wed, Dec 5, 2018 at 7:20 AM pmfmouta @.***> wrote: Hi! I'm trying to implement this code into an STM32f303k8 in Keil uVision 5, but it gives an error in mbed.h file. I'm tried to export the library in the mbed compiler to run in Keil uvision, but it's not working. How you do that? Thanks — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#330>, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qu8drvJr_hEuocW68VcIAKylUk0Cks5u1-RLgaJpZM4ZC8kf .

In the main.cpp file, regarding the integration time, in what units is the deltat?

Now = t.read_us(); deltat = (float)((Now - lastUpdate)/1000000.0f) ; lastUpdate = Now; sum += deltat; sumCount++;

kriswiner commented 6 years ago

microseconds

On Thu, Dec 6, 2018 at 6:40 AM pmfmouta notifications@github.com wrote:

No idea, never used Keil uVision or the F303. … <#m-8345973089201099897> On Wed, Dec 5, 2018 at 7:20 AM pmfmouta @.***> wrote: Hi! I'm trying to implement this code into an STM32f303k8 in Keil uVision 5, but it gives an error in mbed.h file. I'm tried to export the library in the mbed compiler to run in Keil uvision, but it's not working. How you do that? Thanks — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#330 https://github.com/kriswiner/MPU9250/issues/330>, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qu8drvJr_hEuocW68VcIAKylUk0Cks5u1-RLgaJpZM4ZC8kf .

In the main.cpp file, regarding the integration time, in what units is the deltat?

Now = t.read_us(); deltat = (float)((Now - lastUpdate)/1000000.0f) ; lastUpdate = Now; sum += deltat; sumCount++;

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU9250/issues/330#issuecomment-444892743, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qvcdzpYuCv66fjHK6B0K2_11FjCsks5u2SxegaJpZM4ZC8kf .

kriswiner commented 6 years ago

Sorry, micros/1000000. so seconds

On Thu, Dec 6, 2018 at 9:03 AM Tlera Corporation tleracorp@gmail.com wrote:

microseconds

On Thu, Dec 6, 2018 at 6:40 AM pmfmouta notifications@github.com wrote:

No idea, never used Keil uVision or the F303. … <#m_5635168510112257668m-8345973089201099897_> On Wed, Dec 5, 2018 at 7:20 AM pmfmouta @.***> wrote: Hi! I'm trying to implement this code into an STM32f303k8 in Keil uVision 5, but it gives an error in mbed.h file. I'm tried to export the library in the mbed compiler to run in Keil uvision, but it's not working. How you do that? Thanks — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#330 https://github.com/kriswiner/MPU9250/issues/330>, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qu8drvJr_hEuocW68VcIAKylUk0Cks5u1-RLgaJpZM4ZC8kf .

In the main.cpp file, regarding the integration time, in what units is the deltat?

Now = t.read_us(); deltat = (float)((Now - lastUpdate)/1000000.0f) ; lastUpdate = Now; sum += deltat; sumCount++;

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU9250/issues/330#issuecomment-444892743, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qvcdzpYuCv66fjHK6B0K2_11FjCsks5u2SxegaJpZM4ZC8kf .

rizqisubeno commented 5 years ago

i try compile on keil uVision 5 success with no problem the code all thanks kriswiner

pmfmouta commented 5 years ago

i try compile on keil uVision 5 success with no problem the code all thanks kriswiner

Could you share the Keil Project files?

kriswiner commented 5 years ago

I have none...

On Tue, Jan 15, 2019 at 5:24 AM pmfmouta notifications@github.com wrote:

i try compile on keil uVision 5 success with no problem the code all thanks kriswiner

Could you share the Keil Project files?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU9250/issues/330#issuecomment-454390579, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qu3kMHRQtJyZp6uWPcNdQcw5E0JWks5vDdaNgaJpZM4ZC8kf .

rizqisubeno commented 5 years ago

pmfouta visit my github on i2c_mpu9250_fastmode project

pmfmouta commented 5 years ago

pmfouta visit my github on i2c_mpu9250_fastmode project

After I converted your project to run on STMM32F303k8Tx, it seems that the MCU gets stuck infinitely on the loop in void I2C_Address_Search(). In this function, you try to determine the MPU address. But I already succeeded in getting values from the gyroscope and accelerometer and the address is:

#define MPU9250_I2C_ADDR 0x68 << 1 I tried to define the mpuAddress as the one above, but with no success. There is another way?

Thanks 👍

rizqisubeno commented 5 years ago

i think maybe you manual to define address or search the adress manually using HAL_I2C_isDeviceReady