F439_CPP_MPL3115A2_Project_01 1.0
STM32F439 MPL3115A2 pressure and temperature tutorial
Loading...
Searching...
No Matches
Firmware Architecture Overview

The project has a simple layered structure:

Application Layer main.c

  • initializes HAL, clocks, GPIO, I2C1, and USART1
  • initializes the MPL3115A2 driver
  • polls data-ready status bits
  • prints converted temperature and pressure values

MPL3115A2 Driver Layer MPL3115A2/mpl3115a2.c MPL3115A2/mpl3115a2.h

  • owns MPL3115A2 register definitions
  • stores the active I2C handle and device address
  • verifies WHO_AM_I
  • configures pressure/temperature data-ready events
  • reads and converts pressure and temperature samples

STM32 HAL / CubeMX Layer Core/Src/main.c Core/Inc/main.h

  • provides generated peripheral initialization
  • provides HAL I2C, UART, GPIO, timer, and clock services