HAL Library 30- MPU6050 for STM32Fxxx

After MPU6050 library for STM32F4xx series only based on STM32F4xx Standard peripheral drivers, I’ve redesign this library for HAL support over all STM32 series. It has some more features then my first library. It can now read data from MPU6050 (obvious), set interrupts for data ready and motion detection, read interrupts status, set custom data rate for data ready interrupt and set new gyro and accelerometer sensitivities on the fly. More about lib is describe below and on HAL API site.

Library

Read more about HAL libraries

Features

  • Operates with MPU6050 6-axes accelerometer and gyroscope using I2C communication
  • Sets custom sensitivites on the fly
  • Enables/disables data ready and motion detected interrupts
  • Sets custom data rate
  • Up to 2 MPU devices at a time supported with different AD0 pins

Dependencies

  • HAL
  • TM
    • STM32Fxxx HAL
    • defines.h configuration file
    • TM I2C
    • TM GPIO

Pinout, functions and enumerations

Pinout, list of functions and its enumerations can be found on MPU6050 library API.

Example

DAC example is available on my Github HAL repository with included hex files for all available boards. There are 3 different examples.

Download all libraries below.

Icon
TM STM32 Libraries

STM32 libraries based on STM32Fxxx HAL drivers.

 

tilz0R

Owner of this site. Also electronic enthusiasts, web developer, 3D printer fan, handball player and more. Big fan of STM32F4 devices. In anticipation of the new Discovery board for STM32F7 lines.

You may also like...

Read before commenting!

Before you make a new comment, make sure you agree with things listed below:

  • - Read post to make sure if it is already posted what you are asking for,
  • - Make sure you have the latest version of libraries used in your project,
  • - Make a clean and grammatically correct written message,
  • - Report as many details as possible, including what have you done so far,
  • - Do NOT post any code here. Use Pastebin,
  • - Do NOT post any error codes here. Use Pastebin,
  • - Specify STM32Fxxx family and used Discovery/EVAL/Nucleo or custom made board,
  • - Make sure your clock is set correct for PLL,
  • - If you are using my HAL drivers, please check this post how to start.
Comment will be deleted on breaking these rules without notification!