RA Flexible Software Package Documentation  Release v5.2.0

 
120-degree conduction control sensorless (rm_motor_120_control_sensorless)

Functions

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Open (motor_120_control_ctrl_t *const p_ctrl, motor_120_control_cfg_t const *const p_cfg)
 Opens and configures the motor sensorless 120 detection module. Implements motor_120_control_api_t::open. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Close (motor_120_control_ctrl_t *const p_ctrl)
 Disables specified motor sensorless 120 detection module. Implements motor_120_control_api_t::close. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Run (motor_120_control_ctrl_t *const p_ctrl)
 Run motor (Start motor rotation). Implements motor_120_control_api_t::run. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Stop (motor_120_control_ctrl_t *const p_ctrl)
 Stop motor (Stop motor rotation). Implements motor_120_control_api_t::stop. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Reset (motor_120_control_ctrl_t *const p_ctrl)
 Reset variables of motor sensorless 120 detection module. Implements motor_120_control_api_t::reset. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_SpeedSet (motor_120_control_ctrl_t *const p_ctrl, float const speed_rpm)
 Set speed[rpm]. Implements motor_120_control_api_t::speedSet. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_SpeedGet (motor_120_control_ctrl_t *const p_ctrl, float *const p_speed_rpm)
 Get speed. Implements motor_120_control_api_t::speedGet. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_CurrentGet (motor_120_control_ctrl_t *const p_ctrl, motor_120_driver_current_status_t *const p_current_status)
 Get current. Implements motor_120_control_api_t::currentGet. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_WaitStopFlagGet (motor_120_control_ctrl_t *const p_ctrl, motor_120_control_wait_stop_flag_t *const p_flag)
 Get wait stop flag. Implements motor_120_control_api_t::waitStopFlagGet. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_TimeoutErrorFlagGet (motor_120_control_ctrl_t *const p_ctrl, motor_120_control_timeout_error_flag_t *const p_timeout_error_flag)
 Get timeout error flag. Implements motor_120_control_api_t::timeoutErrorFlagGet. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_PatternErrorFlagGet (motor_120_control_ctrl_t *const p_ctrl, motor_120_control_pattern_error_flag_t *const p_pattern_error_flag)
 Get pattern error flag. Implements motor_120_control_api_t::patternErrorFlagGet. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_VoltageRefGet (motor_120_control_ctrl_t *const p_ctrl, motor_120_control_voltage_ref_t *const p_voltage_ref)
 Get voltage ref. Implements motor_120_control_api_t::voltageRefGet. More...
 
fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_ParameterUpdate (motor_120_control_ctrl_t *const p_ctrl, motor_120_control_cfg_t const *const p_cfg)
 Update the parameters of sensorless 120 detection module. Implements motor_120_control_api_t::parameterUpdate. More...
 

Detailed Description

Calculation process for the motor control on RA MCUs. This module implements the Motor 120-Degree Control Interface.

Overview

The motor current is used to control the electric current of motor rotation in an appication. This module should be called cyclically after the A/D conversion of electric current of each phase in an application. This module calculates each phase voltage with input current reference, electric current and rotor angle.

Features

The motor 120 control sensorless module has below features.

Configuration

Build Time Configurations for rm_motor_120_control_sensorless

The following build time configurations are defined in fsp_cfg/rm_motor_120_control_sensorless_cfg.h:

ConfigurationOptionsDefaultDescription
Parameter Checking
  • Default (BSP)
  • Enabled
  • Disabled
Default (BSP) If selected code for parameter checking is included in the build.

Configurations for Motor > 120-degree conduction control sensorless (rm_motor_120_control_sensorless)

This module can be added to the Stacks tab via New Stack > Motor > 120-degree conduction control sensorless (rm_motor_120_control_sensorless).

ConfigurationOptionsDefaultDescription
General
NameName must be a valid C symbolg_motor_120_control_sensorless0 Module name.
Conduction type
  • First 60 degree PWM
  • Complementary First 60 degree PWM
First 60 degree PWM Select conduction type
Stop BEMFMust be a valid non-negative value.0.5 Value of stop motor BEMF (U+V+W)
Timeout counts (msec)Must be a valid non-negative value.2000 Undetected time
Maximum voltage for BOOT (V)Must be a valid non-negative value.8.0 Maximum output voltage for boot mode (V)
Maximum voltage (V)Must be a valid non-negative value.20.0 Maximum output voltage (V)
Minimum voltage (V)Must be a valid non-negative value.3.0 Minimum output voltage (V)
Carrier frequency (kHz)Must be a valid non-negative value.20.0 PWM carrier frequency (kHz)
Adjusting angleManual Entry0 Adjusting angle
Speed PI decimationMust be a valid non-negative value.1 Speed PI control decimation count
Free run timer frequency (MHz)Must be a valid non-negative value.120 Freerun timer frequency (MHz)
Speed LPF KMust be a valid non-negative value.1.0 Speed LPF parameter
Step of speed changeMust be a valid non-negative value.0.2 Speed reference change step
Boot reference voltage (V)Must be a valid non-negative value.3.0 Voltage reference for boot mode
Voltage lamping timeMust be a valid non-negative value.128 Voltage lamping time
Voltage constant adjust timeMust be a valid non-negative value.64 Voltage constant adjust time value (msec)
Open loop start speed (rpm)Manual Entry150 Open loop start speed (rpm)
Open loop mode2 speed (rpm)Manual Entry185 to mode2 change speed (rpm)
Open loop mode3 speed (rpm)Manual Entry1000 to mode3 change speed (rpm)
Open loop start voltage (V)Must be a valid non-negative value.3.0 start reference voltage (V)
Open loop mode1 speed rateMust be a valid non-negative value.0.25 increase rate of reference speed (rpm/control period)
Open loop mode2 voltage rateMust be a valid non-negative value.0.00285 increase rate of reference voltage (v/control period)
Open loop mode2 speed rateMust be a valid non-negative value.0.71 increase rate of reference speed (rpm/control period)
Open loop mode3 voltage rateMust be a valid non-negative value.0.002 increase rate of reference voltage (v/control period)
Open loop maximum voltage (V)Must be a valid non-negative value.6.5 openloop maximum voltage (V)
PI control KPMust be a valid non-negative value.0.02 PI control gain of proportional term
PI control KIMust be a valid non-negative value.0.004 PI control gain of integral term
PI control limitMust be a valid non-negative value.24.0 PI control limit of integral term
Motor Parameter
Pole pairsMust be a valid non-negative value.2 Pole pairs
Resistance (ohm)Must be a valid non-negative value.6.447 Resistance
Inductance of d-axis (H)Must be a valid non-negative value.0.0045 Inductance of d-axis
Inductance of q-axis (H)Must be a valid non-negative value.0.0045 Inductance of q-axis
Permanent magnetic flux (Wb)Must be a valid non-negative value.0.02159 Permanent magnetic flux
Motor Parameter > Rotor inertia (kgm^2)Must be a valid non-negative value.1.8 Rotor inertia
Interrupts
CallbackName must be a valid C symbolNULL callback function

Clock Configuration

This module doesn't depend on clock setting, because this module is a simple calculation process.

Pin Configuration

This module does not use I/O pins.

Usage Notes

Limitations

Examples

Basic Example

This is a basic example of minimal use of the motor 120 control sensorless in an application.

void motor_120_control_sensorless_basic_example (void)
{
fsp_err_t err = FSP_SUCCESS;
/* Initializes the module. */
err = RM_MOTOR_120_CONTROL_SENSORLESS_Open(g_motor_120_control_sensorless0.p_ctrl,
g_motor_120_control_sensorless0.p_cfg);
assert(FSP_SUCCESS == err);
/* Set speed reference before motor run */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_SpeedSet(g_motor_120_control_sensorless0.p_ctrl,
DEF_120_CONTROL_SENSORLESSHALL_TEST_OVSPD_LIM);
/* Start motor rotation */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_Run(g_motor_120_control_sensorless0.p_ctrl);
/* Get current motor speed */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_SpeedGet(g_motor_120_control_sensorless0.p_ctrl, &smpl_speed);
/* Get current */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_CurrentGet(g_motor_120_control_sensorless0.p_ctrl, &smpl_current_status);
/* Get wait stop flag */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_WaitStopFlagGet(g_motor_120_control_sensorless0.p_ctrl,
&smpl_wait_stop_flag);
/* Get timeout error flag */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_TimeoutErrorFlagGet(g_motor_120_control_sensorless0.p_ctrl,
&smpl_timeout_error_flag);
/* Get pattern error flag */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_PatternErrorFlagGet(g_motor_120_control_sensorless0.p_ctrl,
&smpl_pattern_error_flag);
/* Get voltage ref */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_VoltageRefGet(g_motor_120_control_sensorless0.p_ctrl, &smpl_voltage_ref);
(void) RM_MOTOR_120_CONTROL_SENSORLESS_ParameterUpdate(g_motor_120_control_sensorless0.p_ctrl,
g_motor_120_control_sensorless0.p_cfg);
/* Stop motor rotation */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_Stop(g_motor_120_control_sensorless0.p_ctrl);
/* Reset the process. */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_Reset(g_motor_120_control_sensorless0.p_ctrl);
/* Close the module. */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_Close(g_motor_120_control_sensorless0.p_ctrl);
}

Data Structures

struct  motor_120_control_sensorless_extended_cfg_t
 
struct  motor_120_control_sensorless_instance_ctrl_t
 

Enumerations

enum  motor_120_control_sensorless_draw_in_position_t
 
enum  motor_120_control_sensorless_pattern_change_flag_t
 

Data Structure Documentation

◆ motor_120_control_sensorless_extended_cfg_t

struct motor_120_control_sensorless_extended_cfg_t

Extended configurations for motor 120 control sensorless

Data Fields
float f4_stop_bemf Value of stop motor BEMF (U+V+W)
float f4_max_boot_v Max output voltage for boot mode (V)
float f4_carrier_freq Carrier wave frequency (kHz)
int32_t s4_angle_shift_adjust Adjusting angle.
float f4_boot_ref_v Voltage reference when zero speed (V)
uint32_t u4_v_up_time Voltage lamping time.
uint32_t u4_v_const_time Voltage constant adjust time value (ms)
int32_t s4_ol_start_rpm Start speed (rpm)
int32_t s4_ol_mode1_change_rpm To mode2 change speed (rpm)
int32_t s4_ol_mode2_change_rpm To mode3 change speed (rpm)
float f4_ol_start_refv Start reference voltage (V)
float f4_ol_mode1_rate_rpm Increase rate of reference speed (rpm/control period)
float f4_ol_mode2_rate_refv Increase rate of reference voltage (v/control period)
float f4_ol_mode2_rate_rpm Increase rate of reference speed (rpm/control period)
float f4_ol_mode3_rate_refv Increase rate of reference voltage (v/control period)
float f4_ol_mode3_max_refv Openloop max voltage (V)
motor_120_driver_instance_t
const *
p_motor_120_driver_instance Motor 120 driver access module.
timer_instance_t const * p_speed_cyclic_timer_instance Cyclic process of speed control timer module.
timer_instance_t const * p_speed_calc_timer_instance Speed calculate timer module.

◆ motor_120_control_sensorless_instance_ctrl_t

struct motor_120_control_sensorless_instance_ctrl_t

120 control sensorless instance control block

Data Fields
uint32_t open Used to determine if the channel is configured.
motor_120_control_status_t active Flag to set active/inactive the motor 120 control.
motor_120_control_run_mode_t run_mode Drive mode.
motor_120_control_timeout_error_flag_t timeout_error_flag Timeout error status.
motor_120_control_pattern_error_flag_t pattern_error_flag Bemf pattern error status.
motor_120_control_rotation_direction_t direction Rotational direction (0:CW ,1:CCW)
float f4_ol_pattern_set_calc Counts to change timing of open loop pattern.
float f4_speed_calc_base Base counts to calculate rotation speed.
float f_rpm2rad Translate value to radian/second to rpm.
float f4_v_ref Voltage reference (output of speed PI control)
uint32_t u4_pwm_duty PWM duty.
float f4_ref_speed_rad Motor speed reference.
float f4_ref_speed_rad_ctrl Motor speed reference for speed PI control.
float f4_speed_rad Motor speed.
uint32_t u4_cnt_speed_pi Counter for period of speed PI control.
motor_120_control_wait_stop_flag_t flag_wait_stop Flag for waiting for motor stop.
float f4_vn_ad Neutral voltage.
uint32_t u4_cnt_adj_v Voltage lamping count adjustment.
motor_120_control_sensorless_draw_in_position_t flag_draw_in Status of draw in a initial position.
motor_120_driver_phase_pattern_t v_pattern Voltage pattern.
uint32_t u4_v_pattern_num Selecting pattern number for openloop drive.
uint32_t u4_bemf_signal Pattern of BEMF.
uint32_t u4_pre_bemf_signal Previous pattern of BEMF.
motor_120_control_sensorless_pattern_change_flag_t flag_pattern_change Pattern change flag.
motor_120_control_speed_ref_t flag_speed_ref Speed reference flag.
motor_120_control_voltage_ref_t flag_voltage_ref Voltage reference flag.
uint32_t u4_ol_signal Pattern of BEMF.
uint32_t u4_ol_pattern_set Openloop frequency.
uint32_t u4_cnt_ol_pattern_set Counter for openloop pattern change.
uint32_t u4_cnt_timeout Counter for timeout error.
uint32_t u4_bemf_timer_cnt Value of timer counter.
uint32_t u4_pre_bemf_timer_cnt Previous value of timer counter.
int32_t s4_timer_cnt_ave Counts for 360 degrees.
uint32_t u4_timer_cnt_buf[MOTOR_120_CONTROL_SENSORLESS_TIMES] Counts for 60 degrees.
uint32_t u4_timer_cnt_num Array element number before 360 degrees.
uint32_t u4_cnt_carrier Counter for carrier interrupt.
uint32_t u4_pre_cnt_carrier Previous carrier interrupt count.
uint32_t u4_angle_shift_cnt Shift degrees count.
float f4_pi_ctrl_err PI control error.
float f4_pi_ctrl_refi PI control buffer of integral term.
motor_120_control_cfg_t const * p_cfg Pointer of configuration structure.
timer_direction_t timer_direction Hold timer direction.
timer_callback_args_t timer_args For call timer callbackSet function.

Enumeration Type Documentation

◆ motor_120_control_sensorless_draw_in_position_t

Draw in a initial position

Enumerator
MOTOR_120_CONTROL_SENSORLESS_DRAW_IN_POSITION_INIT 

Inital parameter.

MOTOR_120_CONTROL_SENSORLESS_DRAW_IN_POSITION_1ST_TIME 

Draw in a initial position of the 1st time.

MOTOR_120_CONTROL_SENSORLESS_DRAW_IN_POSITION_2ND_TIME 

Draw in a initial position of the 2nd time.

◆ motor_120_control_sensorless_pattern_change_flag_t

Pattern change

Enumerator
MOTOR_120_CONTROL_SENSORLESS_PATTERN_CHANGE_FLAG_CLEAR 

Inital parameter.

MOTOR_120_CONTROL_SENSORLESS_PATTERN_CHANGE_FLAG_SET 

Voltage pattern change.

Function Documentation

◆ RM_MOTOR_120_CONTROL_SENSORLESS_Open()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Open ( motor_120_control_ctrl_t *const  p_ctrl,
motor_120_control_cfg_t const *const  p_cfg 
)

Opens and configures the motor sensorless 120 detection module. Implements motor_120_control_api_t::open.

Example:

/* Initializes the module. */
err = RM_MOTOR_120_CONTROL_SENSORLESS_Open(g_motor_120_control_sensorless0.p_ctrl,
g_motor_120_control_sensorless0.p_cfg);
Return values
FSP_SUCCESSMotor driver successfully configured.
FSP_ERR_ASSERTIONNull pointer, or one or more configuration options is invalid.
FSP_ERR_ALREADY_OPENModule is already open. This module can only be opened once.
FSP_ERR_INVALID_ARGUMENTInput parameter error.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_Close()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Close ( motor_120_control_ctrl_t *const  p_ctrl)

Disables specified motor sensorless 120 detection module. Implements motor_120_control_api_t::close.

Example:

/* Close the module. */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_Close(g_motor_120_control_sensorless0.p_ctrl);
Return values
FSP_SUCCESSSuccessfully closed.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_Run()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Run ( motor_120_control_ctrl_t *const  p_ctrl)

Run motor (Start motor rotation). Implements motor_120_control_api_t::run.

Example:

/* Start motor rotation */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_Run(g_motor_120_control_sensorless0.p_ctrl);
Return values
FSP_SUCCESSSuccessfully resetted.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_Stop()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Stop ( motor_120_control_ctrl_t *const  p_ctrl)

Stop motor (Stop motor rotation). Implements motor_120_control_api_t::stop.

Example:

/* Stop motor rotation */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_Stop(g_motor_120_control_sensorless0.p_ctrl);
Return values
FSP_SUCCESSSuccessfully resetted.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_Reset()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_Reset ( motor_120_control_ctrl_t *const  p_ctrl)

Reset variables of motor sensorless 120 detection module. Implements motor_120_control_api_t::reset.

Example:

/* Reset the process. */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_Reset(g_motor_120_control_sensorless0.p_ctrl);
Return values
FSP_SUCCESSSuccessfully reset.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_SpeedSet()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_SpeedSet ( motor_120_control_ctrl_t *const  p_ctrl,
float const  speed_rpm 
)

Set speed[rpm]. Implements motor_120_control_api_t::speedSet.

Example:

/* Set speed reference before motor run */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_SpeedSet(g_motor_120_control_sensorless0.p_ctrl,
DEF_120_CONTROL_SENSORLESSHALL_TEST_OVSPD_LIM);
Return values
FSP_SUCCESSSuccessfully resetted.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_SpeedGet()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_SpeedGet ( motor_120_control_ctrl_t *const  p_ctrl,
float *const  p_speed_rpm 
)

Get speed. Implements motor_120_control_api_t::speedGet.

Example:

/* Get current motor speed */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_SpeedGet(g_motor_120_control_sensorless0.p_ctrl, &smpl_speed);
Return values
FSP_SUCCESSSuccessfully resetted.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter error.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_CurrentGet()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_CurrentGet ( motor_120_control_ctrl_t *const  p_ctrl,
motor_120_driver_current_status_t *const  p_current_status 
)

Get current. Implements motor_120_control_api_t::currentGet.

Example:

/* Get current */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_CurrentGet(g_motor_120_control_sensorless0.p_ctrl, &smpl_current_status);
Return values
FSP_SUCCESSSuccessfully resetted.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter error.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_WaitStopFlagGet()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_WaitStopFlagGet ( motor_120_control_ctrl_t *const  p_ctrl,
motor_120_control_wait_stop_flag_t *const  p_flag 
)

Get wait stop flag. Implements motor_120_control_api_t::waitStopFlagGet.

Example:

/* Get wait stop flag */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_WaitStopFlagGet(g_motor_120_control_sensorless0.p_ctrl,
&smpl_wait_stop_flag);
Return values
FSP_SUCCESSSuccessfully resetted.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter error.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_TimeoutErrorFlagGet()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_TimeoutErrorFlagGet ( motor_120_control_ctrl_t *const  p_ctrl,
motor_120_control_timeout_error_flag_t *const  p_timeout_error_flag 
)

Get timeout error flag. Implements motor_120_control_api_t::timeoutErrorFlagGet.

Example:

/* Get timeout error flag */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_TimeoutErrorFlagGet(g_motor_120_control_sensorless0.p_ctrl,
&smpl_timeout_error_flag);
Return values
FSP_SUCCESSSuccessfully resetted.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter error.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_PatternErrorFlagGet()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_PatternErrorFlagGet ( motor_120_control_ctrl_t *const  p_ctrl,
motor_120_control_pattern_error_flag_t *const  p_pattern_error_flag 
)

Get pattern error flag. Implements motor_120_control_api_t::patternErrorFlagGet.

Example:

/* Get pattern error flag */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_PatternErrorFlagGet(g_motor_120_control_sensorless0.p_ctrl,
&smpl_pattern_error_flag);
Return values
FSP_SUCCESSSuccessfully resetted.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter error.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_VoltageRefGet()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_VoltageRefGet ( motor_120_control_ctrl_t *const  p_ctrl,
motor_120_control_voltage_ref_t *const  p_voltage_ref 
)

Get voltage ref. Implements motor_120_control_api_t::voltageRefGet.

Example:

/* Get voltage ref */
(void) RM_MOTOR_120_CONTROL_SENSORLESS_VoltageRefGet(g_motor_120_control_sensorless0.p_ctrl, &smpl_voltage_ref);
Return values
FSP_SUCCESSSuccessfully resetted.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter error.

◆ RM_MOTOR_120_CONTROL_SENSORLESS_ParameterUpdate()

fsp_err_t RM_MOTOR_120_CONTROL_SENSORLESS_ParameterUpdate ( motor_120_control_ctrl_t *const  p_ctrl,
motor_120_control_cfg_t const *const  p_cfg 
)

Update the parameters of sensorless 120 detection module. Implements motor_120_control_api_t::parameterUpdate.

Example:

(void) RM_MOTOR_120_CONTROL_SENSORLESS_ParameterUpdate(g_motor_120_control_sensorless0.p_ctrl,
g_motor_120_control_sensorless0.p_cfg);
Return values
FSP_SUCCESSSuccessfully data was updated.
FSP_ERR_ASSERTIONNull pointer.
FSP_ERR_NOT_OPENModule is not open.
FSP_ERR_INVALID_ARGUMENTInput parameter error.