aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-06-11Rename RTFM to RTICHenrik Tjäder
2020-06-11FmtEmil Fresk
2020-05-26touch src/lib.rsJorge Aparicio
2020-01-24Merge #295bors[bot]
295: docs: do not use Instant::now in #[init] r=korken89 a=japaric Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2020-01-21docs: do not use Instant::now in #[init]Jorge Aparicio
2019-11-19Merge #277bors[bot]
277: TimerQueue.dequeue: don't set SYST reload to 0 r=korken89 a=mpasternacki ARM Architecture Reference Manual says: "Setting SYST_RVR to zero has the effect of disabling the SysTick counter independently of the counter enable bit." If Monotonic's ratio is less than one, the timeout calculations can compute zero if next task is scheduled after current instant, but before next timer tick. This results in disabling SYST and freezing the timer queue. The division by ratio's denominator rounds downward and the dequeue condition is `if instant < now`. If ratio is small enough, this results in unnecessary interrupts: Let's say `instant - now` is 99 and ratio is 1/25. Then, `dur` will equal 3 and the next tick will happen at `now + 75`. In the next interrupt, `instant > now` and additional tick needs to be scheduled (which doesn't happen, because now `instant - now` is less than 25, so reload will be set to 0 and timer queue will stop). Adding one to computed duration will prevent both freezing and additional interrupts. When ratio is 1 or close, timer queue code overhead will prevent this from happening. I am working with a chip where CPU is clocked at 600MHz and SysTick is 100kHz and the freeze happens quite often. Co-authored-by: Maciej Pasternacki <maciej@3ofcoins.net>
2019-11-19TimerQueue.dequeue: don't set SYST reload to 0Maciej Pasternacki
ARM Architecture Reference Manual says: "Setting SYST_RVR to zero has the effect of disabling the SysTick counter independently of the counter enable bit." If Monotonic's ratio is less than one, the timeout calculations can compute zero if next task is scheduled after current instant, but before next timer tick. This results in disabling SYST and freezing the timer queue.
2019-11-18Fixed internal overflow on subtraiton in elapsed and durationPer Lindgren
2019-11-13Minor docs update to monotonicEmil Fresk
2019-10-15cyccnt::Instant: simplify the Send / Sync implJorge Aparicio
originally the type was made `!Send` because it loses its meaning when send from one core to another but that was an incorrect use of the `Send` bound (the send operation makes the value incorrect but that doesn't cause memory unsafety on its own). So later the type was (explicitly) made `Send` again resulting in a convoluted implementation -- this commit simplifies things.
2019-10-15document the limitations of cyccnt::{Instant,Duration}Jorge Aparicio
2019-10-15more monotonic timer docsJorge Aparicio
covers - initialization and configuration of the timer; this is now a responsibility of the application author - correctness of `Monotonic::now()` in `#[init]` - safety of `Monotonic::reset()` closes #251
2019-09-15One more place updatedEmil Fresk
2019-09-15don't use deprecated APIJorge Aparicio
2019-08-21doc tweaksJorge Aparicio
2019-08-21document #[app]Jorge Aparicio
2019-07-11change Monotonic::ratio return type to FractionJorge Aparicio
2019-06-24Monotonic trait is safe; add MultiCore traitJorge Aparicio
2019-06-18add homogeneous multi-core supportJorge Aparicio
2019-06-13rtfm-syntax refactor + heterogeneous multi-core supportJorge Aparicio
2019-05-21bump heapless dependency to v0.5.0; remove "nightly" featureJorge Aparicio
with the upcoming version of heapless we are able to initialize all internal queues in const context removing the need for late initialization this commit also removes the "nightly" feature because all the optimization provided by it are now enabled by default
2019-05-21removes the maybe_uninit feature gateJorge Aparicio
and stop newtyping `core::mem::MaybeUninit`
2019-05-01implement RFCs 147 and 155, etc.Jorge Aparicio
This commit: - Implements RFC 147: "all functions must be safe" - Implements RFC 155: "explicit Context parameter" - Implements the pending breaking change #141: reject assign syntax in `init` (which was used to initialize late resources) - Refactors code generation to make it more readable -- there are no more random identifiers in the output -- and align it with the book description of RTFM internals. - Makes the framework hard depend on `core::mem::MaybeUninit` and thus will require nightly until that API is stabilized. - Fixes a ceiling analysis bug where the priority of the system timer was not considered in the analysis. - Shrinks the size of all the internal queues by turning `AtomicUsize` indices into `AtomicU8`s. - Removes the integration with `owned_singleton`.
2019-04-16more nightly fixesJorge Aparicio
2019-04-16[NFC] fix nightly ciJorge Aparicio
2019-02-23Merge #153bors[bot]
153: add "nightly" feature; replace hint::unreachable_unchecked with a panic r=korken89 a=japaric this implements the action plan described in #149 to give you a sense of the overhead of this change: it has increased the binary size of some of our examples by up to 10% but this is mainly from pulling in a panic handler that does formatting r? @korken89 Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-02-19add Duration.as_cyclesJorge Aparicio
2019-02-19turn all potential UB into panicsJorge Aparicio
2019-02-19document the nightly featureJorge Aparicio
2019-02-19add "nightly" featureJorge Aparicio
2019-02-16cargo fmtJorge Aparicio
2019-02-16make debug builds reproducibleJorge Aparicio
2019-02-12document MSRV and SemVer policyJorge Aparicio
2019-02-11change layout of booksJorge Aparicio
2019-02-08impl Default for DurationJorge Aparicio
2019-01-09Absolute link to the book so it works on crates.ioEddy Petrișor
Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
2018-12-17note that entering / leaving a critical section is always constant timeJorge Aparicio
2018-12-16note that the timer queue is not supported on ARMv6-MJorge Aparicio
2018-12-16use edition idioms in the top crateJorge Aparicio
2018-12-16properly handle #[cfg] (conditional compilation) on resourcesJorge Aparicio
2018-12-16use the single core variant of spsc::QueueJorge Aparicio
2018-11-04impl Mutex on all shared resourcesJorge Aparicio
document how to write generic code that operates on resources
2018-11-03fix some linksJorge Aparicio
2018-11-03v0.4.0Jorge Aparicio
closes #32 closes #33
2018-08-24more fixesJorge Aparicio
2018-01-15fix documentation linkJorge Aparicio
2018-01-15v0.3.0Jorge Aparicio
2018-01-11adapt to changes in the cortex-m crateJorge Aparicio
2017-12-23add a Cargo feature, cm7-r0p1, to fix a Cortex-M7 BASEPRI erratumJorge Aparicio
2017-12-09drop the Static wrapperJorge Aparicio