-
Notifications
You must be signed in to change notification settings - Fork 1
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
Expose channel monitoring and telemetry as RTIC tasks #32
Conversation
|
I've updated this to use the RTIC CYCCNT. We can replace the scheduler with our own monotonic in the future, such as something from embedded-time. I dislike the current implementation because it relies on a hard-coded constant CPU clock and doesn't allow the device to enter low power states when the clock is not in use. I've also updated this branch to use an alpha release of |
|
||
[dependencies.stm32f4xx-hal] | ||
version = "0.8.3" |
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.
Using our own fork beause I've made a number of ADC and I2C related patches that are required for our operation. Most are merged in to the stm32f4xx-hal mainline, but there's some that aren't quite there yet.
This PR closes #5 by exposing the channel management interface as two RTIC tasks. Namely, there is a telemetry task and a monitor task.
The monitor task runs at 50Hz and detects errors/warnings/enabled state of the channel to propagate the user interface LEDs.
The telemetry task runs at 2Hz to report detailed channel measurements over a telemetry interface for reporting.
Currently, the scheduling is accomplished using hardware timers. We could go for RTIC monotonic implementation to use a single timer resource in the future, but I figured it was fine to use the timer interrupts for now.