TM4C123GXL-LaunchPad-00
Important Notice
Revision History
Mailing Address
Table of Contents
TM4C123GXL-LaunchPad-01
Introduction
Chapter Topics
TI Processor Portfolio and Tiva C Series Roadmap
Tiva™ TM4C123G Series Overview
TM4C123GH6PM Specifics
LaunchPad Board
Lab1: Hardware and Software Set Up
Objective
Procedure
Hardware
Download and Install Code Composer Studio (
Install TivaWare™ for C Series (Complete) (
Install LM Flash Programmer (
Download and Install Workshop Lab Files (
Download Workshop Workbook (
Terminal Program (
Windows-side USB Examples (
Download and Install GIMP (
LaunchPad Board Schematic
Helpful Documents and Sites (
Kit Contents (
Initial Board Set-Up (
QuickStart Application
TM4C123GXL-LaunchPad-02
Code Composer Studio
Chapter Topics
Tiva C Series Development Tools
TI Software and Ecosystem
Code Composer Studio Functional Overview
Target Configuration and Emulators
Projects and Workspaces
Creating a New Project and Adding Files
Portable Projects
Path and Build Variables
Build Configurations
Licensing and Pricing
Lab2: Code Composer Studio
Objective
Lab 2 Procedure
Folder Structure for the Labs
Create a New CCS Project
Add Path and Build Variables
Add files to your project
Explore Build Configurations
Build, Load, Run
Perspectives
Terminate the debug session.
VARS.INI – An Easier Way to Add Variables
Using VARS.INI – Conclusion
LM Flash Programmer
Optional: Creating a bin File for the Flash Programmer
TM4C123GXL-LaunchPad-03
TivaWare™, Initialization and GPIO
Chapter Topics
TivaWare
Clocking
GPIO
Lab 3: Initialization and GPIO
Objective
Procedure
Create lab3 Project
Header Files
Main() Function
Clock Setup
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
GPIO Configuration
The base addresses of the GPIO ports listed in the User Guide are shown below. Note that they are all within the memory map’s peripheral section shown in module 1. APB refers to the Advanced Peripheral Bus, while AHB refers to the Advanced High-Perfor...
While() Loop
Startup Code
Set the Build Options
Compile, Download and Run the Code
Examine the Tiva C Series Pin Masking Feature
TM4C123GXL-LaunchPad-04
Interrupts and the Timers
Chapter Topics
Cortex-M4 NVIC
Cortex-M4 Interrupt Handing and Vectors
General Purpose Timer Module
Lab 4: Interrupts and the Timer
Objective
Procedure
Import Lab4 Project
Header Files
Main() Function
Clock Setup
GPIO Configuration
Timer Configuration
Calculate Delay
ui32Period = (SysCtlClockGet() / 10) / 2; TimerLoadSet(TIMER0_BASE, TIMER_A, ui32Period -1);
Interrupt Enable
Timer Enable
Main Loop
Timer Interrupt Handler
Startup Code
Pre-defined Name
Compile, Download and Run The Code
Exceptions
TM4C123GXL-LaunchPad-05
ADC12
Chapter Topics
ADC12
Sample Sequencers
Lab 5: ADC12
Objective
Procedure
Import lab5 Project
Header Files
Driver Library Error Routine
Main()
Inside the while(1) Loop
Add Pre-defined Symbol
Build and Run the Code
Breakpoint
Hardware averaging
Calling APIs from ROM
Build, Download and Run Your Code
TM4C123GXL-LaunchPad-06
Hibernation Module
Chapter Topics
Low Power Modes
Lab 6: Low Power Modes
Objective
Procedure
Import lab6
Limitations
Header Files
Error Function
Main Function
Clock Setup
GPIO Configuration
Hibernate Configuration
SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE); HibernateEnableExpClk(SysCtlClockGet()); HibernateGPIORetentionEnable(); SysCtlDelay(64000000); HibernateWakeSet(HIBERNATE_WAKE_PIN); GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN_3, 0x00);
Hibernate Request
► Click the Save button to save your work. Your code should look something like the next page:
Build, Download and Run the VDD3ON (no RTC) Code
Measure the Current
Wake Up on RTC
TM4C123GXL-LaunchPad-07
USB
Chapter Topics
USB Basics
TM4C123GH6PM USB
USB Hardware and Library
Lab 7: USB
Objective
Procedure
Example Code
Import The Project
Build, Download and Run The Code
Digging Deeper
Watch the Buffers
TM4C123GXL-LaunchPad-08
Memory
Chapter Topics
Internal Memory
Flash
EEPROM
SRAM
Bit-Banding
Memory Protection Unit
Priority Levels
Lab 8: Memory and the MPU
Objective
Procedure
Import lab8
Writing to Flash
Build, Download and Run the Flash Programming Code
Reading and Writing EEPROM
Build, Download and Run the EEPROM Programming Code
Further EEPROM Information
Bit-Banding
Memory Protection Unit (MPU)
TM4C123GXL-LaunchPad-09
Floating-Point Unit
Chapter Topics
What is Floating-Point and IEEE-754?
Floating-Point Unit
CMSIS DSP Library Performance
Lab 9: FPU
Objective
Procedure
Import lab9
Browse the Code
Build, Download and Run the Code
Profiling the Code
TM4C123GXL-LaunchPad-10
BoosterPacks and grLib
Chapter Topics
LaunchPad Boards and BoosterPacks
KenTec TouchSceen TFT LCD
Graphics Library
Lab 10: Graphics Library
Objective
Procedure
Connect the KenTec Display to your LaunchPad Board
Import Project
Build, Download and Run the Demo
Writing Our Own Code
Modify pic.c
Main.c
Pointer to the Image Array
Driver Library Error Routine
Main()
Displaying the Image
Build and Run the Code
Display Text On-Screen
Build, Load and Test
Drawing Shapes
Build, Load and Test
Widgets
Build, Load and Test
TM4C123GXL-LaunchPad-11
Synchronous Serial Interface
Chapter Topics
Features and Block Diagram
Interrupts and µDMA Operation
Signal Formats
Lab 11: SPI Bus and the Olimex LED BoosterPack
Objective
Procedure
Hardware
Faces Code
Import Lab11
Build and Load
Run and Test
TM4C123GXL-LaunchPad-12
UART
UART Features and Block Diagram
Basic Operation
UART Interrupts and FIFOs
UART “stdio” Functions and Other Features
Lab 12
Objective
Procedure
Import Lab12
Build, Download, and Run the UART Example Code
Using UART Interrupts
TM4C123GXL-LaunchPad-13
µDMA
Chapter Topics
Features and Transfer Types
Block Diagram and Channel Assignment
Channel Configuration
Lab 13: µDMA
Objective
Procedure
Import Lab13
Browse the Code
Build, Download and Run the Code
Streaming Data To and From the UART using a Ping-Pong Buffer
Code Changes
Browse the Code
Build, Load and Run
Z-EK-TM4C123GXL Rev A Schematic