![]() |
NMSIS-Core
Version 1.0.0-HummingBird
NMSIS-Core support for HummingBird RISC-V processor-based devices
|
Functions that configure the Core System Timer. More...
Functions | |
__STATIC_FORCEINLINE void | SysTimer_SetLoadValue (uint64_t value) |
Set system timer load value. More... | |
__STATIC_FORCEINLINE uint64_t | SysTimer_GetLoadValue (void) |
Get system timer load value. More... | |
__STATIC_FORCEINLINE void | SysTimer_SetCompareValue (uint64_t value) |
Set system timer compare value. More... | |
__STATIC_FORCEINLINE uint64_t | SysTimer_GetCompareValue (void) |
Get system timer compare value. More... | |
__STATIC_FORCEINLINE void | SysTimer_SetSWIRQ (void) |
Trigger or set software interrupt via system timer. More... | |
__STATIC_FORCEINLINE void | SysTimer_ClearSWIRQ (void) |
Clear system timer software interrupt pending request. More... | |
__STATIC_FORCEINLINE uint32_t | SysTimer_GetMsipValue (void) |
Get system timer MSIP register value. More... | |
__STATIC_FORCEINLINE void | SysTimer_SetMsipValue (uint32_t msip) |
Set system timer MSIP register value. More... | |
__STATIC_INLINE uint32_t | SysTick_Config (uint64_t ticks) |
System Tick Configuration. More... | |
__STATIC_FORCEINLINE uint32_t | SysTick_Reload (uint64_t ticks) |
System Tick Reload. More... | |
Functions that configure the Core System Timer.
__STATIC_INLINE uint32_t SysTick_Config | ( | uint64_t | ticks | ) |
System Tick Configuration.
Initializes the System Timer and its non-vector interrupt, and starts the System Tick Timer.
In our default implementation, the timer counter will be set to zero, and it will start a timer compare non-vector interrupt when it matchs the ticks user set, during the timer interrupt user should reload the system tick using SysTick_Reload function or similar function written by user, so it can produce period timer interrupt.
[in] | ticks | Number of ticks between two interrupts. |
Definition at line 208 of file core_feature_timer.h.
References __enable_timer_irq(), SysTimer_SetCompareValue(), and SysTimer_SetLoadValue().
__STATIC_FORCEINLINE uint32_t SysTick_Reload | ( | uint64_t | ticks | ) |
System Tick Reload.
Reload the System Timer Tick when the MTIMECMP reached TIME value
[in] | ticks | Number of ticks between two interrupts. |
Definition at line 227 of file core_feature_timer.h.
__STATIC_FORCEINLINE void SysTimer_ClearSWIRQ | ( | void | ) |
Clear system timer software interrupt pending request.
This function clear the system timer MSIP bit in MSIP register.
Definition at line 162 of file core_feature_timer.h.
References SysTimer, and SysTimer_MSIP_MSIP_Msk.
__STATIC_FORCEINLINE uint64_t SysTimer_GetCompareValue | ( | void | ) |
Get system timer compare value.
This function get the system timer compare value in MTIMERCMP register.
Definition at line 134 of file core_feature_timer.h.
References SysTimer.
__STATIC_FORCEINLINE uint64_t SysTimer_GetLoadValue | ( | void | ) |
Get system timer load value.
This function get the system timer current value in MTIMER register.
Definition at line 104 of file core_feature_timer.h.
References SysTimer.
__STATIC_FORCEINLINE uint32_t SysTimer_GetMsipValue | ( | void | ) |
Get system timer MSIP register value.
This function get the system timer MSIP register value.
Definition at line 178 of file core_feature_timer.h.
References SysTimer, and SysTimer_MSIP_Msk.
__STATIC_FORCEINLINE void SysTimer_SetCompareValue | ( | uint64_t | value | ) |
Set system timer compare value.
This function set the system Timer compare value in MTIMERCMP register.
[in] | value | compare value to set system timer MTIMERCMP register. |
Definition at line 120 of file core_feature_timer.h.
References SysTimer.
Referenced by SysTick_Config().
__STATIC_FORCEINLINE void SysTimer_SetLoadValue | ( | uint64_t | value | ) |
Set system timer load value.
This function set the system timer load value in MTIMER register.
[in] | value | value to set system timer MTIMER register. |
Definition at line 90 of file core_feature_timer.h.
References SysTimer.
Referenced by SysTick_Config().
__STATIC_FORCEINLINE void SysTimer_SetMsipValue | ( | uint32_t | msip | ) |
Set system timer MSIP register value.
This function set the system timer MSIP register value.
[in] | msip | value to set MSIP register |
Definition at line 189 of file core_feature_timer.h.
References SysTimer, and SysTimer_MSIP_Msk.
__STATIC_FORCEINLINE void SysTimer_SetSWIRQ | ( | void | ) |
Trigger or set software interrupt via system timer.
This function set the system timer MSIP bit in MSIP register.
Definition at line 148 of file core_feature_timer.h.
References SysTimer, and SysTimer_MSIP_MSIP_Msk.