•
mdk
—for the uVision Keil IDE.
•
m1_pmsm_appconfig.h
—contains the definitions of constants for the application control processes, parameters of the motor
and regulators, and the constants for other vector-control-related algorithms. When you tailor the application for a different
motor using the Motor Control Application Tuning (MCAT) tool, the tool generates this file at the end of the tuning process.
•
main.c
—contains the basic application initialization (enabling interrupts), subroutines for accessing the MCU peripherals, and
interrupt service routines. The FreeMASTER communication is performed in the background infinite loop.
•
board.c
—contains the functions for the UART, GPIO, and SysTick initialization.
•
board.h
—contains the definitions of the board LEDs, buttons, UART instance used for FreeMASTER, and so on.
•
clock_config.c and .h
—contains the CPU clock setup functions. These files are going to be generated by the clock tool in
the future.
•
mc_periph_init.c
—contains the motor-control driver peripherals initialization functions that are specific for the board and
MCU used.
•
mc_periph_init.h
—header file for
mc_periph_init.c
. This file contains the macros for changing the PWM period and the ADC
channels assigned to the phase currents and board voltage.
•
freemaster_cfg.h
—the FreeMASTER configuration file containing the FreeMASTER communication and features setup.
•
pin_mux and .h
—port configuration files. It is recommended to generate these files in the pin tool.
•
peripherals.c and .h
—MCUXpresso Config Tool configuration files.
The main motor-control folder
pack_motor_imxrt10xx\middleware\motor_control\
contains these subfolders:
•
pmsm
—contains main PMSM motor-control functions
•
freemaster
—contains the FreeMASTER project file
pmsm_float_enc.pmp
. Open this file in the FreeMASTER tool and use it
to control the application. The folder also contains the auxiliary files for the MCAT tool.
The
pack_motor_imxrt1xxx\middleware\motor_control\pmsm\pmsm_float\
folder contains these subfolders common to the other
motor-control projects:
•
mc_algorithms
—contains the main control algorithms used to control the FOC and speed control loop.
•
mc_cfg_template
—contains templates for MCUXpresso Config Tool components.
•
mc_drivers
—contains the source and header files used to initialize and run motor-control applications.
•
mc_identification
—contains the source code for the automated parameter-identification routines of the motor.
•
mc_state_machine
—contains the software routines that are executed when the application is in a particular state or
state transition.
•
state_machine
—contains the state machine functions for the FAULT, INITIALIZATION, STOP, and RUN states.
NXP Semiconductors
Project file and IDE workspace structure
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC motors, Rev. 0, 01/2022
User Guide
16 / 50