F439_CPP_MPL3115A2_Project_01 1.0
STM32F439 MPL3115A2 pressure and temperature tutorial
Loading...
Searching...
No Matches
MPL3115A2 Driver Subsystem

The MPL3115A2 driver is the custom sensor layer used by this tutorial. It hides the raw I2C register transactions from the application and returns pressure and temperature values in units that are easier to display.

Driver Responsibilities

  • Store the STM32 HAL I2C handle used by the sensor
  • Wait for the MPL3115A2 to respond on the I2C bus
  • Verify the WHO_AM_I register value
  • Configure pressure and temperature data-ready events
  • Enable active barometer mode with OSR=128
  • Read raw pressure and temperature registers
  • Convert pressure to inches of mercury
  • Convert temperature to degrees Celsius

Driver Boundaries

The driver does not own the I2C peripheral setup. I2C1 is initialized by the CubeMX-generated application code before MPL31152A_Init() is called.

Additional Documentation