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

Configuration for ra8_agt_start_cascade. More...

#include <ra8_agt.h>

Data Fields

uint32_t reload32
 32-bit virtual reload value.
ra8_agt_cascade_clk_t clock
 Count source for the AGT0 half.
ra8_agt_event_fn_t on_underflow
 Optional: fires on AGT1 underflow.
void * ctx
 Opaque ctx forwarded to callback.

Detailed Description

Configuration for ra8_agt_start_cascade.

Cascade mode wires AGT0's underflow into AGT1's count source so the pair behaves as a 32-bit virtual down-counter. The low 16 bits live in AGT0 and the high 16 bits live in AGT1; AGT1 underflows once every (reload32 / 0x10000 + 1) AGT0 underflows. HUM Ch 24.1 "Overview" Table 24.1 p 1164 ("Underflow event signal from AGT0" is a valid TCK[2:0] = 101b on AGT1 only – HUM Ch 24.2.5 p 1168).

reload32 is split into reload32 & 0xFFFF (AGT0) and (reload32 >> 16) & 0xFFFF (AGT1). prescaler programmes the AGTMR1.TCK / AGTMR2.CKS pair for the low half; AGT1 is fixed at "count from AGT0 underflow" (TCK = 101b).

Definition at line 237 of file ra8_agt.h.

Field Documentation

◆ clock

ra8_agt_cascade_clk_t ra8_agt_cascade_cfg_t::clock

Count source for the AGT0 half.

Definition at line 239 of file ra8_agt.h.

Referenced by ra8_agt_start_cascade().

◆ ctx

void* ra8_agt_cascade_cfg_t::ctx

Opaque ctx forwarded to callback.

Definition at line 241 of file ra8_agt.h.

Referenced by internal_agt_cascade_install_callback().

◆ on_underflow

ra8_agt_event_fn_t ra8_agt_cascade_cfg_t::on_underflow

Optional: fires on AGT1 underflow.

Definition at line 240 of file ra8_agt.h.

Referenced by internal_agt_cascade_install_callback().

◆ reload32

uint32_t ra8_agt_cascade_cfg_t::reload32

32-bit virtual reload value.

Definition at line 238 of file ra8_agt.h.

Referenced by ra8_agt_start_cascade().


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