Structure:
mpu-tests
contains the tests themselves.unit-test-app
is the project to flash and run the tests. Command:make flash monitor
. Works the same as the default unit-test-app from esp-idf.
There is a test configuration menu [MPU test config] in menuconfig -> component config, to setup the connection pins, speed, etc.
Note:
Before trying to build the unit-test-app, add the I2Cbus/SPIbus library path to EXTRA_COMPONENT_DIRS
in the unit-test-app/Makefile.
The mpu tests also work with the default unit-test-app from esp-idf. If you 'unit-test' from there, do not forget to add the MPU component path as well as MPU/test/mpu-tests directory to EXTRA_COMPONENT_DIRS
in the Makefile. (and the above dependencies).
See Unit Testing in ESP32 for more information.
Current tests:
- basic test
- sample rate measurement
- max sample rate test
- low power accelerometer mode
- interrupt configuration
- basic auxiliary I2C configuration
- slave 4 transfers
- external frame synchronization (FSYNC pin)
- sensor data test
- standby mode
- FIFO buffer
- offset test
- self-test check
- motion detection and wake-on-motion mode
- free-fall detection
- zero-motion detection
- compass configuration