![]() |
RZT Flexible Software Package Documentation
Release v2.3.0
|
|
Interface for three-phase timer functions.
The Three-Phase interface provides functionality for synchronous start/stop/reset control of three timer channels for use in 3-phase motor control applications.
Data Structures | |
struct | three_phase_duty_cycle_t |
struct | three_phase_cfg_t |
struct | three_phase_api_t |
struct | three_phase_instance_t |
Typedefs | |
typedef void | three_phase_ctrl_t |
Enumerations | |
enum | three_phase_channel_t |
enum | three_phase_buffer_mode_t |
struct three_phase_duty_cycle_t |
Struct for passing duty cycle values to three_phase_api_t::dutyCycleSet
struct three_phase_cfg_t |
User configuration structure, used in open function
Data Fields | ||
---|---|---|
three_phase_buffer_mode_t | buffer_mode | Single or double-buffer mode. |
timer_instance_t const * | p_timer_instance[3] | Pointer to the timer instance structs. |
three_phase_channel_t | callback_ch | Channel to enable callback when using three_phase_api_t::callbackSet. |
uint32_t | channel_mask | Bitmask of timer channels used by this module. |
void const * | p_context |
Placeholder for user data. Passed to the user callback in timer_callback_args_t. |
void const * | p_extend | Extension parameter for hardware specific settings. |
struct three_phase_api_t |
Three-Phase API structure.
Data Fields | |
fsp_err_t(* | open )(three_phase_ctrl_t *const p_ctrl, three_phase_cfg_t const *const p_cfg) |
fsp_err_t(* | start )(three_phase_ctrl_t *const p_ctrl) |
fsp_err_t(* | stop )(three_phase_ctrl_t *const p_ctrl) |
fsp_err_t(* | reset )(three_phase_ctrl_t *const p_ctrl) |
fsp_err_t(* | dutyCycleSet )(three_phase_ctrl_t *const p_ctrl, three_phase_duty_cycle_t *const p_duty_cycle) |
fsp_err_t(* | callbackSet )(three_phase_ctrl_t *const p_ctrl, void(*p_callback)(timer_callback_args_t *), void const *const p_context, timer_callback_args_t *const p_callback_memory) |
fsp_err_t(* | close )(three_phase_ctrl_t *const p_ctrl) |
fsp_err_t(* three_phase_api_t::open) (three_phase_ctrl_t *const p_ctrl, three_phase_cfg_t const *const p_cfg) |
Initial configuration.
[in] | p_ctrl | Pointer to control block. Must be declared by user. Elements set here. |
[in] | p_cfg | Pointer to configuration structure. All elements of this structure must be set by user. |
fsp_err_t(* three_phase_api_t::start) (three_phase_ctrl_t *const p_ctrl) |
Start all three timers synchronously.
[in] | p_ctrl | Control block set in three_phase_api_t::open call for this timer. |
fsp_err_t(* three_phase_api_t::stop) (three_phase_ctrl_t *const p_ctrl) |
Stop all three timers synchronously.
[in] | p_ctrl | Control block set in three_phase_api_t::open call for this timer. |
fsp_err_t(* three_phase_api_t::reset) (three_phase_ctrl_t *const p_ctrl) |
Reset all three timers synchronously.
[in] | p_ctrl | Control block set in three_phase_api_t::open call for this timer. |
fsp_err_t(* three_phase_api_t::dutyCycleSet) (three_phase_ctrl_t *const p_ctrl, three_phase_duty_cycle_t *const p_duty_cycle) |
Sets the duty cycle match values. If the timer is counting, the updated duty cycle is reflected after the next timer expiration.
[in] | p_ctrl | Control block set in three_phase_api_t::open call for this timer. |
[in] | p_duty_cycle | Duty cycle values for all three timer channels. |
fsp_err_t(* three_phase_api_t::callbackSet) (three_phase_ctrl_t *const p_ctrl, void(*p_callback)(timer_callback_args_t *), void const *const p_context, timer_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
[in] | p_ctrl | Control block set in three_phase_api_t::open call. |
[in] | p_callback | Callback function to register with GPT U-channel |
[in] | p_context | Pointer to send to callback function |
[in] | p_working_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
fsp_err_t(* three_phase_api_t::close) (three_phase_ctrl_t *const p_ctrl) |
Allows driver to be reconfigured and may reduce power consumption.
[in] | p_ctrl | Control block set in three_phase_api_t::open call for this timer. |
struct three_phase_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
three_phase_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
three_phase_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
three_phase_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void three_phase_ctrl_t |
Three-Phase control block. Allocate an instance specific control block to pass into the timer API calls.