-
Notifications
You must be signed in to change notification settings - Fork 0
Add IMU driver and integrate with main application #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit introduces the ICM-20689 IMU driver, including SPI configuration and DMA support for high-speed data transfer. The main application is updated to initialize and run the IMU alongside the USB system and echo application, allowing for concurrent data acquisition. Additionally, the USB system is refactored to improve peripheral management and buffer handling.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds ICM-20689 IMU driver support to the NUSense platform, implementing SPI communication with DMA transfers for high-speed 1000Hz data acquisition. The IMU driver is integrated alongside the existing USB system for concurrent operation.
Key changes:
- Added comprehensive ICM-20689 IMU driver with SPI/DMA support and interrupt-driven FIFO reading
- Refactored USB system to use peripheral collection structs and macros for better resource management
- Integrated IMU task to run concurrently with USB and echo applications
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/peripherals/usb_system.rs | Refactored to use UsbPeripherals struct and claim_usb! macro for peripheral management |
| src/peripherals/spi.rs | New SPI peripheral abstraction with DMA support for IMU communication |
| src/peripherals/mod.rs | Added SPI module and removed USB re-exports |
| src/main.rs | Integrated IMU initialization and concurrent task execution |
| src/drivers/mod.rs | New drivers module for hardware device drivers |
| src/drivers/imu/mod.rs | IMU driver module structure |
| src/drivers/imu/driver.rs | Complete ICM-20689 driver implementation with register configuration and data processing |
| src/apps/echo_app.rs | Updated import paths for USB constants |
| Cargo.toml | Disabled test harness for binary target |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit introduces the ICM-20689 IMU driver, including SPI configuration and DMA support for high-speed data transfer.
The main application is updated to initialize and run the IMU alongside the USB system and echo application, allowing for concurrent data acquisition.
Additionally, the USB system is refactored to improve peripheral management and buffer handling.