ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_canfd_frame_t Struct Reference

A single CAN / CAN-FD frame as seen by the driver public API. More...

#include <ra8_canfd.h>

Data Fields

uint32_t id
 Arbitration-ID field.
uint8_t dlc
 DLC code (0..15).
uint8_t is_extended
 0 = 11-bit ID, 1 = 29-bit ID.
uint8_t is_fd
 0 = classic CAN, 1 = CAN-FD.
uint8_t is_brs
 1 = bit-rate switch in data phase.
uint8_t data [k_ra8_canfd_data_bytes_max]
 Payload bytes.

Detailed Description

A single CAN / CAN-FD frame as seen by the driver public API.

id holds an 11-bit standard or 29-bit extended identifier (masked to k_ra8_canfd_id_std_mask / k_ra8_canfd_id_ext_mask on send). dlc is the raw DLC nibble (0..15) – callers passing a length longer than 8 bytes must also set is_fd.

cppcheck cannot see tests/ so it flags every field as unused; each member is read in ra8_canfd_transmit and ra8_canfd_receive in libs/ra8_hal/src/ra8_canfd.c.

Invariant
dlc <= 15
If is_extended == 0, id fits in 11 bits.
If is_brs, the channel must have been initialized with a data bit rate > nominal bit rate.
Note
The data array is sized for the worst case (64-byte CAN-FD payload). Classic CAN frames only touch the first 8 bytes.

Definition at line 52 of file ra8_canfd.h.

Field Documentation

◆ data

uint8_t ra8_canfd_frame_t::data[k_ra8_canfd_data_bytes_max]

Payload bytes.

Definition at line 58 of file ra8_canfd.h.

Referenced by internal_read_rx_data(), and internal_write_tx_data().

◆ dlc

uint8_t ra8_canfd_frame_t::dlc

DLC code (0..15).

See CAN-FD DLC table.

Definition at line 54 of file ra8_canfd.h.

Referenced by internal_decode_rx_header(), internal_validate_frame(), and ra8_canfd_transmit().

◆ id

uint32_t ra8_canfd_frame_t::id

Arbitration-ID field.

Definition at line 53 of file ra8_canfd.h.

Referenced by internal_decode_rx_header(), internal_tx_id(), and internal_validate_frame().

◆ is_brs

uint8_t ra8_canfd_frame_t::is_brs

1 = bit-rate switch in data phase.

Definition at line 57 of file ra8_canfd.h.

Referenced by internal_decode_rx_header(), internal_tx_fdctr(), and internal_validate_frame().

◆ is_extended

uint8_t ra8_canfd_frame_t::is_extended

0 = 11-bit ID, 1 = 29-bit ID.

Definition at line 55 of file ra8_canfd.h.

Referenced by internal_decode_rx_header(), internal_tx_id(), and internal_validate_frame().

◆ is_fd

uint8_t ra8_canfd_frame_t::is_fd

0 = classic CAN, 1 = CAN-FD.

Definition at line 56 of file ra8_canfd.h.

Referenced by internal_decode_rx_header(), internal_tx_fdctr(), and internal_validate_frame().


The documentation for this struct was generated from the following file: