-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
rtio: Real-Time Stream and Sensor API #17434
Conversation
All checks are passing now. Review history of this comment for details about previous failed status. |
12b77c4
to
afd0366
Compare
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.
Doesn't this new rtio API need documentation (as ZIO previously did)?
@dbkinder it does, though I'm still working out how things work, so far everyone involved has been ok with this situation while its in the topic branch not yet in master, when the PR for master happens it'll have docs |
3861443
to
30cdbee
Compare
@dbkinder I added some initial documentation this time as I think its important and you are right, I will continue to add to it as this progresses |
Alas, you've tripped on a known issue in our API documentation processing around nested unnamed unions in a struct (don't ask). You can document this as a "known issue" (and remove the reported documentation error) by adding a file to your PR
|
47d5fd4
to
d9ab09e
Compare
@dbkinder I believe everything is sorted now |
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.
Some recommended writing edits and we're good to go.
Adds a layer of sensor value decoding on top of the RTIO streaming API to provide physical measurement values in useful numerical formats and units. Signed-off-by: Tom Burdick <tom.burdick@electromatic.us>
fe3303c
to
ca0795f
Compare
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.
please update to use find_package(Zephyr)
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) |
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.
Before going in, this should be updated to find_package(Zephyr)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | |
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) |
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) |
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.
Please update to find_package(Zephyr)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | |
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) |
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) |
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.
Please update to find_package(Zephyr)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | |
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) |
If I get back to this I'll reopen, but I've personally run out of mental energy on this for the time being, and the product it was being made for is on indefinite hold at the moment |
@BFrog I'd really like to see the RTIO API moving. At a first glance it looks quite complete and well thought, so I wonder what is missing or left to do. I'm currently developing an application where I need to read data efficiently from an IMU using its FIFO, so I could help on testing and implementing at least a sensor driver. |
@gmarull at this point it needs to be rebased and all the issues fixed, there needs to be automated tests written, and probably most of all a complete working driver put in to showcase the usage. All of those things were in progress but as mentioned in a previous comment for various reasons I've paused on this. I'd be happy to continue working on it, especially if someone is looking to fund the work as it really is not something easily done on the side in my opinion. If someone else wants to take over the work is here and easily forked, I'd be happy to review and assist in understanding any of my thinking or reasoning. |
Hi all. We're in the process of finishing a Herald analysis API. One of the future sources of data will be raw sensor data on devices running Zephyr RTOS. This proposed API in this PR would match very well as a 'Source' for our analysis API. Who can I talk to about progressing this Zephyr API please? Happy to help test it out on my range of devices and sensors here. In particular we will be sourcing temperature, pulse rate/blood ox, ambient light sensors via I2C from an nRF52833. Our mid-level analysis framework (initial use - digital contact tracing exposure risk calculation for COVID-19/Ebola) can be found here for reference: https://github.com/adamfowleruk/herald-for-cpp/blob/0c6d8ba0067f2324cae8563df13834f727577a3a/herald-tests/analysisrunner-tests.cpp#L150 |
@adamfowleruk happy to discuss how we might get this moving forward again, I set it down due to a lack of time as I started other, new projects with other companies. Happy to pick it up again or help guide others as I mentioned in previous comments. I know @gmarull was also interested in seeing this move forward. |
I'd really like to see |
I'm also interested in see this things getting go again. |
+1 from here as well. |
I may have time to look at this over the next month. We now have prototype wearable hardware and so will revisit this soon. |
I'm happy to hear there's interest in this, maybe a first step on my part would be to rebase it to 2.6 and get it compiling |
@BFrog That'd be great, thanks. If you have any time I'd love to pair with you over zoom to understand what is there now. |
its building again and you can run the ramp_throughput sample, its not PR ready though and might take some time to get there still, happy to discuss on discord |
A DMA friendly Stream API for zephyr.
Provides a way to define a driver which provides an output FIFO of
blocks. Blocks are allocated from a specified block allocator. These blocks are
easily used for DMA transfers.
Some convenience functions for storing and retrieving primitive types
in the blocks is provided.
Blocks are meant to be placed into the output fifo based on a policy
describing time or number of entries since the block began being filled. If
the block is full it is meant to be immediately pushed into the FIFO.
The use case in mind is high rate sensors with hardware FIFOs and SPI
interfaces where DMA transfers from these sensors would save a great
deal of CPU time avoiding the high rate of interrupts and small SPI
transfers that would otherwise occur. Other uses are certainly possible,
I imagine audio and video have similar requirements.
For sensors an added interface to iterate over sample sets from a block is provided allowing for lazily converting sample set values into numerical values of varying types. To start only float is available but certainly the current sensor_value (int/int pair), cmsis-dsp friendly q value types, or other numerical formats could be provided.