SPRUJ26A September 2021 – April 2024
The general structure of the project is shown in Figure 3-20. The device peripherals configuration is based on C2000Ware driverlib. The user only needs to change the code and definitions in the hal.c and hal.h files, and the parameters in the user_mtr1.h file, if they want to migrate the reference design software to their own custom board or to a different C2000 device.
Once the project is imported into CCS, the project explorer will appear inside CCS as shown in Figure 3-21.
The src_foc folder includes the typical FOC modules including Park, Clark, and inverse Park and Clark transforms, PID, and estimators that consist of the motor drive algorithm and are independent of specific devices or boards.
The src_lib folder includes the InstaSPIN-FOC library and math library that is not specific to any particular device or board.
The src_control folder includes motor drive control files that call motor control core algorithm functions within the interrupt service routines and background tasks.
The src_sys folder includes some files reserved for system control that are independent of specific devices or boards. The user can add their own code for system control, communication, and so forth.
Board-specific, motor-specific and device-specific files are in the src_board folder. These files consist of device specific drivers to run the solution. If the user wants to migrate the project for their own board or to other C2000 devices, the user only needs to make changes to the hal.c, hal.h, and user_mtr1.h files based on the usage of device peripherals for the board.