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

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

8.2. Software Application Configuration Files

You can modify the operation of the software application for the Drive-On-Chip Design Example by editing some C source code and header files.
Table 11.  Software Application Configuration Files
File Path Function
demo_cfg.c . Declare motors[] Array
demo_cfg.h . Configuration macros and include file for demo_cfg.c
motor_types.c Platform/motors Declares motor types and encoders
motor_types.h Platform/motors Defines motor and encoder types and include file for motor_types.c
Table 12.  Configuration MacrosThis table lists the configuration macros that you can use to configure the design in demo_cfg.h.
Macro Default State Range Function
FIRST_MULTI_AXIS 0 0 - 1 Index of first motor axis to be controlled.
LAST_MULTI_AXIS 1 0 - 1 Index of last motor axis to be controlled.
DEFAULT_ADC_TYPE ADC_TYPE_SIGMA_DELTA ADC_TYPE_SIGMA_DELTA Use sigma delta ADC samples in control loop.
SD_ADC_FILTER ADC_D_10US ADC_D_10US Sinc3filter delay 10us.
ADC_D_20US Sinc3filter delay 20us.
DC_LINK_STARTUP_TARGET_VOLTS 32 12 - 48 Target voltage for DC-DC converter.
OPEN_LOOP_INIT 0 0 Start motors in closed loop mode.
1 Start motors in open loop mode.
INTERACTIVE_START 0 0 Normal startup 1:
1 User prompted via terminal emulator console at each stage of startup
ENCODER_SERVICE Undefined Undefined Normal operation.
DBG_DEFAULT DBG_INFO DBG_NEVER No console output.
DBG_ALWAYS Always output.
DBG_FATAL Debug level set to fatal errors .
DBG_ERROR Debug level set to nonfatal errors and above .
DBG_WARN Debug level set to warnings and above .
DBG_INFO Debug level set to information and above .
DBG_PERF Debug level set to performance data and above .
DBG_DEBUG Debug level set to debug messages and above .
DBG_DEBUG_MORE Debug level set to more debug messages and above .
DBG_ALL Debug level set to all messages.

Did you find the information on this page useful?

Characters remaining:

Feedback Message