Lines Matching full:timer
42 * @defgroup nrf_timer_hal TIMER HAL
45 * @brief Hardware access layer for managing the TIMER peripheral.
52 #define TIMER_MAX_SIZE(id) NRFX_CONCAT_3(TIMER, id, _MAX_SIZE)
85 * in a given timer instance.
87 #define NRF_TIMER_CC_CHANNEL_COUNT(id) NRFX_CONCAT_3(TIMER, id, _CC_NUM)
90 * @brief Timer tasks.
95 …TIMER_TASK_START = offsetof(NRF_TIMER_Type, TASKS_START), ///< Task for starting the timer.
96 …TIMER_TASK_STOP = offsetof(NRF_TIMER_Type, TASKS_STOP), ///< Task for stopping the timer.
97 …offsetof(NRF_TIMER_Type, TASKS_COUNT), ///< Task for incrementing the timer (in counter mode).
98 …ASK_CLEAR = offsetof(NRF_TIMER_Type, TASKS_CLEAR), ///< Task for resetting the timer value.
99 …R_TASK_SHUTDOWN = offsetof(NRF_TIMER_Type, TASKS_SHUTDOWN), ///< Task for powering off the timer.
100 …= offsetof(NRF_TIMER_Type, TASKS_CAPTURE[0]), ///< Task for capturing the timer value on channel 0.
101 …= offsetof(NRF_TIMER_Type, TASKS_CAPTURE[1]), ///< Task for capturing the timer value on channel 1.
102 …= offsetof(NRF_TIMER_Type, TASKS_CAPTURE[2]), ///< Task for capturing the timer value on channel 2.
103 …= offsetof(NRF_TIMER_Type, TASKS_CAPTURE[3]), ///< Task for capturing the timer value on channel 3.
105 …= offsetof(NRF_TIMER_Type, TASKS_CAPTURE[4]), ///< Task for capturing the timer value on channel 4.
108 …= offsetof(NRF_TIMER_Type, TASKS_CAPTURE[5]), ///< Task for capturing the timer value on channel 5.
114 * @brief Timer events.
133 * @brief Types of timer shortcuts.
137 …P_MASK = TIMER_SHORTS_COMPARE0_STOP_Msk, ///< Shortcut for stopping the timer based on compare 0.
138 …P_MASK = TIMER_SHORTS_COMPARE1_STOP_Msk, ///< Shortcut for stopping the timer based on compare 1.
139 …P_MASK = TIMER_SHORTS_COMPARE2_STOP_Msk, ///< Shortcut for stopping the timer based on compare 2.
140 …P_MASK = TIMER_SHORTS_COMPARE3_STOP_Msk, ///< Shortcut for stopping the timer based on compare 3.
142 …P_MASK = TIMER_SHORTS_COMPARE4_STOP_Msk, ///< Shortcut for stopping the timer based on compare 4.
145 …P_MASK = TIMER_SHORTS_COMPARE5_STOP_Msk, ///< Shortcut for stopping the timer based on compare 5.
147 …AR_MASK = TIMER_SHORTS_COMPARE0_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 0.
148 …AR_MASK = TIMER_SHORTS_COMPARE1_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 1.
149 …AR_MASK = TIMER_SHORTS_COMPARE2_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 2.
150 …AR_MASK = TIMER_SHORTS_COMPARE3_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 3.
152 …AR_MASK = TIMER_SHORTS_COMPARE4_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 4.
155 …AR_MASK = TIMER_SHORTS_COMPARE5_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 5.
160 * @brief Timer modes.
164 NRF_TIMER_MODE_TIMER = TIMER_MODE_MODE_Timer, ///< Timer mode: timer.
165 NRF_TIMER_MODE_COUNTER = TIMER_MODE_MODE_Counter, ///< Timer mode: counter.
167 …NRF_TIMER_MODE_LOW_POWER_COUNTER = TIMER_MODE_MODE_LowPowerCounter, ///< Timer mode: low-power cou…
172 * @brief Timer bit width.
176 NRF_TIMER_BIT_WIDTH_8 = TIMER_BITMODE_BITMODE_08Bit, ///< Timer bit width 8 bit.
177 NRF_TIMER_BIT_WIDTH_16 = TIMER_BITMODE_BITMODE_16Bit, ///< Timer bit width 16 bit.
178 NRF_TIMER_BIT_WIDTH_24 = TIMER_BITMODE_BITMODE_24Bit, ///< Timer bit width 24 bit.
179 NRF_TIMER_BIT_WIDTH_32 = TIMER_BITMODE_BITMODE_32Bit ///< Timer bit width 32 bit.
183 * @brief Timer prescalers.
187 NRF_TIMER_FREQ_16MHz = 0, ///< Timer frequency 16 MHz.
188 NRF_TIMER_FREQ_8MHz, ///< Timer frequency 8 MHz.
189 NRF_TIMER_FREQ_4MHz, ///< Timer frequency 4 MHz.
190 NRF_TIMER_FREQ_2MHz, ///< Timer frequency 2 MHz.
191 NRF_TIMER_FREQ_1MHz, ///< Timer frequency 1 MHz.
192 NRF_TIMER_FREQ_500kHz, ///< Timer frequency 500 kHz.
193 NRF_TIMER_FREQ_250kHz, ///< Timer frequency 250 kHz.
194 NRF_TIMER_FREQ_125kHz, ///< Timer frequency 125 kHz.
195 NRF_TIMER_FREQ_62500Hz, ///< Timer frequency 62500 Hz.
196 NRF_TIMER_FREQ_31250Hz ///< Timer frequency 31250 Hz.
200 * @brief Timer capture/compare channels.
204 NRF_TIMER_CC_CHANNEL0 = 0, ///< Timer capture/compare channel 0.
205 NRF_TIMER_CC_CHANNEL1, ///< Timer capture/compare channel 1.
206 NRF_TIMER_CC_CHANNEL2, ///< Timer capture/compare channel 2.
207 NRF_TIMER_CC_CHANNEL3, ///< Timer capture/compare channel 3.
209 NRF_TIMER_CC_CHANNEL4, ///< Timer capture/compare channel 4.
212 NRF_TIMER_CC_CHANNEL5, ///< Timer capture/compare channel 5.
217 * @brief Timer interrupts.
221 …NRF_TIMER_INT_COMPARE0_MASK = TIMER_INTENSET_COMPARE0_Msk, ///< Timer interrupt from compare event…
222 …NRF_TIMER_INT_COMPARE1_MASK = TIMER_INTENSET_COMPARE1_Msk, ///< Timer interrupt from compare event…
223 …NRF_TIMER_INT_COMPARE2_MASK = TIMER_INTENSET_COMPARE2_Msk, ///< Timer interrupt from compare event…
224 …NRF_TIMER_INT_COMPARE3_MASK = TIMER_INTENSET_COMPARE3_Msk, ///< Timer interrupt from compare event…
226 …NRF_TIMER_INT_COMPARE4_MASK = TIMER_INTENSET_COMPARE4_Msk, ///< Timer interrupt from compare event…
229 …NRF_TIMER_INT_COMPARE5_MASK = TIMER_INTENSET_COMPARE5_Msk, ///< Timer interrupt from compare event…
235 * @brief Function for activating a specific timer task.
244 * @brief Function for getting the address of a specific timer task register.
255 * @brief Function for clearing a specific timer event.
264 * @brief Function for checking the state of a specific timer event.
276 * @brief Function for getting the address of a specific timer event register.
337 * TIMER task.
349 * TIMER task.
359 * TIMER event.
371 * TIMER event.
381 * @brief Function for setting the timer mode.
384 * @param[in] mode Timer mode.
390 * @brief Function for retrieving the timer mode.
394 * @return Timer mode.
399 * @brief Function for setting the timer bit width.
402 * @param[in] bit_width Timer bit width.
408 * @brief Function for retrieving the timer bit width.
412 * @return Timer bit width.
417 * @brief Function for setting the timer frequency.
420 * @param[in] frequency Timer frequency.
426 * @brief Function for retrieving the timer frequency.
430 * @return Timer frequency.
457 * @brief Function for getting a specific timer capture task.
466 * @brief Function for getting a specific timer compare event.
475 * @brief Function for getting a specific timer compare interrupt.
484 * @brief Function for calculating the number of timer ticks for a given time
485 * (in microseconds) and timer frequency.
488 * @param[in] frequency Timer frequency.
490 * @return Number of timer ticks.
496 * @brief Function for calculating the number of timer ticks for a given time
497 * (in milliseconds) and timer frequency.
500 * @param[in] frequency Timer frequency.
502 * @return Number of timer ticks.
677 // timer runs at the following frequency: f = 16 MHz / 2^prescaler. in nrf_timer_us_to_ticks()
688 // timer runs at the following frequency: f = 16000 kHz / 2^prescaler. in nrf_timer_ms_to_ticks()