![]() |
ISF
2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
|
Go to the source code of this file.
Macros | |
#define | bool uint32 |
Functions | |
void | pit_hal_enable (void) |
Enable PIT module. More... | |
void | pit_hal_disable (void) |
Disable PIT module. More... | |
void | pit_hal_configure_timer_run_in_debug (bool timerRun) |
Configure timers to continue to run or stop in debug mode. More... | |
void | pit_hal_timer_start (uint32_t timer) |
Start timer counting. More... | |
void | pit_hal_timer_stop (uint32_t timer) |
Stop timer counting. More... | |
void | pit_hal_timer_reset (uint32_t timer) |
Start timer counting. More... | |
void | pit_hal_set_timer_period_count (uint32_t timer, uint32_t count) |
Set timer period in units of count. More... | |
uint32_t | pit_hal_read_timer_period_count (uint32_t timer) |
Return current timer period in units of count. More... | |
uint32_t | pit_hal_read_timer_count (uint32_t timer) |
Read current timer counting value. More... | |
void | pit_hal_configure_interrupt (uint32_t timer, bool enable) |
Enable or disable timer interrupt. More... | |
void | pit_hal_clear_interrupt_flag (uint32_t timer) |
Clear timer interrupt flag. More... | |
bool | pit_hal_is_timeout_occurred (uint32_t timer) |
Read current timer timeout flag. More... | |
#define bool uint32 |
Definition at line 38 of file fsl_pit_hal.h.
void pit_hal_clear_interrupt_flag | ( | uint32_t | timer | ) |
Clear timer interrupt flag.
This function clears the timer interrupt flag after a timeout event occurs.
timer | Timer channel number. |
Definition at line 105 of file fsl_pit_hal.c.
Referenced by bm_start(), bm_timer_init(), and pit_init().
void pit_hal_configure_interrupt | ( | uint32_t | timer, |
bool | enable | ||
) |
Enable or disable timer interrupt.
If enabled, an interrupt happens when a timeout event occurs (Note: NVIC should be called to enable pit interrupt in system level).
timer | Timer channel number. |
enable | Enable or disable interrupt.
|
Definition at line 92 of file fsl_pit_hal.c.
Referenced by pit_init_channel().
void pit_hal_configure_timer_run_in_debug | ( | bool | timerRun | ) |
Configure timers to continue to run or stop in debug mode.
In debug mode, the timers will or will not be frozen, based on the configuration of this function. This is intended to aid software development, allowing the developer to halt the processor, investigate the current state of the system (for example, the timer values) and then continue the operation.
timerRun | Timers run or stop in debug mode.
|
Definition at line 51 of file fsl_pit_hal.c.
Referenced by pit_init_module().
void pit_hal_disable | ( | void | ) |
Disable PIT module.
This function disables all PIT timer clocks(Note: it will not affect SIM clock gating control).
Definition at line 46 of file fsl_pit_hal.c.
Referenced by pit_shutdown().
void pit_hal_enable | ( | void | ) |
Enable PIT module.
This function enables PIT timer clock (Note: this function will not un-gate the system clock gating control). It should be called before any other timer related setup.
Definition at line 41 of file fsl_pit_hal.c.
Referenced by pit_init_module().
bool pit_hal_is_timeout_occurred | ( | uint32_t | timer | ) |
Read current timer timeout flag.
Every time the timer counts to 0, this flag is set.
timer | Timer channel number. |
Definition at line 112 of file fsl_pit_hal.c.
uint32_t pit_hal_read_timer_count | ( | uint32_t | timer | ) |
Read current timer counting value.
This function returns the real-time timer counting value, in a range from 0 to timer period.
timer | Timer channel number. |
Definition at line 83 of file fsl_pit_hal.c.
References TU_instance_PEx_t::fnTULDDGetCounter, TU_instance_PEx_t::fnTULDDGetPeriod, and TU_instance_tbl.
Referenced by pit_read_timer_us().
uint32_t pit_hal_read_timer_period_count | ( | uint32_t | timer | ) |
Return current timer period in units of count.
timer | Timer channel number. |
Definition at line 76 of file fsl_pit_hal.c.
References TU_instance_PEx_t::fnTULDDGetPeriod, and TU_instance_tbl.
void pit_hal_set_timer_period_count | ( | uint32_t | timer, |
uint32_t | count | ||
) |
Set timer period in units of count.
Timers begin counting from the value set by this function. The counter period of a running timer can be modified by first stopping the timer, setting a new load value, and then starting the timer again. If timers are not restarted, the new value is loaded after the next trigger event.
timer | Timer channel number. |
count | Timer period in units of count. |
Definition at line 71 of file fsl_pit_hal.c.
References TU_instance_PEx_t::fnTULDDSetPeriod, and TU_instance_tbl.
Referenced by pit_set_timer_period_us().
void pit_hal_timer_reset | ( | uint32_t | timer | ) |
Start timer counting.
After calling this function, timers load the start value as specified by function pit_hal_set_timer_period_count(uint32_t timer, uint32_t count), count down to 0 and then load the respective start value again. Each time a timer reaches 0, it generates a trigger pulse and set the timeout interrupt flag.
timer | Timer channel number. |
Definition at line 66 of file fsl_pit_hal.c.
References TU_instance_PEx_t::fnTULDDResetCounter, and TU_instance_tbl.
Referenced by bm_start().
void pit_hal_timer_start | ( | uint32_t | timer | ) |
Start timer counting.
After calling this function, timers load the start value as specified by function pit_hal_set_timer_period_count(uint32_t timer, uint32_t count), count down to 0 and then load the respective start value again. Each time a timer reaches 0, it generates a trigger pulse and set the timeout interrupt flag.
timer | Timer channel number. |
Definition at line 56 of file fsl_pit_hal.c.
References TU_instance_PEx_t::fnTULDDEnable, and TU_instance_tbl.
Referenced by pit_timer_start().
void pit_hal_timer_stop | ( | uint32_t | timer | ) |
Stop timer counting.
This function stops every timer counting. Timers reload their periods respectively after they call pit_hal_timer_start the next time.
timer | Timer channel number. |
Definition at line 61 of file fsl_pit_hal.c.
References TU_instance_PEx_t::fnTULDDDisable, and TU_instance_tbl.
Referenced by pit_timer_stop().