Cortex core features.
More...
#include <jsapi_common.h>
unsigned JSAPI_CORTEX_CORE::SysTick_CurrentValue |
( |
void |
| ) |
|
Return the current value of the SYSTICK timer.
- Returns
- SYSTICK timer value.
void JSAPI_CORTEX_CORE::SysTick_SetState |
( |
bool |
enable | ) |
|
Enable or disable the SYSTICK timer.
- Parameters
-
enable | zero/false - disable SYSTICK interrupt, nonzero/true - enable SYSTICK interrupt. |
Set the granularity of the SYSTICK timer. SYSTICK timer is a simple 24-bit timer defined by ARM that is present in most Cortex-M implementations. It provides a portable method of invoking timer interrupts.
- Parameters
-
granularity | one of the "enum SYSTICK_GRANULARITY" values. SYSTICK_MILLISECOND is a good value to use. Any finer granularity may interrupt the CPU too often. For example, a microsecond timer only allows ~50 instructions to execute between interrupts on a 48MHz system. |
priority | priority value of the interrupt (i.e. argument to NVIC_SetPriority. |
See SysTick_Timer(granularity, 0), i.e. use Priority value of 0 for SysTick timer.
- Parameters
-
granularity | one of the "enum SYSTICK_GRANULARITY" values. SYSTICK_MILLISECOND is a good value to use. Any finer granularity may interrupt the CPU too often. For example, a microsecond timer only allows ~50 instructions to execute between interrupts on a 48MHz system. |
void JSAPI_CORTEX_CORE::SysTick_TimerAddHook |
( |
void(*)(void) |
func | ) |
|
Hook into the SYSTICK interrupt.
- Parameters
-
func | user function to be called. When the SYSTICK interrupt occurs, "func" will be called. Only the last function registered will be called. |
The documentation for this class was generated from the following file: