AN 773: Drive-On-Chip Design Example for Intel® MAX® 10 Devices

ID 683072
Date 4/22/2021
Public
Document Table of Contents

6. Motor Control Software

The Drive-on-Chip Design Example motor control software is in C, runs under the Micrium µC/OS-II real-time Operating System on the Nios II processor, and is in two parts.

The BSP is generated from the Qsys system via the .sopcinfo file, which contains a description of the system interconnectivity and module base addresses. The design includes drivers for Nios II peripherals that the Nios II Hardware Abstraction Layer (HAL) supports.

The application program comprises a number of threads handling initialization, status reporting, and communication functions and an Interrupt Service Routine (ISR), triggered by the PWM timebase, which covers the real-time aspects of running the motor control FOC algorithm. The design includes header files and basic drivers for motor control peripherals that the Nios II HAL does not directly support.

Doxygen generated HTML help files are in the software\doxygen directory. Open the index.html file in a browser to view the help files.

For Instructions on how to install doxygen software and generate the HTML help files, refer to "Viewing Motor Control Software Help Files".

Figure 20. Main Program
Figure 21. IRQ Routine

Did you find the information on this page useful?

Characters remaining:

Feedback Message