This is the readme file for the firmware project of board REF_36V_220W_SLFOC.
- Generic motor control with speed control scheme
- Robotic wheel application with position control scheme
- Equation based stall detection
- High efficiency
- Compact design
- High power density
An external debugger must be connected to the board for
- debugging/programming
- GUI demonstration
XMC Link is validated and is suggested as the external debugger.
- Use the first 4 pins of the 10-pin connector to connect to the board connector.
A planetary gear motor Z42BLDPN is used for testing. Connect the motor terminals (U, V and W) to the board inverter output.
Some motor parameters should be modified in the firmware if a different motor is used.
Tool | Version | Description |
---|---|---|
Infineon Developer Center | 2024.8.0 | One stop shop for engineers for downloading and design-in of all Infineon development tools, embedded software, services and solutions |
ModusToolbox | 3.2.0.16028 | A modern, extensible development ecosystem supporting a wide range of Infineon microcontroller devices. It can be downloaded from “Infineon Developer Center” |
Micriμm μC/Probe XMC | 4.3.0.90 | A Windows application designed to read and write the memory of the controller during run-time. In this project it is used to run the motor and read the status |
J-Link | 7.96d | The widely used line of debug probes. It is used for debug/programming and communication between the PC and the board |
The firmware is shared via GitHub.
- Access to the repository with this link
- Clone or download the firmware
- Run ModusToolbox
- Create a new workspace or use an existing workspace
- Create a new application: File-> New-> ModusToolbos Application
- “Project Creator” pops up
- Choose the “Board Support Package (BSP)”. Select “EVAL_IMD700A_FOC_3SH”, as the REF board is based on this EVAL board
- Click on “Next”
- Click on “Browse for Application”
- Then select the application code in the package as the template application
- The imported application can be found in the “Import” drop-down menu. A new application name can be assigned.
- The new project will be created by clicking on the “Create” button.
- After the project is created, “mtb_shared” and the application example can be found on the “Project Explorer”.
-
The most important parameters are defined in the header file
PMSM_FOC\Configuration\pmsm_foc_user_input_config_xxx.h
. _xxx is for differentiating the configurations for different motors. The motor for this project is defined in the filePMSM_FOC\Configuration\pmsm_foc_user_input_config.h
. -
If a different motor is used, the parameters in the motor group should be modified.
-
Other parameters (e.g. control loops) in the header file should be modified if necessary.
- Build the project
- Debug the project
- Click on “Resume” to run the project
Micriμm μC/Probe XMC is used for demonstration and control of the motor. The layout of the GUI is designed for the robotic wheel drive application with this specific motor.
- If the motor parameters (e.g. the pole-pair number, the gear ratio…) is changed, the scaling in the GUI may need to be changed in order to display the values correctly.
- Open the configuration file
DEMO_GUI_uC-Probe.wspx
.- The file can be found in the GUI folder of the firmware package.
- Load the ELF file
mtb-example-xmc-foc-3-shunt.elf
.- The file can be found in the location
build/APP_EVAL_IMD700A_FOC_3SH/Debug/mtb-example-xmc-foc-3-shunt.elf
. - If there is an existing “.elf” file in the “All Symbols” window, remove it before loading your own “.elf” file.
- The file can be found in the location
- Click on “Run” button to connect the GUI with the board.
- Speed reference setting
- Motor RUN/STOP
- Demo examples demonstrate position control automatically
- Clear the fault if there is a fault by mistake