AN 669: Drive-On-Chip Design Example for Cyclone V Devices

ID 683466
Date 5/15/2022
Public
Document Table of Contents

8. 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 main program covers the initialization, status reporting, and communication functions. The ISR covers the real-time aspects of running the motor control FOC algorithm. The system.h header file is generated from the Qsys system via the .sopcinfofile, which contains a description of the system interconnectivity and module base addresses.

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 21. Main Program
Figure 22. IRQ Routine