|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
General PWM Timer (GPT) register layout for the Renesas RA8D2. More...
Go to the source code of this file.
Data Structures | |
| struct | r_gpt_channel_regs_t |
| Per-channel GPT register window. More... | |
Enumerations | |
| enum | ra8_gpt_addr_t : uintptr_t { k_ra8_gpt0_base_addr = 0x40322000UL , k_ra8_gpt_gtclk_addr = 0x40323F10UL , k_ra8_gpt_odc_base_addr = 0x40324000UL , k_ra8_gpt_ops_base_addr = 0x40323F00UL } |
| enum | ra8_gpt_limits_t : uint16_t { k_ra8_gpt_channel_count = 14U , k_ra8_gpt_channel_stride = 0x100U } |
Functions | |
| static volatile r_gpt_channel_regs_t * | ra8_gpt (uint8_t channel) |
| Get pointer to GPT channel N. | |
General PWM Timer (GPT) register layout for the Renesas RA8D2.
RA8D2 exposes 14 GPT channels (GPT0..GPT13) at 0x40322000 with a 0x100 stride per channel. Each channel is a 32-bit up/down counter with independent GTIOA/GTIOB outputs, PWM / compare-match modes, dead-time control, and ADC trigger hooks. A small set of shared registers (GTCLK, GTODC, GTOPS) lives at higher offsets.
The per-channel struct below models the most frequently touched registers; extend as drivers need.
Definition in file ra8_gpt_regs.h.
| enum ra8_gpt_addr_t : uintptr_t |
| Enumerator | |
|---|---|
| k_ra8_gpt0_base_addr | RA8 gpt0 base address. |
| k_ra8_gpt_gtclk_addr | Shared GTCLK regs. |
| k_ra8_gpt_odc_base_addr | Output Disable Control. |
| k_ra8_gpt_ops_base_addr | Output Phase Switching. |
Definition at line 30 of file ra8_gpt_regs.h.
| enum ra8_gpt_limits_t : uint16_t |
| Enumerator | |
|---|---|
| k_ra8_gpt_channel_count | RA8 GPT channel count. |
| k_ra8_gpt_channel_stride | RA8 GPT channel stride. |
Definition at line 37 of file ra8_gpt_regs.h.
|
inlinestatic |
Get pointer to GPT channel N.
Definition at line 113 of file ra8_gpt_regs.h.
References k_ra8_gpt0_base_addr, k_ra8_gpt_channel_count, and k_ra8_gpt_channel_stride.
Referenced by internal_dispatch(), ra8_gpt_capture_configure(), ra8_gpt_capture_read(), ra8_gpt_clear_status(), ra8_gpt_counter_set(), ra8_gpt_dead_time_set(), ra8_gpt_deinit(), ra8_gpt_duty_cycle_set(), ra8_gpt_enter_stop(), ra8_gpt_event_count_configure(), ra8_gpt_get_status(), ra8_gpt_init(), ra8_gpt_period_set(), ra8_gpt_pwm_pin_configure(), ra8_gpt_read(), ra8_gpt_read_dma(), ra8_gpt_set_duty(), ra8_gpt_set_period(), ra8_gpt_start_free_run(), ra8_gpt_stop(), ra8_gpt_three_phase_close(), ra8_gpt_three_phase_open(), ra8_gpt_three_phase_set_duty(), ra8_gpt_write_dma(), ra8_pdg_bind_gpt_channel(), and ra8_pdg_unbind_gpt_channel().