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

Driver configuration descriptor for ra8_pdg_init. More...

#include <ra8_pdg.h>

Data Fields

ra8_pdg_frange_t frange
 GPT core clock band (HUM 23.2.1).
uint8_t channel_mask
 Bit n = enable PDG channel n.
uint8_t auto_tune
 1 = ignore frange, derive from gptclk_hz.
uint32_t gptclk_hz
 Measured GTCLK frequency (Hz).

Detailed Description

Driver configuration descriptor for ra8_pdg_init.

cppcheck cannot see tests/ so it flags every field as unused; each member is read in ra8_pdg_init in libs/ra8_hal/src/ra8_pdg.c.

Invariant
frange must be one of the k_ra8_pdg_frange_* enum values (the others are "Setting prohibited" per HUM Ch 23.2.1 p 1154).
Example:
const ra8_pdg_config_t cfg = {
.channel_mask = 0x0F, // all 4 channels
.auto_tune = false,
.gptclk_hz = 0,
};
(void)ra8_pdg_init(&cfg);
ra8_err_t ra8_pdg_init(const ra8_pdg_config_t *cfg)
Initialise the PDG block per HUM Figure 23.2 (p 1160).
Definition ra8_pdg.c:438
@ k_ra8_pdg_frange_80_160_mhz
80..160 MHz, 1/128 step.
Driver configuration descriptor for ra8_pdg_init.
Definition ra8_pdg.h:173

Definition at line 173 of file ra8_pdg.h.

Field Documentation

◆ auto_tune

uint8_t ra8_pdg_config_t::auto_tune

1 = ignore frange, derive from gptclk_hz.

Definition at line 176 of file ra8_pdg.h.

Referenced by internal_validate_cfg(), and ra8_pdg_init().

◆ channel_mask

uint8_t ra8_pdg_config_t::channel_mask

Bit n = enable PDG channel n.

Definition at line 175 of file ra8_pdg.h.

Referenced by internal_program_dll(), and internal_validate_cfg().

◆ frange

ra8_pdg_frange_t ra8_pdg_config_t::frange

GPT core clock band (HUM 23.2.1).

Definition at line 174 of file ra8_pdg.h.

Referenced by internal_validate_cfg(), and ra8_pdg_init().

◆ gptclk_hz

uint32_t ra8_pdg_config_t::gptclk_hz

Measured GTCLK frequency (Hz).

Definition at line 177 of file ra8_pdg.h.

Referenced by internal_validate_cfg(), and ra8_pdg_init().


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