ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_threadx.h
Go to the documentation of this file.
1
36
37#pragma once
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#include <stdint.h>
44
45#include "ra8_err.h"
46
60typedef enum : uint32_t {
63
75typedef enum : uint32_t {
76 k_ra8_systick_reload_max = 0x00FFFFFFUL,
78
120[[nodiscard]] ra8_err_t
121ra8_threadx_systick_reload_for(uint32_t cpuclk_hz, uint32_t tick_hz, uint32_t* out_reload);
122
172[[nodiscard]] ra8_err_t ra8_threadx_systick_retune(void);
173
174#ifdef __cplusplus
175}
176#endif
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_threadx_tick_t
ThreadX kernel tick rate used to derive the SysTick reload.
Definition ra8_threadx.h:60
@ k_ra8_threadx_tick_hz
1 kHz -> 1 ms kernel tick.
Definition ra8_threadx.h:61
ra8_err_t ra8_threadx_systick_reload_for(uint32_t cpuclk_hz, uint32_t tick_hz, uint32_t *out_reload)
Compute the SysTick reload for a given core clock + tick rate.
ra8_err_t ra8_threadx_systick_retune(void)
Reprogram SysTick.LOAD from the live CPUCLK0 rate.
ra8_systick_reload_limit_t
Architectural range limit of the Cortex-M SysTick reload register.
Definition ra8_threadx.h:75
@ k_ra8_systick_reload_max
Max SYST_RVR reload (24-bit).
Definition ra8_threadx.h:76