Renesas RA6T2 Application Note page 33

Vector control for permanent magnetic synchronous motor with encoder - ab incremental type encoder
Hide thumbs Also See for RA6T2:
Table of Contents

Advertisement

RA6T2
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder
Table 3-6 List of Functions Executed in 50[µs] Period Interrupt (1/4)
File name
mtr_main.c
rm_motor_encoder.c
rm_motor_driver.c
R01AN6208EJ0101 Rev.1.01
Oct 18, 2022
Function name
mtr_callback_event0
Input : (motor_encoder_callback_args_t *) p_args
/ Callback argument
Output : None
rm_motor_encoder_current_callback
Input : (motor_current_callback_args_t *) p_args
/ Callback argument
Output :None
RM_MOTOR_ENCODER_ErrorCheck
Input : (motor_ctrl_t * const) p_ctrl / Pointer to control structure.
(uint16_t * const) p_error / Pointer to get occured error
Output : fsp_err_t / Execution result
rm_motor_encoder_copy_speed_current
Input : (motor_speed_output_t *) st_output / Pointer to the structure of
Speed Control output
(motor_current_input_t *) st_input / Pointer to the structure of Current
Control input
Output :None
rm_motor_driver_cyclic
Input : (adc_callback_args_t *) p_args
/ Callback argument
Output :None
rm_motor_driver_current_get
Input : (motor_driver_instance_ctrl_t *) p_ctrl / The pointer to the motor
driver module instance
Output :None
RM_MOTOR_DRIVER_FlagCurrentOffsetGet
Input : (motor_driver_ctrl_t * const) p_ctrl / Pointer to control structure
(uint8_t * const) p_flag_offset / Flag of finish current offset detection
Output : fsp_err_t / Execution result
RM_MOTOR_DRIVER_PhaseVoltageSet
Input : (motor_driver_ctrl_t * const) p_ctrl / Pointer to control structure
(float const) u_voltage / U phase voltage
(float const) v_voltage / V phase voltage
(float const) w_voltage / W phase voltage
Output : fsp_err_t / Execution result
rm_motor_driver_modulation
Input : (motor_driver_instance_ctrl_t *) p_ctrl / The pointer to the motor
driver module instance
Output :None
Process overview
Encoder control callback
function
Set the speed control
output to the current
control input
Check the occurrence of
Error.
Copy speed output data
to current input data
Motor driver callback
function
Get A/D converted data
(Phase Current & Main
Line Voltage)
Measure current offset
values
Set Phase Voltage Data
to calculate PWM duty.
Perform PWM modulation
Page 33 of 71

Advertisement

Table of Contents
loading

Table of Contents