FreeRTOS port on GAP8/RISC-V
|
Functions | |
void | system_init (void) |
Setup the microcontroller system. More... | |
void | system_setup_systick (uint32_t tick_rate_hz) |
Setup timer used for SysTick. More... | |
void | system_core_clock_update (uint32_t new_freq) |
Update the SystemCoreClock variable. More... | |
uint32_t | system_core_clock_get (void) |
Get current SystemCoreClock value. More... | |
void | system_usermode_entry (void *arg) |
Prologue for usermode thread. More... | |
void | system_exit (int32_t code) |
Stop execution. More... | |
Variables | |
volatile uint32_t | SystemCoreClock |
System clock frequency (core clock) More... | |
uint32_t system_core_clock_get | ( | void | ) |
Referenced by __pi_spi_open(), __pi_spi_receive_async(), __pi_spi_send_async(), __pi_spi_xfer_async(), and pi_timer_irq_set().
void system_core_clock_update | ( | uint32_t | new_freq | ) |
It must be called whenever the CPU frequency is changed during execution. This function updates SystemCoreClock variable according to current CPU frequency.
new_freq | New SoC frequence. |
Referenced by pi_fll_frequency_set().
void system_exit | ( | int32_t | code | ) |
This function is called to stop an execution and stop the microcontroller.
Referenced by exit().
void system_init | ( | void | ) |
This function configures the oscillator (FLL), setup caches and IRQ. It also initializes malloc functions. this function should be called from startup_device file.
void system_setup_systick | ( | uint32_t | tick_rate_hz | ) |
This function sets up low timer for a given tick rate.
tick_rate_hz | Tick rate of SysTick timer. |
Referenced by prvSetupTimerInterrupt().
void system_usermode_entry | ( | void * | arg | ) |
This function is called at the beginig of user threads. It harvest arguments to launch the user thread, free temp structs and drop privileges before executing the actual user thread.
Referenced by __os_native_api_create_user_task().
volatile uint32_t SystemCoreClock |
The system clock frequency supplied to the SysTick timer and the processor core clock. This variable can be used by the user application to setup the SysTick timer or configure other parameters. It may also be used by debugger to query the frequency of the debug timer or configure the trace clock speed SystemCoreClock is initialized with a correct predefined value.