MPU 6050 on STM32

By ulisses_lopes , 16 November 2011

Hi,

We are trying to use your driver example for MPU 6050 (Embedded MotionApps™ Source 2.0) on a stm32 µC.
We port low level call in log_stm32.c, mlos_stm32.c and / mlsl_stm32.c

Chip ref:

  • INVENSENSE

  • MPU-6050ES

  • Q68354-V1

  • EL 1111 A


Detail of our project configuration:
Define:
  • UMPL_ELIMINATE_ADVFUSION

  • UMPL

  • CONFIG_MPU_SENSORS_MPU6050A2

  • INV_FEATURE_GYROTC_UTC

  • DMPDEFAULT_UNSORTEDKEYLOOKUP

  • INV_CACHE_DMP=0

  • BIG_ENDIAN

  • UMPL_DISABLE_STORE_CAL

  • UMPL_DISABLE_LOAD_CAL

  • UMPL_REMOVE_LOGGING


Specific file build:
  • umpl/lib/accel/mpu6050.c

  • dmpDefaultMantis.c

  • mldl_cfg_init_umpl_6050a2.c

  • platform/stm32/log_stm32.c

  • platform/stm32/mlos_stm32.c

  • platform/stm32/mlsl_stm32.c


Code function call:
Initialize with:
umplInit(NULL)
umplStartMPU()

Run main loop with:
umplOnTimer()
inv_get_accel(acc)


umplInit(NULL) and umplStartMPU() return INV_SUCCESS.

We have a problem, Accel data are always 0. If we spy the I2C, it seem umplOnTimer() read register FIFO_COUNTH (adr 0x72) and there is always 0 in.
We read 0 in register FIFO_EN (adr 0x23). We try to enable FIFO by writing 0xF8 in FIFO_EN. After, umplOnTimer() was reading register FIFO_R_W (0x74) and inv_get_accel(acc) return something different of 0.
But data wasn’t correct, we didn’t 1G on one axes.


It’s normal that FIFO_EN is 0 with your driver?
Do you have any path why your driver is not running on our platform?

Sincerely
phpbb Topic ID
13941