ports/stm32/board/MPY_v11: Add new board MPY_v11 and acceleration IC. #16407
+370
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This Pull Request aims to add support for the MPY_v11 board, which integrates a new acceleration sensor. To fully support the
acceleration functionality of this board, this PR depends on an internal pyb Accel module:. This module will be compiled as a MicroPython user module to provide the necessary interfaces and driver code for controlling the acceleration within the MicroPython environment.
Compilation Instructions
To compile the new board with the new acceleration, please follow these steps:
1.Clone the MicroPython repository and change dir to port/stm32.
2.Choose the BOARD=MPY_v11. Such as compile cmd is "make BOARD=MPY_v11".
Testing
I have tested the new board definition on the MPY_v11 hardware with the new acceleration sensor(LIS2DH12TR). The tests included compiling the MicroPython firmware, deploying it to the actual board, and verifying basic operations, including initialization, read x/y/z aixes value, and data processing. The results indicate that the acceleration sensor works properly and is compatible with the MicroPython firmware.
Trade-offs and Alternatives
The main trade-off is the maintenance overhead associated with supporting an additional board and external module, which is offset by the additional functionality and hardware support they provide.