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

Transmitter Delay Compensation (TDC) configuration for one CANFD channel. More...

#include <ra8_canfd.h>

Data Fields

bool enable
 true = enable TDC (FDCFG.TDE = 1).
bool manual
 true = use TDCO offset (FDCOC = 1), false = measured FDSTS.TDCR.
uint8_t offset
 TDCO offset in time quanta (0..k_ra8_canfd_tdc_offset_max).

Detailed Description

Transmitter Delay Compensation (TDC) configuration for one CANFD channel.

At CAN-FD data-phase bit rates above roughly 2 Mbps the transmitter loop delay must be compensated or the secondary sample point drifts outside the bit window. The RA8D2 RSCANFD block implements TDC via three fields in CFDCnFDCFG (HUM Ch 41 "CFDCnFDCFG" p 2788):

  • TDE (bit 16): global TDC enable gate.
  • TDCOC (bit 15): 0 = use the measured result from FDSTS.TDCR, 1 = use the software-programmed TDCO value.
  • TDCO (bits [14:8]): a 7-bit offset applied to the secondary sample point (1 time-quanta resolution).

Typical usage: set enable true and manual false to let the hardware measure the loop delay automatically via FDSTS.TDCR. Switch to manual true only when hardware measurement is unavailable (test modes or very low data rates) and set offset to the known loop-delay in time quanta.

Invariant
If enable is false, manual and offset are ignored.
offset must be in [0, k_ra8_canfd_tdc_offset_max] when enable is true.
.enable = true,
.manual = false,
.offset = 0U,
};
(void)ra8_canfd_set_tdc(0U, &tdc);
ra8_err_t ra8_canfd_set_tdc(uint8_t channel, const ra8_canfd_tdc_cfg_t *cfg)
Configure Transmitter Delay Compensation on a CANFD channel.
Transmitter Delay Compensation (TDC) configuration for one CANFD channel.
Definition ra8_canfd.h:385
See also
ra8_canfd_set_tdc()
ra8_fdcfg_mask_t

Definition at line 385 of file ra8_canfd.h.

Field Documentation

◆ enable

bool ra8_canfd_tdc_cfg_t::enable

true = enable TDC (FDCFG.TDE = 1).

Definition at line 386 of file ra8_canfd.h.

Referenced by ra8_canfd_set_tdc().

◆ manual

bool ra8_canfd_tdc_cfg_t::manual

true = use TDCO offset (FDCOC = 1), false = measured FDSTS.TDCR.

Definition at line 387 of file ra8_canfd.h.

Referenced by ra8_canfd_set_tdc().

◆ offset

uint8_t ra8_canfd_tdc_cfg_t::offset

TDCO offset in time quanta (0..k_ra8_canfd_tdc_offset_max).

Definition at line 388 of file ra8_canfd.h.

Referenced by ra8_canfd_set_tdc().


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