58typedef enum : uint8_t {
68typedef enum : uint16_t {
75typedef enum : uint8_t {
82typedef enum : uint16_t {
92typedef enum : uint32_t {
101#ifndef RA8_OFF_TARGET
243 static CHAR s_thread_tx_name[] =
"canfd_tx";
244 static CHAR s_thread_rx_name[] =
"canfd_rx";
246 (void)first_unused_memory;
260 __asm__
volatile(
"wfi");
276 __asm__
volatile(
"wfi");
300 __asm__
volatile(
"wfi");
306 __asm__
volatile(
"wfi");
311 __asm__
volatile(
"wfi");
317 __asm__
volatile(
"wfi");
324 __asm__
volatile(
"wfi");
332 __asm__
volatile(
"wfi");
338#ifndef RA8_OFF_TARGET
343 __asm__
volatile(
"wfi");
void main(void)
Secure fallback main entry point.
void tx_application_define(void *first_unused_memory)
ThreadX system-define hook: build worker thread + byte pool.
@ k_canfd_demo_channel
CANFD demo channel.
@ k_canfd_demo_bitrate
CANFD demo bitrate.
@ k_canfd_thread_stack_bytes
CANFD thread stack bytes.
canfd_link_t
CAN-FD channel + bit-rate constants shared by both threads.
static TX_THREAD s_thread_tx
static uint8_t s_thread_rx_stack[k_canfd_thread_stack_bytes]
canfd_priority_t
Thread priorities.
@ k_canfd_thread_priority
CANFD thread priority.
volatile uint32_t g_threadx_canfd_match
HIL success counter – one increment per successful CAN-FD transmit (TX thread) or per accepted RX fra...
static TX_THREAD s_thread_rx
static void internal_thread_tx_entry(ULONG thread_input)
Heartbeat TX thread: send a CAN-FD frame each period.
static void internal_thread_rx_entry(ULONG thread_input)
RX polling thread: drain the loopback-mirrored frame.
canfd_marker_t
Stack size, in bytes, for each CANFD demo thread.
@ k_canfd_marker_5
CANFD marker 5.
@ k_canfd_marker_1
CANFD marker 1.
@ k_canfd_marker_3
CANFD marker 3.
@ k_canfd_marker_6
CANFD marker 6.
@ k_canfd_marker_4
CANFD marker 4.
@ k_canfd_marker_2
CANFD marker 2.
@ k_canfd_marker_0
CANFD marker 0.
volatile uint32_t g_threadx_canfd_mismatch
HIL failure counter – one increment per TX or RX error.
canfd_period_t
Period and identifier values used by the heartbeat thread.
@ k_canfd_rx_poll_ticks
50 ms RX poll cadence.
@ k_canfd_heartbeat_id
11-bit CAN identifier.
@ k_canfd_heartbeat_dlc
Data length code (bytes).
@ k_canfd_heartbeat_ticks
500 ms in 1 kHz ticks.
static uint8_t s_thread_tx_stack[k_canfd_thread_stack_bytes]
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_led_toggle(ra8_board_led_id_t led)
Toggle led's output state.
ra8_err_t ra8_board_led_init(ra8_board_led_id_t led)
Configure led as a digital output, initial level low (off).
@ k_ra8_board_led2
LED2, GREEN, P303 (jumper E26).
@ k_ra8_board_led1
LED1, BLUE, P600 (jumper E27).
Boot entry points shared between a vector table and its startup code.
CANFD Lite driver (bit-timing, TX, RX, error state).
ra8_err_t ra8_canfd_transmit(uint8_t channel, const ra8_canfd_frame_t *frame)
Queue a frame into the TX message buffer and trigger transmission.
ra8_err_t ra8_canfd_set_bitrate(uint8_t channel, uint32_t bitrate_bps, uint32_t data_bitrate_bps)
Programme nominal (and optional data) bit-timing registers.
ra8_err_t ra8_canfd_receive(uint8_t channel, ra8_canfd_frame_t *out_frame)
Poll the RX FIFO for the next available frame.
ra8_err_t ra8_canfd_init(uint8_t channel)
Take a CANFD channel out of reset into operation mode.
ra8_err_t ra8_canfd_set_test_mode(uint8_t channel, ra8_ctms_mode_t mode)
Enable a CFDC[0].CTR test mode (basic / listen-only / loopback).
@ k_ra8_ctms_self_test_1
11b: Self-test 1 (internal loopback).
High-level Clock Generation Circuit driver.
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_no_data
No application data available (e.g.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
Typed Port / Pin Constants for the RA8D2 IOPORT Module.
High-level GPIO helpers on top of the PORT + PFS register layer.
unsigned int UINT
ThreadX-compatible unsigned int (host stub).
char CHAR
ThreadX-compatible CHAR (host stub).
unsigned long ULONG
ThreadX-compatible unsigned long (host stub).
Opaque thread stand-in for the host build.
A single CAN / CAN-FD frame as seen by the driver public API.