Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 174 additions & 9 deletions docs/software_requirements/timers.sdoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ UID: ZEP-SRS-4-1
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Kernel Clock
TITLE: Timer definition at compile time
STATEMENT: >>>
The Zephyr RTOS shall provide a interface for checking the current value of the real-time clock.
<<<
USER_STORY: >>>
As a Zephyr RTOS user, I want to be able to track the passed real time in the OS with a dedicated hardware counter and interrupt.
The Zephyr RTOS shall provide a mechanism to define and statically (i.e. compile time) initialize timers.
<<<
RELATIONS:
- TYPE: Parent
Expand All @@ -31,12 +28,180 @@ UID: ZEP-SRS-4-2
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Call functions in interrupt context
TITLE: Timer expiry function
STATEMENT: >>>
When initializing a timer, the Zephyr RTOS shall support setting a function that gets called when the timer expires.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-3
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer stop function
STATEMENT: >>>
When initializing a timer, the Zephyr RTOS shall support setting a function that gets called when a running timer is stopped.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-4
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer definition at run time
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to define and initialize timers at run time.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-5
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer start
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to start a timer for a specific duration and periodicity.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-6
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer stop
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to stop a running timer.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-7
STATUS: Draft
TYPE: Non-Functional
COMPONENT: Timers
TITLE: Timer status
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to read the number of times a timer has expired and then reset this number to 0.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-8
STATUS: Draft
TYPE: Non-Functional
COMPONENT: Timers
TITLE: Timer status reinitialization
STATEMENT: >>>
When a timer is initialized, started or synchronized to a thread, the Zephyr RTOS shall reset the timer number of times it has expired to 0.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-9
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer thread synchronization
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to synchronize a thread to a timer and then block the thread execution until any of the following conditions is satisfied:
- The timer is stopped
- The timer number of times it has expired is superior to 0
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-10
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer next expiration time in system ticks
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to get a timer's next expiration time in system ticks.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-11
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer remaining time until expiration in system ticks
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to get a timer's remaining time until its next expiry in system ticks.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-12
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer remaining time until expiration in milliseconds
STATEMENT: >>>
The Zephyr RTOS shall provide a mechanism to get the timer's remaining time until its next expiry in milliseconds.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-13
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer set user data
STATEMENT: >>>
The Zephyr RTOS shall support adding user defined data to a timer.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-14
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer get user data
STATEMENT: >>>
The Zephyr RTOS shall provide an interface to schedule user mode call back function triggered by a real time clock value.
The Zephyr RTOS shall support retrieving user defined data from a timer.
<<<
USER_STORY: >>>
As a Zephyr RTOS user, I want to be able to execute functions in the interrupt context and the interrupt context shall be base on a real-time counter.
RELATIONS:
- TYPE: Parent
VALUE: ZEP-SYRS-18

[REQUIREMENT]
UID: ZEP-SRS-4-15
STATUS: Draft
TYPE: Functional
COMPONENT: Timers
TITLE: Timer expire functions in interrupt context
STATEMENT: >>>
When a timer expiry function is called, the Zephyr RTOS shall do so in the interrupt context.
<<<
RELATIONS:
- TYPE: Parent
Expand Down