Project demonstrating motion-triggered wakeup from STOP mode using the MPU6050 and STM32F401RE.
This STM32 board has STOP modes
- Main Regulator ON (stable, fast wake)
- Low-Power Regulator ON (reduced current)
This particular program functions on the Low Power Regulator ON. It can be switched to Main Regulator ON by changing the EnterSTOPMode function.
| MPU6050 | STM32F401RE |
|---|---|
| SDA | PB9 |
| SCL | PB8 |
| INT | PA0 (EXTI0) |
| VCC/GND | 3.3V / GND |
UART2 (PA2/PA3) @ 115200 baud.
- Motion detection via MPU6050 (MOT_THR + MOT_DUR)
- EXTI0 interrupt wake from STOP mode
- ACC/GYRO read after wake
- Simple HAL-based implementation
Core/ Drivers/ mpu6050.c mpu6050.h imu_motion_stopmode.ioc
-
Configure MPU6050 motion interrupt
-
Enter STOP mode
-
Motion → INT pin → EXTI0 wakeup
-
Restore clock and read ACC/GYRO
-
Go back to STOP mode