• The available APIs for the PWM are:
—
mcdrv_pwma_pwm3ph_t
—MCDRV PWM structure data type.
—
void M1_MCDRV_PWM_PERIPH_INIT
—this function is by default called during the PWM periphery initialization
procedure invoked by the
MCDRV_Init_M1()
function.
—
void M1_MCDRV_PWM3PH_SET(mcdrv_pwma_pwm3ph_t*)
—this function updates the PWM phase duty cycles.
—
void M1_MCDRV_PWM3PH_EN(mcdrv_pwma_pwm3ph_t*)
—this function enables all PWM channels.
—
void M1_MCDRV_PWM3PH_DIS (mcdrv_pwma_pwm3ph_t*)
—this function disables all PWM channels.
—
bool_t M1_MCDRV_PWM3PH_FLT_GET(mcdrv_pwma_pwm3ph_t*)
—this function returns the state of the over-
current fault flags and automatically clears the flags (if set). This function returns true when an over-current event occurs.
Otherwise, it returns false.
• The available APIs for the quadrature encoder are:
—
mcdrv_qd_enc_t
—MCDRV QD structure data type.
—
void M1_MCDRV_QD_PERIPH_INIT()
—this function is by default called during the QD periphery initialization
procedure invoked by the
MCDRV_Init_M1()
function.
—
void M1_MCDRV_QD_GET(mcdrv_qd_enc_t*)
—this function returns the actual position and speed.
—
void M1_MCDRV_QD_SET_DIRECTION(mcdrv_qd_enc_t*)
—this function sets the direction of the
quadrature encoder.
—
void M1_MCDRV_QD_CLEAR(mcdrv_qd_enc_t*)
—this function clears the internal variables and decoder counter.
NXP Semiconductors
Motor-control peripheral initialization
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC motors, Rev. 0, 01/2022
User Guide
19 / 50