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

Everything the port needs that is not fixed by the board. More...

#include <ra8_esp_hosted_port.h>

Data Fields

uint32_t pclk_hz
 PCLKA rate in hertz; the SCI baud clock source.
uint32_t sck_hz
 Requested SPI bit rate in hertz.
uint16_t edge_poll_ms
 Sampling period for pins with no ICU channel.
uint8_t sci_channel
 SCI channel carrying Simple-SPI; 0..9.

Detailed Description

Everything the port needs that is not fixed by the board.

The pin assignment is deliberately absent: it is a board fact and lives once in ra8_esp_hosted_pins.h. What remains is the clocking, which an application knows and the port cannot discover, plus the poll period for any side-band pin the package cannot route to the ICU.

Invariant
pclk_hz is the live PCLKA rate; a stale value silently mis-programs the SCI bit-rate divider.
sck_hz is non-zero and within what the divider can reach from pclk_hz.
edge_poll_ms is non-zero, or the software edge detector would arm a zero-tick timer, which ThreadX rejects.
Example:
cfg.sck_hz = 5000000U;
cfg.edge_poll_ms = 2U;
ra8_err_t ra8_cgc_get_clock_hz(ra8_clock_id_t id, uint32_t *out_hz)
Query the current frequency of a clock-tree domain.
Definition ra8_cgc.c:132
@ k_ra8_clock_id_pclka
PCLKA.
Definition ra8_cgc.h:73
struct ra8_esp_hosted_port_cfg ra8_esp_hosted_port_cfg_t
ra8_err_t ra8_esp_hosted_port_init(const ra8_esp_hosted_port_cfg_t *cfg)
Bring the esp-hosted port up and publish the OS-abstraction vtable.
uint16_t edge_poll_ms
Sampling period for pins with no ICU channel.
uint32_t pclk_hz
PCLKA rate in hertz; the SCI baud clock source.
uint32_t sck_hz
Requested SPI bit rate in hertz.
See also
ra8_esp_hosted_port_init
Since
0.1.0

Definition at line 136 of file ra8_esp_hosted_port.h.

Field Documentation

◆ edge_poll_ms

uint16_t ra8_esp_hosted_port_cfg::edge_poll_ms

Sampling period for pins with no ICU channel.

Definition at line 139 of file ra8_esp_hosted_port.h.

Referenced by internal_bring_up(), and priv_ra8_esp_hosted_port_cfg_check().

◆ pclk_hz

uint32_t ra8_esp_hosted_port_cfg::pclk_hz

PCLKA rate in hertz; the SCI baud clock source.

Definition at line 137 of file ra8_esp_hosted_port.h.

Referenced by internal_bring_up(), and priv_ra8_esp_hosted_port_cfg_check().

◆ sci_channel

uint8_t ra8_esp_hosted_port_cfg::sci_channel

SCI channel carrying Simple-SPI; 0..9.

Definition at line 140 of file ra8_esp_hosted_port.h.

Referenced by internal_bring_up(), priv_ra8_esp_hosted_port_cfg_check(), and ra8_esp_hosted_port_init().

◆ sck_hz

uint32_t ra8_esp_hosted_port_cfg::sck_hz

Requested SPI bit rate in hertz.

Definition at line 138 of file ra8_esp_hosted_port.h.

Referenced by internal_bring_up(), priv_ra8_esp_hosted_port_cfg_check(), and ra8_esp_hosted_port_init().


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