RA Flexible Software Package Documentation
Release v5.5.0
|
|
Interface for motor driver functions.
The Motor driver interface for setting the PWM modulation duty
Data Structures | |
struct | motor_driver_callback_args_t |
struct | motor_driver_current_get_t |
struct | motor_driver_cfg_t |
struct | motor_driver_api_t |
struct | motor_driver_instance_t |
Typedefs | |
typedef void | motor_driver_ctrl_t |
Enumerations | |
enum | motor_driver_event_t |
enum | motor_driver_shunt_type_t |
struct motor_driver_callback_args_t |
Callback function parameter data
Data Fields | ||
---|---|---|
motor_driver_event_t | event | Event trigger. |
void const * | p_context | Placeholder for user data. |
struct motor_driver_current_get_t |
struct motor_driver_cfg_t |
Configuration parameters.
Data Fields | |
adc_channel_t | iu_ad_ch |
A/D Channel for U Phase Current. | |
adc_channel_t | iv_ad_ch |
A/D Channel for V Phase Current. | |
adc_channel_t | iw_ad_ch |
A/D Channel for W Phase Current. | |
adc_channel_t | vdc_ad_ch |
A/D Channel for Main Line Voltage. | |
adc_channel_t | sin_ad_ch |
A/D Channel for induction sensor sin signal. | |
adc_channel_t | cos_ad_ch |
A/D Channel for induction sensor cos signal. | |
motor_driver_shunt_type_t | shunt |
Selection of shunt type. | |
void const * | p_context |
Placeholder for user data. | |
struct motor_driver_api_t |
Functions implemented at the HAL layer will follow these APIs.
Data Fields | |
fsp_err_t(* | open )(motor_driver_ctrl_t *const p_ctrl, motor_driver_cfg_t const *const p_cfg) |
fsp_err_t(* | close )(motor_driver_ctrl_t *const p_ctrl) |
fsp_err_t(* | reset )(motor_driver_ctrl_t *const p_ctrl) |
fsp_err_t(* | phaseVoltageSet )(motor_driver_ctrl_t *const p_ctrl, float const u_voltage, float const v_voltage, float const w_voltage) |
fsp_err_t(* | currentGet )(motor_driver_ctrl_t *const p_ctrl, motor_driver_current_get_t *const p_current_get) |
fsp_err_t(* | flagCurrentOffsetGet )(motor_driver_ctrl_t *const p_ctrl, uint8_t *const p_flag_offset) |
fsp_err_t(* | currentOffsetRestart )(motor_driver_ctrl_t *const p_ctrl) |
fsp_err_t(* | parameterUpdate )(motor_driver_ctrl_t *const p_ctrl, motor_driver_cfg_t const *const p_cfg) |
fsp_err_t(* motor_driver_api_t::open) (motor_driver_ctrl_t *const p_ctrl, motor_driver_cfg_t const *const p_cfg) |
Initialize the Motor Driver Module.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure. |
fsp_err_t(* motor_driver_api_t::close) (motor_driver_ctrl_t *const p_ctrl) |
Close the Motor Driver Module
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_driver_api_t::reset) (motor_driver_ctrl_t *const p_ctrl) |
Reset variables of the Motor Driver Module
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_driver_api_t::phaseVoltageSet) (motor_driver_ctrl_t *const p_ctrl, float const u_voltage, float const v_voltage, float const w_voltage) |
Set (Input) Phase Voltage data into the Motor Driver Module
[in] | p_ctrl | Pointer to control structure. |
[in] | u_voltage | U phase voltage [V] |
[in] | v_voltage | V phase voltage [V] |
[in] | w_voltage | W phase voltage [V] |
fsp_err_t(* motor_driver_api_t::currentGet) (motor_driver_ctrl_t *const p_ctrl, motor_driver_current_get_t *const p_current_get) |
Get Phase current, Vdc and Va_max data from the Motor Driver Module
[in] | p_ctrl | Pointer to control structure. |
[out] | p_current_get | Pointer to get data structure. |
fsp_err_t(* motor_driver_api_t::flagCurrentOffsetGet) (motor_driver_ctrl_t *const p_ctrl, uint8_t *const p_flag_offset) |
Get the flag of finish current offset detection from the Motor Driver Module
[in] | p_ctrl | Pointer to control structure. |
[out] | p_flag_offset | Flag of finish current offset detection |
fsp_err_t(* motor_driver_api_t::currentOffsetRestart) (motor_driver_ctrl_t *const p_ctrl) |
Restart current offset detection
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_driver_api_t::parameterUpdate) (motor_driver_ctrl_t *const p_ctrl, motor_driver_cfg_t const *const p_cfg) |
Update Configuration Parameters for the calculation in the Motor Driver Module
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure include update parameters. |
struct motor_driver_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
motor_driver_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
motor_driver_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
motor_driver_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void motor_driver_ctrl_t |
Control block. Allocate an instance specific control block to pass into the API calls.
enum motor_driver_event_t |