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

Configuration descriptor for ra8_gpt_three_phase_open. More...

#include <ra8_gpt.h>

Data Fields

uint8_t channels [k_ra8_gpt_three_phase_count]
 U/V/W ch ids.
ra8_gpt_mode_t mode
 Triangle/saw.
ra8_gpt_prescaler_t prescaler
 Clock div.
uint32_t period_counts
 Shared GTPR.
uint32_t initial_duty_u
 Initial duty U.
uint32_t initial_duty_v
 Initial duty V.
uint32_t initial_duty_w
 Initial duty W.

Detailed Description

Configuration descriptor for ra8_gpt_three_phase_open.

Mirrors FSP three_phase_cfg_t from fsp/ra/fsp/inc/api/r_three_phase_api.h. The driver opens the three GPT channels listed in channels (typically GPT0/GPT1/GPT2) with a shared period_counts and identical base_cfg mode and prescaler so they form a phase-synchronized motor inverter. The three channels are armed via the same GTSTR write so they start on the same PCLKD edge.

Each member is read inside ra8_gpt_three_phase_open in libs/ra8_hal/src/ra8_gpt.c.

Definition at line 238 of file ra8_gpt.h.

Field Documentation

◆ channels

uint8_t ra8_gpt_three_phase_cfg_t::channels[k_ra8_gpt_three_phase_count]

U/V/W ch ids.

Definition at line 239 of file ra8_gpt.h.

Referenced by internal_three_phase_init_subs(), and ra8_gpt_three_phase_open().

◆ initial_duty_u

uint32_t ra8_gpt_three_phase_cfg_t::initial_duty_u

Initial duty U.

Definition at line 243 of file ra8_gpt.h.

Referenced by internal_three_phase_init_subs().

◆ initial_duty_v

uint32_t ra8_gpt_three_phase_cfg_t::initial_duty_v

Initial duty V.

Definition at line 244 of file ra8_gpt.h.

Referenced by internal_three_phase_init_subs().

◆ initial_duty_w

uint32_t ra8_gpt_three_phase_cfg_t::initial_duty_w

Initial duty W.

Definition at line 245 of file ra8_gpt.h.

Referenced by internal_three_phase_init_subs().

◆ mode

ra8_gpt_mode_t ra8_gpt_three_phase_cfg_t::mode

Triangle/saw.

Definition at line 240 of file ra8_gpt.h.

Referenced by internal_three_phase_init_subs().

◆ period_counts

uint32_t ra8_gpt_three_phase_cfg_t::period_counts

Shared GTPR.

Definition at line 242 of file ra8_gpt.h.

Referenced by internal_three_phase_init_subs().

◆ prescaler

ra8_gpt_prescaler_t ra8_gpt_three_phase_cfg_t::prescaler

Clock div.

Definition at line 241 of file ra8_gpt.h.

Referenced by internal_three_phase_init_subs().


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