-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup of CCS project and skeleton code created.
This project was based off of the PUMA code. All PUMA related code was removed except for clock and uart initialization.
- Loading branch information
0 parents
commit 424c32e
Showing
17 changed files
with
739 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<?ccsproject version="1.0"?> | ||
<projectOptions> | ||
<ccsVersion value="7.2.0"/> | ||
<deviceVariant value="Cortex M.TM4C1294NCPDT"/> | ||
<deviceFamily value="TMS470"/> | ||
<deviceEndianness value="little"/> | ||
<codegenToolVersion value="16.9.3.LTS"/> | ||
<isElfFormat value="true"/> | ||
<connection value="common/targetdb/connections/Stellaris_ICDI_Connection.xml"/> | ||
<linkerCommandFile value="tm4c1294ncpdt.cmd"/> | ||
<rts value="libc.a"/> | ||
<createSlaveProjects value=""/> | ||
<templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/> | ||
<filesToOpen value=""/> | ||
<isTargetManual value="false"/> | ||
</projectOptions> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/Debug/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="com.ti.ccstudio.debug.launchType.device.debugging"> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.C:\Users\s219\Documents\PUMA260\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <PropertyValues> <property id="ConnectOnStartup"> <curValue>1</curValue> </property> <property id="EnableInstalledBreakpoint"> <curValue>1</curValue> </property> <property id="IgnoreSoftLaunchFailures"> <curValue>0</curValue> </property> </PropertyValues> "/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.P:\University\Senior Project\Source\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <PropertyValues> <property id="ConnectOnStartup"> <curValue>1</curValue> </property> <property id="EnableInstalledBreakpoint"> <curValue>1</curValue> </property> <property id="IgnoreSoftLaunchFailures"> <curValue>0</curValue> </property> </PropertyValues> "/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_LOAD_PROGRAM.C:\Users\s219\Documents\PUMA260\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="ALL"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.C:\Users\s219\Documents\PUMA260\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="${build_artifact:PUMA260}"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.P:\University\Senior Project\Source\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="${build_artifact:PUMA260}"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.C:\Users\s219\Documents\PUMA260\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="PUMA260"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.P:\University\Senior Project\Source\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="PUMA260"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:PUMA260}"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\Users\s219\Documents\PUMA260\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="C:/Users\s219\Documents\PUMA260\Debug\PUMA260.out"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.P:\University\Senior Project\Source\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="P:/University\Senior Project\Source\Debug\PUMA260.out"/> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/PUMA260"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="4"/> | ||
</listAttribute> | ||
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="com.ti.ccstudio.debug.sourceLocator"/> | ||
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;default/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;cpuSpecificContainer cpuName=&quot;Stellaris In-Circuit Debug Interface/CORTEX_M4_0&quot;&gt;&#13;&#10;&lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;project name=&amp;quot;PUMA260&amp;quot; referencedProjects=&amp;quot;true&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; childType=&quot;org.eclipse.debug.core.containerType.project&quot;/&gt;&#13;&#10;&lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; childType=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;productsSource/&amp;gt;&amp;#13;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.products.source&quot;/&gt;&#13;&#10;&lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;deviceLibrarySource/&amp;gt;&amp;#13;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.device.library.source&quot;/&gt;&#13;&#10;&lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;librarySource/&amp;gt;&amp;#13;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.library.source&quot;/&gt;&#13;&#10;&lt;/cpuSpecificContainer&gt;&#13;&#10;" typeId="com.ti.ccstudio.debug.containerType.cpu.specific"/> </sourceContainers> </sourceLookupDirector> "/> | ||
</launchConfiguration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="com.ti.ccstudio.debug.launchType.device.debugging"> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_CPUS_WITH_PROJECT" value="<?xml version="1.0" encoding="UTF-8"?> <cpus_with_project> <id id="Stellaris In-Circuit Debug Interface/CORTEX_M4_0" isa="CORTEX_M4"/> </cpus_with_project>"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.E:\Senior Design Project\Software\Code\System Test\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <PropertyValues> <property id="ConnectOnStartup"> <curValue>1</curValue> </property> <property id="EnableInstalledBreakpoint"> <curValue>1</curValue> </property> <property id="IgnoreSoftLaunchFailures"> <curValue>0</curValue> </property> </PropertyValues> "/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.E:\Senior Design Project\Software\Code\System Test\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="${build_artifact:SMS}"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.E:\Senior Design Project\Software\Code\System Test\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="SMS"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:SMS}"/> | ||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.E:\Senior Design Project\Software\Code\System Test\targetConfigs\Tiva TM4C1294NCPDT.ccxml.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="E:/Senior Design Project\Software\Code\System Test\Debug\SMS.out"/> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/SMS"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="4"/> | ||
</listAttribute> | ||
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="com.ti.ccstudio.debug.sourceLocator"/> | ||
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;default/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;cpuSpecificContainer cpuName=&quot;Stellaris In-Circuit Debug Interface/CORTEX_M4_0&quot;&gt;&#13;&#10;&lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;project name=&amp;quot;SMS&amp;quot; referencedProjects=&amp;quot;true&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; childType=&quot;org.eclipse.debug.core.containerType.project&quot;/&gt;&#13;&#10;&lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; childType=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;productsSource/&amp;gt;&amp;#13;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.products.source&quot;/&gt;&#13;&#10;&lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;librarySource/&amp;gt;&amp;#13;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.library.source&quot;/&gt;&#13;&#10;&lt;/cpuSpecificContainer&gt;&#13;&#10;" typeId="com.ti.ccstudio.debug.containerType.cpu.specific"/> </sourceContainers> </sourceLookupDirector> "/> | ||
</launchConfiguration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>TIVA-Task-Scheduler</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.ti.ccstudio.core.ccsNature</nature> | ||
<nature>org.eclipse.cdt.core.cnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
<nature>org.eclipse.cdt.core.ccnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
</natures> | ||
<linkedResources> | ||
<link> | ||
<name>utils/uartstdio.c</name> | ||
<type>1</type> | ||
<locationURI>TIVAWARE/utils/uartstdio.c</locationURI> | ||
</link> | ||
</linkedResources> | ||
<variableList> | ||
<variable> | ||
<name>TIVAWARE</name> | ||
<value>file:/C:/ti/TivaWare_C_Series-2.1.4.178</value> | ||
</variable> | ||
</variableList> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
eclipse.preferences.version=1 | ||
inEditor=false | ||
onBuild=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
eclipse.preferences.version=1 | ||
encoding//Debug/ControlLoop/subdir_rules.mk=UTF-8 | ||
encoding//Debug/ControlLoop/subdir_vars.mk=UTF-8 | ||
encoding//Debug/EIB/subdir_rules.mk=UTF-8 | ||
encoding//Debug/EIB/subdir_vars.mk=UTF-8 | ||
encoding//Debug/MotorDriver/subdir_rules.mk=UTF-8 | ||
encoding//Debug/MotorDriver/subdir_vars.mk=UTF-8 | ||
encoding//Debug/TaskScheduler/subdir_rules.mk=UTF-8 | ||
encoding//Debug/TaskScheduler/subdir_vars.mk=UTF-8 | ||
encoding//Debug/makefile=UTF-8 | ||
encoding//Debug/objects.mk=UTF-8 | ||
encoding//Debug/sources.mk=UTF-8 | ||
encoding//Debug/subdir_rules.mk=UTF-8 | ||
encoding//Debug/subdir_vars.mk=UTF-8 | ||
encoding//Debug/utils/subdir_rules.mk=UTF-8 | ||
encoding//Debug/utils/subdir_vars.mk=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# PUMA260 | ||
An embedded board for controlling a PUMA260 Robot Arm. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "TaskScheduler.h" | ||
|
||
static volatile TaskScheduler scheduler; | ||
|
||
void InitializeTaskScheduler(uint32_t timerBase){ | ||
} | ||
|
||
void AddTask(Task *pTask){ | ||
|
||
} | ||
void RemoveTask(Task *pTask){ | ||
|
||
} | ||
void DisableTask(Task *pTask){ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef TIVA_TASK_SCHEDULER_H | ||
#define TIVA_TASK_SCHEDULER_H | ||
|
||
#include <stdint.h> | ||
#include <stdbool.h> | ||
|
||
struct Task_tag; | ||
typedef struct Task_tag Task; | ||
|
||
struct Task_tag { | ||
uint32_t taskTimerTicks; | ||
float taskPeriod; | ||
void (*pCallback)(void); | ||
bool taskEnabled; | ||
Task *pNextTask; | ||
}; | ||
|
||
typedef struct TaskScheduler_tag{ | ||
uint32_t timerBase; | ||
Task *pTaskListRoot; | ||
} TaskScheduler; | ||
|
||
void InitializeTaskScheduler(uint32_t timerBase); | ||
|
||
void AddTask(Task *pTask); | ||
void RemoveTask(Task *pTask); | ||
void DisableTask(Task *pTask); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
//Standard includes | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <math.h> | ||
#include <stdio.h> | ||
|
||
//Tivaware includes | ||
#include "inc/hw_memmap.h" | ||
#include "driverlib/gpio.h" | ||
#include "driverlib/rom.h" | ||
#include "driverlib/sysctl.h" | ||
#include "driverlib/pin_map.h" | ||
#include "driverlib/pwm.h" | ||
#include "driverlib/adc.h" | ||
#include "driverlib/ssi.h" | ||
#include "driverlib/uart.h" | ||
#include "utils/uartstdio.h" | ||
|
||
//System clock running at 120MHz | ||
#define SYS_CLK 120000000 | ||
|
||
void EnableClock(void); | ||
void EnablePeripherals(); | ||
void InitConsole(void); | ||
|
||
//Copies val to the buffer as an ascii string. Arg1 is the number of places before decimal, arg2 is after. | ||
void sprintfloat(char *Buffer, float val, int arg1){ | ||
int LeftSide = (int)val; | ||
int RightSide = (int)(pow(10,arg1) * (val - LeftSide)); //Remove the portion to the left of the decimal | ||
sprintf(Buffer, "%i.%i", LeftSide, RightSide); | ||
} | ||
|
||
int main(void) | ||
{ | ||
EnableClock(); | ||
EnablePeripherals(); | ||
} | ||
|
||
void EnableClock(void){ | ||
|
||
SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | | ||
SYSCTL_OSC_MAIN | | ||
SYSCTL_USE_PLL | | ||
SYSCTL_CFG_VCO_480), SYS_CLK); | ||
} | ||
|
||
/* | ||
Enables all peripherals needed for this motor driver test | ||
*/ | ||
void EnablePeripherals(void){ | ||
InitConsole(); | ||
} | ||
|
||
//Initializes UART0 to be used as a console. | ||
void InitConsole(void){ | ||
// | ||
// Enable GPIO port A which is used for UART0 pins. | ||
// TODO: change this to whichever GPIO port you are using. | ||
// | ||
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); | ||
|
||
// | ||
// Configure the pin muxing for UART0 functions on port A0 and A1. | ||
// This step is not necessary if your part does not support pin muxing. | ||
// TODO: change this to select the port/pin you are using. | ||
// | ||
GPIOPinConfigure(GPIO_PA0_U0RX); | ||
GPIOPinConfigure(GPIO_PA1_U0TX); | ||
|
||
// | ||
// Enable UART0 so that we can configure the clock. | ||
// | ||
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0); | ||
|
||
// | ||
// Use the internal 16MHz oscillator as the UART clock source. | ||
// | ||
UARTClockSourceSet(UART0_BASE, UART_CLOCK_PIOSC); | ||
|
||
// | ||
// Select the alternate (UART) function for these pins. | ||
// TODO: change this to select the port/pin you are using. | ||
// | ||
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); | ||
|
||
// | ||
// Initialize the UART for console I/O. | ||
// | ||
UARTStdioConfig(0, 115200, 16000000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<configurations XML_version="1.2" id="configurations_0"> | ||
<configuration XML_version="1.2" id="configuration_0"> | ||
<instance XML_version="1.2" desc="Stellaris In-Circuit Debug Interface" href="connections/Stellaris_ICDI_Connection.xml" id="Stellaris In-Circuit Debug Interface" xml="Stellaris_ICDI_Connection.xml" xmlpath="connections"/> | ||
<connection XML_version="1.2" id="Stellaris In-Circuit Debug Interface"> | ||
<instance XML_version="1.2" href="drivers/stellaris_cs_dap.xml" id="drivers" xml="stellaris_cs_dap.xml" xmlpath="drivers"/> | ||
<instance XML_version="1.2" href="drivers/stellaris_cortex_m4.xml" id="drivers" xml="stellaris_cortex_m4.xml" xmlpath="drivers"/> | ||
<platform XML_version="1.2" id="platform_0"> | ||
<instance XML_version="1.2" desc="Tiva TM4C1294NCPDT" href="devices/tm4c1294ncpdt.xml" id="Tiva TM4C1294NCPDT" xml="tm4c1294ncpdt.xml" xmlpath="devices"/> | ||
</platform> | ||
</connection> | ||
</configuration> | ||
</configurations> |
Oops, something went wrong.