Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/xcore/sw_motor_control
Browse files Browse the repository at this point in the history
  • Loading branch information
Huw Geddes committed Jan 6, 2012
2 parents c8cd4a2 + ad81c7d commit 880c560
Show file tree
Hide file tree
Showing 24 changed files with 598 additions and 192 deletions.
235 changes: 211 additions & 24 deletions .cproject

Large diffs are not rendered by default.

150 changes: 74 additions & 76 deletions .project
@@ -1,78 +1,76 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>sw_motor_control</name>
<comment />
<projects>
<project>sc_can</project>
<project>sc_ethernet</project>
<project>sc_pwm</project>
<project>sc_xtcp</project>
</projects>
<buildSpec>
<buildCommand>
<name>com.xmos.cdt.core.SrcCheckerBuilder</name>
<arguments />
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value />
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value>CONFIG=Debug</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>xmake</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>false</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments />
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>com.xmos.cdt.core.XdeProjectNature</nature>
</natures>
<name>sw_motor_control</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.xmos.cdt.core.SrcCheckerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value>CONFIG=Debug</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>xmake</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>false</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>com.xmos.cdt.core.XdeProjectNature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions app_basic_bldc/Makefile
Expand Up @@ -21,6 +21,7 @@ APP_NAME =
XCC_FLAGS = -O3 -g -report -Wno-timing
#-lxscope

XCC_FLAGS_Debug = $(XCC_FLAGS)

# The USED_MODULES variable lists other module used by the application.

Expand All @@ -30,6 +31,7 @@ USED_MODULES += module_pwm_singlebit_bldc

USE_XTCP_MAC_CUSTOM_FILTER = 1

XCC_FLAGS_Release = $(XCC_FLAGS)

#=============================================================================
# The following part of the Makefile includes the common build infrastructure
Expand Down
2 changes: 2 additions & 0 deletions app_basic_bldc/src/ethernet_conf.h
Expand Up @@ -25,6 +25,8 @@
#define MII_RX_BUFSIZE 512
#define MII_TX_BUFSIZE 512

#define ETHERNET_MAX_TX_PACKET_SIZE 256

#define MAX_ETHERNET_CLIENTS (1)


Expand Down
2 changes: 2 additions & 0 deletions app_control_board_demo/Makefile
Expand Up @@ -30,6 +30,8 @@ USED_MODULES += module_dsc_qei module_dsc_adc module_pwm_symmetrical module_pwm_

USE_XTCP_MAC_CUSTOM_FILTER = 1

XCC_FLAGS_Debug = $(XCC_FLAGS)
XCC_FLAGS_Release = $(XCC_FLAGS)

#=============================================================================
# The following part of the Makefile includes the common build infrastructure
Expand Down
2 changes: 2 additions & 0 deletions app_control_board_demo/src/ethernet_conf.h
Expand Up @@ -25,6 +25,8 @@
#define MII_RX_BUFSIZE 512
#define MII_TX_BUFSIZE 512

#define ETHERNET_MAX_TX_PACKET_SIZE 256

#define MAX_ETHERNET_CLIENTS (1)


Expand Down
2 changes: 2 additions & 0 deletions app_control_board_test/Makefile
Expand Up @@ -25,6 +25,8 @@ XCC_FLAGS = -O3 -g

USED_MODULES = module_dsc_display

XCC_FLAGS_Debug = $(XCC_FLAGS)
XCC_FLAGS_Release = $(XCC_FLAGS)

#=============================================================================
# The following part of the Makefile includes the common build infrastructure
Expand Down
2 changes: 2 additions & 0 deletions app_dsc_demo/Makefile
Expand Up @@ -29,6 +29,8 @@ USED_MODULES += module_dsc_qei module_dsc_adc module_pwm_symmetrical module_pwm_

USE_XTCP_MAC_CUSTOM_FILTER = 1

XCC_FLAGS_Debug = $(XCC_FLAGS)
XCC_FLAGS_Release = $(XCC_FLAGS)

#=============================================================================
# The following part of the Makefile includes the common build infrastructure
Expand Down
2 changes: 2 additions & 0 deletions app_dsc_demo/src/ethernet_conf.h
Expand Up @@ -22,6 +22,8 @@
#define MII_RX_BUFSIZE 512
#define MII_TX_BUFSIZE 512

#define ETHERNET_MAX_TX_PACKET_SIZE 256

#define MAX_ETHERNET_CLIENTS (1)


Expand Down
4 changes: 2 additions & 2 deletions app_dsc_demo/src/motor/inner_loop.xc
Expand Up @@ -137,10 +137,10 @@ void run_motor ( chanend? c_in, chanend? c_out, chanend c_pwm, streaming chanend

/* Position and speed as measured by the QEI */
unsigned theta = 0, valid = 0;
int speed = 100;
int speed = 1000;

// Demand speed set by the user/comms interface
int set_speed = 100;
int set_speed = 1000;

// Phase difference between the QEI and the coils
unsigned theta_offset = -1;
Expand Down
2 changes: 2 additions & 0 deletions app_power_board_test/Makefile
Expand Up @@ -28,6 +28,8 @@ USED_MODULES = module_dsc_hall module_dsc_display module_dsc_blocks
USED_MODULES += module_dsc_adc module_dsc_qei
USED_MODULES += module_pwm_symmetrical module_pwm_common

XCC_FLAGS_Debug = $(XCC_FLAGS)
XCC_FLAGS_Release = $(XCC_FLAGS)

#=============================================================================
# The following part of the Makefile includes the common build infrastructure
Expand Down
7 changes: 7 additions & 0 deletions doc/quickstart-ctrl/Makefile
@@ -0,0 +1,7 @@
SPHINX_PROJECT_NAME=Quickstart guide for the XMOS Motor Control platform
VERSION=2.0.0
COLLECTION=1
DOXYGEN_DIRS =
SOURCE_INCLUDE_DIRS=
XDOC_DIR ?= ../../../xdoc
include $(XDOC_DIR)/Makefile.inc
Binary file added doc/quickstart-ctrl/control.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 880c560

Please sign in to comment.