Commit Graph

14 Commits (276ef91bb6bb2a19eb1d0250aa8ad29fa93fe25e)

Author SHA1 Message Date
Russ Butler f6ed7cee41 Optimize tickless interrupt latency
Remove unnecessary critical sections from the SysTimer code since
the access should already be serialized.
2019-02-23 17:44:51 -06:00
Russ Butler d43ca21ec5 Optimize tickless tick computation
Optimize the tick computation in the following ways:
1. Use relative time rather than absolute time
2. Replace multiplication/division pair with just multiplication
    or division:
    "* 1000000ULL / OS_TICK_FREQ"   ->   "* US_IN_TICK"
    "* OS_TICK_FREQ / 1000000"      ->   "/ US_IN_TICK"
2019-02-23 17:44:29 -06:00
Martin Kojtal e80f2ff18a rtos cortex: fix astyle 2018-10-25 09:58:18 +01:00
Russ Butler 5d0aac53bb Move Code to get Cortex A tick irqn
Move the function "mbed_get_a9_tick_irqn()" declared in os_tick.h
to SysTimer.h so it does not get overridden when RTX is updated.

This function was originally added in:
3d3e89097d
Fixes for RZ_A1H issue 6543
2018-08-25 20:40:17 -05:00
Russ Butler 05d33b068d Remove unnecessary low power ticker rescheduling
Schedule the next OS tick inside of the ticker interrupt rather than
in the systick interrupt. Scheduling this while the ticker is
dispatching prevents an unnecissary rescheduling since this
rescheduling is done anyway when dispatching is finished.

This is particularly useful for the low power ticker on devices with
LPTICKER_DELAY_TICKS set to a non-zero value. This is because the low
power ticker cannot be reschduled immediately and needs to fall back
onto the microsecond ticker which temporarily locks deep sleep.

Note - the optimization in this commit is made possible by the commit:
"Don't reschedule ticker while dispatching"
2018-07-25 23:24:12 -05:00
Michael Coulter 3d3e89097d Fixes for RZ_A1H issue 6543
Removed debugging code, fixed errors indicated in the comments.
2018-06-11 13:30:17 -05:00
Cruz Monrreal f92c227558
Merge pull request #7027 from c1728p9/timer_fix
Fix possible bug with SysTimer
2018-05-31 11:07:34 -05:00
Russ Butler aa6b931698 Fix possible bug with SysTimer
Ensure the SysTimer isn't added to the timer list twice by adding
an extra call to remove() inside suspend().
2018-05-27 13:15:00 -05:00
Bartek Szatkowski a92ff94904 Fix rebase error 2018-05-25 12:20:10 -05:00
Filip Jagodzinski 20013d75d6 RTOS: SysTimer: Update tests
Use a mock ticker object instead of the lp_ticker for update_tick() and get_time() tests.
2018-04-13 10:07:00 +02:00
Russ Butler 953bbeb7de Update idle loop to reduce calls to suspend
Change tickless handling to use public RTX calls and to prevent
unnecessary calls to suspend/resume by looping until the kernel
needs to be resumed.
2018-04-04 09:17:05 -05:00
Filip Jagodzinski d83ed63a31 RTOS: SysTimer: Fix update_tick 2018-02-28 14:37:13 +01:00
Filip Jagodzinski d098cd6757 RTOS: SysTimer: Split methods for testing 2018-02-28 14:37:12 +01:00
Filip Jagodzinski 1054277c65 RTOS: SysTimer: Extract RtosTimer as SysTimer
RtosTimer class introduced with tickless support in #4991 had to be
renamed because that name was already present in rtos namespace.
2018-02-28 14:37:12 +01:00