SuperTinyKernel™ RTOS 1.06.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk_arch_risc-v.h File Reference

Platform port for RISC-V. More...

#include "stk_common.h"
Include dependency graph for stk_arch_risc-v.h:

Go to the source code of this file.

Classes

class  stk::PlatformRiscV
 Concrete implementation of IPlatform driver for the Risc-V processors. More...
class  stk::PlatformRiscV::ISpecificEventHandler

Namespaces

namespace  stk
 Namespace of STK package.

Macros

#define STK_TLS_PREFER_REGISTER   1
#define STK_INLINE_TLS   1
#define STK_SUBMICORSECOND_PRECISION_TIMER   0
 Enables sub-microsecond precision timer, see hw::HiResClock.
#define STK_SYSTEM_CORE_CLOCK_VAR   SystemCoreClock
 Definition of the system core clock variable holding frequency of the CPU in Hz.
#define STK_SYSTEM_CORE_CLOCK_FREQUENCY   150000000U
 System clock frequency in Hz. Default: 150 MHz.

Functions

static __stk_forceinline Word stk::GetTls ()
 Get thread-local storage (TLS).
static __stk_forceinline void stk::SetTls (Word tp)
 Set thread-local storage (TLS).
static __stk_forceinline void __stk_dmb ()
 Data memory barrier.

Variables

volatile uint32_t SystemCoreClock
 System clock frequency in Hz.

Detailed Description

Platform port for RISC-V.

Definition in file stk_arch_risc-v.h.

Macro Definition Documentation

◆ STK_INLINE_TLS

#define STK_INLINE_TLS   1

Definition at line 97 of file stk_arch_risc-v.h.

◆ STK_SUBMICORSECOND_PRECISION_TIMER

#define STK_SUBMICORSECOND_PRECISION_TIMER   0

Enables sub-microsecond precision timer, see hw::HiResClock.

Note
By default timer precision is 1 microsecond.

Definition at line 110 of file stk_arch_risc-v.h.

◆ STK_SYSTEM_CORE_CLOCK_FREQUENCY

#define STK_SYSTEM_CORE_CLOCK_FREQUENCY   150000000U

System clock frequency in Hz. Default: 150 MHz.

Definition at line 124 of file stk_arch_risc-v.h.

◆ STK_SYSTEM_CORE_CLOCK_VAR

#define STK_SYSTEM_CORE_CLOCK_VAR   SystemCoreClock

Definition of the system core clock variable holding frequency of the CPU in Hz.

Definition at line 117 of file stk_arch_risc-v.h.

◆ STK_TLS_PREFER_REGISTER

#define STK_TLS_PREFER_REGISTER   1

Definition at line 74 of file stk_arch_risc-v.h.

Function Documentation

◆ __stk_dmb()

__stk_forceinline void __stk_dmb ( )
static

Data memory barrier.

Definition at line 103 of file stk_arch_risc-v.h.

103{ __asm volatile("fence rw, rw" ::: "memory"); }

References __stk_forceinline.

Variable Documentation

◆ SystemCoreClock

volatile uint32_t SystemCoreClock

System clock frequency in Hz.

Definition at line 130 of file stk_arch_risc-v.h.