Motion Module Application#389
Open
matt001k wants to merge 3 commits into
Open
Conversation
8ea2618 to
412bf83
Compare
Adds framework necessary to sample the IMU (LSM6DSV or BNO085) Adds motion sensing module application logic Adds DMA to mote SPI BSP along with correct interrupt handling on BM_INT pin.
412bf83 to
cb9b192
Compare
eb9ba9c to
a54582c
Compare
matt001k
commented
Jun 11, 2026
Comment on lines
+224
to
+226
| filt_settling_mask.drdy = PROPERTY_DISABLE; | ||
| filt_settling_mask.irq_xl = PROPERTY_DISABLE; | ||
| filt_settling_mask.irq_g = PROPERTY_DISABLE; |
Contributor
Author
There was a problem hiding this comment.
Disables any filtering the chipset might due, the IMU should be a raw pipeline and any filtering done externally (i.e. by the Stanford team for the CEC project)
matt001k
commented
Jun 11, 2026
| lsm6dsv_gy_mode_t mode; | ||
| lsm6dsv_data_rate_t rate; | ||
| } gyro; | ||
| lsm6dsv_data_rate_t sample_rate; |
Contributor
Author
There was a problem hiding this comment.
The gyro and accelerometer should be sampled at the same speed as the current streaming operation will only report data at the lowest configured frequency of the two.
matt001k
commented
Jun 11, 2026
Comment on lines
+294
to
+309
| static constexpr uint32_t data_ready_poll_ms = 50; | ||
| BmErr err = motionSensorDataReady(data_ready_poll_ms); | ||
|
|
||
| if (err == BmENODEV) { | ||
| bm_delay(data_ready_poll_ms); | ||
| continue; | ||
| } else if (err != BmOK) { | ||
| continue; | ||
| } | ||
|
|
||
| MotionSensorReading reading = {}; | ||
| while (motionSensorGet(&reading) == BmOK) { | ||
| bm_debug("imu: %" PRIu64 ",%f,%f,%f,%f,%f,%f\n", reading.ns, reading.acc.x, reading.acc.y, | ||
| reading.acc.z, reading.gyro.x, reading.gyro.y, reading.gyro.z); | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Only logic worth reviewing here. Everything else is boilerplate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed?
How does it make Bristlemouth better?
Where should reviewers focus?
Checklist