applications: gesture_recognition: use BMI270 FIFO batch mode#67
Draft
applications: gesture_recognition: use BMI270 FIFO batch mode#67
Conversation
ac80e0c to
244f45e
Compare
Switch IMU sampling from per-sample timer polling to FIFO watermark streaming (sensor_stream / RTIO) when CONFIG_IMU_FIFO_BATCH is set. The SoC sleeps while the BMI270 fills its FIFO and wakes only every 33 samples at 100 Hz, reducing CPU wake-ups by ~33x. - Add IMU_FIFO_BATCH Kconfig. - imu.c: RTIO streaming thread, decoder-based Q31-to-float conversion, and ring buffer for batch handoff to main loop. Shared sensor_attr_set calls extracted to imu_configure_sensor(). - main.c: refactor sample processing into process_ready_imu_samples() to drain the ring buffer each wake; semaphore changed to K_SEM_MAX_LIMIT so no watermark events are lost. - DT overlays (LM20A, LM20B): add stream0 alias, irq-gpios, gpio1. - prj.conf (all LM20A/LM20B variants + Thingy53): enable BMI270 FIFO streaming, low-power filter mode, and RTIO dependencies. Jira: NCSDK-37898 Signed-off-by: Bartosz Meus <bartosz.meus@nordicsemi.no>
244f45e to
c720b35
Compare
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.
Switch IMU sampling from per-sample timer polling to FIFO watermark streaming (sensor_stream / RTIO) when CONFIG_IMU_FIFO_BATCH is set. The SoC sleeps while the BMI270 fills its FIFO and wakes only every 33 samples at 100 Hz, reducing CPU wake-ups by ~33x.