JSAPI for STM32F0xx MCU  1.10
JSAPI_CORTEX_CORE Class Reference

Cortex core features. More...

#include <jsapi_common.h>

Public Member Functions

void SysTick_Timer (enum SYSTICK_GRANULARITY granularity, int priority)
 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. More...
 
void SysTick_Timer (enum SYSTICK_GRANULARITY granularity)
 See SysTick_Timer(granularity, 0), i.e. use Priority value of 0 for SysTick timer. More...
 
void SysTick_TimerAddHook (void(*func)(void))
 Hook into the SYSTICK interrupt. More...
 
void SysTick_SetState (bool enable)
 Enable or disable the SYSTICK timer. More...
 
unsigned SysTick_CurrentValue (void)
 Return the current value of the SYSTICK timer. More...
 

Detailed Description

Cortex core features.

Member Function Documentation

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
enablezero/false - disable SYSTICK interrupt, nonzero/true - enable SYSTICK interrupt.
void JSAPI_CORTEX_CORE::SysTick_Timer ( enum SYSTICK_GRANULARITY  granularity,
int  priority 
)

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
granularityone 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.
prioritypriority value of the interrupt (i.e. argument to NVIC_SetPriority.
void JSAPI_CORTEX_CORE::SysTick_Timer ( enum SYSTICK_GRANULARITY  granularity)
inline

See SysTick_Timer(granularity, 0), i.e. use Priority value of 0 for SysTick timer.

Parameters
granularityone 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
funcuser 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: