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

Register-start-mode configuration block. More...

#include <ra8_wdt.h>

Data Fields

ra8_wdt_timeout_sel_t timeout
 WDTCR.TOPS[1:0] selection.
ra8_wdt_clock_div_t clock_div
 WDTCR.CKS[3:0] selection.
ra8_wdt_window_start_t window_start
 WDTCR.RPSS[1:0] selection.
ra8_wdt_window_end_t window_end
 WDTCR.RPES[1:0] selection.
ra8_wdt_reset_ctrl_t on_expiry
 WDTRCR.RSTIRQS reset vs IRQ.
ra8_wdt_stop_ctrl_t stop_in_sleep
 WDTCSTPR.SLCSTP halt-on-Sleep.

Detailed Description

Register-start-mode configuration block.

Filled by the caller and passed to ra8_wdt_init. Maps 1:1 onto the bit-fields of WDTCR + WDTRCR + WDTCSTPR.

const ra8_wdt_cfg_t cfg = {
.clock_div = k_ra8_wdt_clkdiv_128,
.window_end = k_ra8_wdt_window_end_0,
.stop_in_sleep = k_ra8_wdt_sleep_stop_count,
};
(void)ra8_wdt_init(&cfg);
@ k_ra8_wdt_timeout_4096
4096 cycles.
Definition ra8_wdt.h:148
@ k_ra8_wdt_clkdiv_128
PCLKB / 128.
Definition ra8_wdt.h:128
ra8_err_t ra8_wdt_init(const ra8_wdt_cfg_t *cfg)
Initialise the WDT in register-start mode.
Definition ra8_wdt.c:296
@ k_ra8_wdt_window_start_100
100 % (no upper bound).
Definition ra8_wdt.h:166
@ k_ra8_wdt_on_expiry_reset
RSTIRQS=1 – internal reset.
Definition ra8_wdt.h:202
@ k_ra8_wdt_sleep_stop_count
SLCSTP=1 – counter halts in Sleep.
Definition ra8_wdt.h:219
@ k_ra8_wdt_window_end_0
0 % (no lower bound).
Definition ra8_wdt.h:185
Register-start-mode configuration block.
Definition ra8_wdt.h:305
Invariant
window_end < window_start (silicon forces end=0% otherwise, per HUM Ch 27.2.2 p 1259).

Definition at line 305 of file ra8_wdt.h.

Field Documentation

◆ clock_div

ra8_wdt_clock_div_t ra8_wdt_cfg_t::clock_div

WDTCR.CKS[3:0] selection.

Definition at line 307 of file ra8_wdt.h.

Referenced by internal_decode_ofs_word(), internal_pack_wdtcr(), and ra8_wdt_init().

◆ on_expiry

ra8_wdt_reset_ctrl_t ra8_wdt_cfg_t::on_expiry

WDTRCR.RSTIRQS reset vs IRQ.

Definition at line 310 of file ra8_wdt.h.

Referenced by internal_decode_ofs_word(), and ra8_wdt_init().

◆ stop_in_sleep

ra8_wdt_stop_ctrl_t ra8_wdt_cfg_t::stop_in_sleep

WDTCSTPR.SLCSTP halt-on-Sleep.

Definition at line 311 of file ra8_wdt.h.

Referenced by internal_decode_ofs_word(), and ra8_wdt_init().

◆ timeout

ra8_wdt_timeout_sel_t ra8_wdt_cfg_t::timeout

WDTCR.TOPS[1:0] selection.

Definition at line 306 of file ra8_wdt.h.

Referenced by internal_decode_ofs_word(), internal_pack_wdtcr(), and ra8_wdt_init().

◆ window_end

ra8_wdt_window_end_t ra8_wdt_cfg_t::window_end

WDTCR.RPES[1:0] selection.

Definition at line 309 of file ra8_wdt.h.

Referenced by internal_decode_ofs_word(), and internal_pack_wdtcr().

◆ window_start

ra8_wdt_window_start_t ra8_wdt_cfg_t::window_start

WDTCR.RPSS[1:0] selection.

Definition at line 308 of file ra8_wdt.h.

Referenced by internal_decode_ofs_word(), and internal_pack_wdtcr().


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