Introduction to TM4C123 Tiva C Series LaunchPad

This tutorial is an introduction to the TM4C123 LaunchPad. In this tutorial, we will introduce the TM4C123G microcontroller, specifically the TIVA C series TM4C123G by Texas Instruments. We will first review the key features of the TM4C123G development board. After that, we will explain the pinout, GPIO pins, memory, and various peripherals available on the LaunchPad. This will include a detailed description of the features of each port, including the GPIO pins. Finally, we will explore the different integrated development environments (IDEs) available for programming the TM4C123G development board.

TM4C123G LaunchPad

If you are just a beginner in microcontroller programming, you can read these tutorials:

Tiva C Series TM4C123G LaunchPad Introduction

The TM4C123G is a member of the class of high-performance 32-bit ARM cortex M4 microcontrollers with a broad set of peripherals developed by Texas Instrumentals. The TIVA launchpad has a built-in processor clock frequency of up to 80MHz with a floating-point unit (FPU). The Cortex-M4F processor also supports the tail chaining functionality. It also includes a nested vector interrupt controller (NVIC). The debugging interface used is JTAG and SWD (serial wire debugger) for programming and debugging purposes.

TM4C123G LaunchPad Features

The TM4C123G LaunchPad, part of Texas Instruments Tiva C Series, is a development platform that offers various features suitable for a wide range of applications. Here are some key features:

Microcontroller

  • Processor: ARM Cortex-M4F
  • Speed: 80 MHz
  • Memory:
    • Flash: 256 KB
    • SRAM: 32 KB
  • Peripherals:
    • 8 UARTs
    • 4 I2C
    • 4 SPI
    • 2 QEI (Quadrature Encoder Inputs)
    • 24-bit SysTick Timer

General Purpose I/O

  • GPIO Pins: 43
  • Analog Inputs: 12 ADC channels, 12-bit ADC
  • PWM: 16 PWM outputs
  • Timers: 6 General Purpose Timers, each with 2 16-bit PWM outputs or 1 32-bit PWM output

Communication

  • USB: USB 2.0 OTG/Host/Device with integrated PHY
  • CAN: 2 CAN modules

Power

  • Operating Voltage: 3.3V
  • Power Supply: USB or external 5V supply

Development and Debugging

  • Debugger: On-board In-Circuit Debug Interface (ICDI)
  • Software: Compatible with various IDEs like Code Composer Studio, Keil, and IAR

Additional Features

  • Temperature Range: -40°C to 85°C
  • Libraries and Tools: Extensive libraries and tools support, including TivaWare

These features make the TM4C123G LaunchPad a versatile platform for developing applications in areas such as embedded systems, robotics, and IoT.

TM4C123G LaunchPad Pinout Diagram

This figure shows the front-end pinout diagram:

TM4C123G LaunchPad Pinout front end

This figure shows the pin configuration for back end connector:

TM4C123G LaunchPad Pinout back end

TM4C123GH6PMI Microcontroller Features

The TM4C123GH6PMI microcontroller of ARM Cortex-M4F operates at 80MHz clock frequency. The clocked source of the I/O port circuitry of the TIVA board can be enabled using the RCGCGPIO register. The clock source of a pin should be disabled if an I/O port is not used to save power.

The pins of the microcontroller as visible from the above figure are internally connected to the output onboard ports and the functionality of the pins of the controller is shown in the figure below:

TM4C123G Microcontroller

GPIO (General Purpose Input Output)

It has 0-43 general-purpose input-output pins. Any GPIO can be used as an external edge or level-triggered interrupt, it can initial ADC sampling, can change the toggle rate up to CPU clock speed on the advanced high-performance bus. Each input pin has a tolerance voltage of 5V in the input configuration. Every GPIO pin also has a weak pull-up, pull-down, and open drain.

There are many registers associated with each of the above I/O ports and they have designated addresses in the memory map. The above addresses are the Base addresses meaning that within that base address, we have the registers associated with that port.

Port nameLower addressUpper address
GPIO port A0x400040000x40004FFF
GPIO port B0x400050000x40005FFF
GPIO port C0x400060000x40006FFF
GPIO port D0x400070000x40007FFF
GPIO port E0x400240000x40024FFF
GPIO port F0x400250000x40025FFF

To understand memory-mapped IO, read this tutorial:

Most of the GPIO pins in a microcontroller can be configured for an alternate hardware function. It should be noted that only 1 of the alternate functions can be configured at a given time. The user program can switch among different alternate functionality during execution.

The general-purpose I/O pins are named port A to port F in the TM4C123G microcontroller. The address range of the GPIO pins is given in the table below,
Port name Lower address Upper address.

These ports are designated as PA0-PA7, PB0-PB7, PC0-PC7, PD0-PD7, PE0-PE5, and PF0-PF4. The figure below shows the onboard GPIO pins of TIVA.

To learn how to use GPIO pins of TM4C123, check these tutorials:

TM4C123G Peripherals and Modules

Memory

It has
• 256 kb Flash memory.
• 32 kb single-cycle SRAM with internal ROM loaded with TivaWare software.
• 2 kb EEPROM which is fast and saves board space

Serial Communication Peripherals

It also has onboard mounted

  • USB 2.0 (OTG / HOST / Device)
  • 8 UART ports with IrDA, 9-bit, and ISO7816 port
  • 6 I2C
  • 4 SPI microwire or TI synchronous serial interface
  • 2 CAN Modules

ADC Channels

TM4C123 Tiva C series Launchpad microcontroller has two ADC Channels that share 12 analog input channels. On top of that four Sample sequencers are also available as a part of each ADC module to provide different samplig rate, sampling averaging features. In depth guide on TM4C123GH6PM microcontroller ADC modules are available in this article:

Memory protection unit

It has a built-in feature of generating a memory management fault on incorrect access to region.

Timers

It has

  • 2 watchdog timers with separate clocks
  • 1 SysTick timer, with 24-bit high-speed RTOS and another timer
  • Six 32bit and six 64 bit general-purpose timers.

Complete in-depth guides on systick timer are available on these links:

PWM Channels

TM4C123GH6PM microcontroller contains two PWM Channels and each PWM Channel consists of 4 generator blocks and 4 control blocks. Furthermore, each PWM generator provides two PWM output signals. Hence, we can get a total of 16 PWM signals from the TM4C123 Tiva Launchpad. Check this in-depth guide on TM4C123 PWM:

32 Channel DMA

It also has two interrupt-enabled priority levels and 8, 16, and 32-bit data sizes.

Nested Vector Interrupt Controller (NVIC)

The built-in nested vector interrupt controller is a vector or stack you can say which contains 7 exceptions (defined by the programmer) and 71 interrupts (to be defined by the user) with 8 programmable priority levels. These priority levels decide the priority of the interrupts defined by the user and always have lower priority than the programmer-defined exceptions. Further information on NVIC is available in this article:

TM4C123G LaunchPad Components

OnBoard Microcontroller

Two onboard chips present on the board are debugger and the microcontroller. The debugger mounted on the board is JTAG or SWD as we will see shortly, and the microcontroller chip mounted on the board is TM4C123G after which the board is named. Refer to the figure below:

TM4C123G LaunchPad Chip

Push Buttons

There are two onboard switches (Push button) on the LaunchPad that are connected internally with the GPIO pins, a toggle switch that is used as a power switch, and another push button that is used to reset or restart the program execution that is already loaded on the board. As shown in the figure below:

TM4C123G LaunchPad onboard push buttons

SW1 push-button switch is connected to the PF0 GPIO pin and the SW2 push-button switch is connected to the PF4 GPIO pin.

Onboard LEDs

One onboard tri-color LED is also present on the TIVA launchpad which is internally connected to the F port of the GPIO pins, and when enabled the led shows the color of the enabled pin. And also there is a power LED of color green on the board which when on tells the user that the board is turned on. Both the LEDs are highlighted in the figure below.

TM4C123G LaunchPad onboad LEDs

Datasheets

The datasheet of the TIVA TM4C123G ARM-based cortex-M4F microcontroller is available online and you can easily access it through the link given below:

Datasheet link: Download

TM4C123G Block diagram

The ARM chips have two buses: APB (Advanced Peripheral Bus) and AHB (Advanced High-Performance Bus). The AHB bus is much faster than APB. The AHB allows one clock cycle access to the peripherals. The APB is slower and its access time is minimum of 2 clock cycles.

A high-level block diagram of TM4C123G microcontroller is shown in the figure below.

TM4C123G Block diagram

From the figure, it is visible that there are 2 on-chip buses AHB and APB, which connect the processor core to the peripherals. These buses are constructed from the system bus using a bus matrix. It should be recalled that this bus matrix is different from the one used inside the processor block. The bus matrix inside the processor block is responsible for connecting the instruction and data buses from the processor core I code D code to system buses.

The advanced peripheral bus (APB) is the low-speed bus. The more complex Advanced High-performance Bus (AHB) gives improved performance than the APB bus and should be used for interfacing those peripherals, which require faster data transfer speed. The block diagram also shows different peripherals modules connected to these two buses. It should be noted that only the GPIO and direct memory access (DMA) modules have connectivity available to both buses.

IDE for programming

There are many options available to write programs for the TM4C123G launchpad such as Energia IDE, code composer studio, and Keil. The IDE that we will use for programming the TM4C123G is Keil. It allows you to build a programming interface in the language of your desire. You can write a code to be burnt on the microcontroller in the language of your desire as we will see shortly in the upcoming tutorials.

Check these getting started tutorials for Keil IDE:

3 thoughts on “Introduction to TM4C123 Tiva C Series LaunchPad”

  1. HI ,
    I am new to tivaware series controllers , I would like to enable 8 interrupt in same GPIO port (example PORTA ).Is this possible in TM4C123GXL controller??

    Reply
  2. Rani L.,
    You can enable/disable an interrupt for each individual pin,
    You can assign relative priority
    You have one interrupt handler per port (at least, for the Texas Instruments’ MSP series, couldn’t tell for sure for this particular Texas Instruments’ MCU. And in this handler, you can identify which pin (of the port, a port having generally 8 pins ) has a pending call (due to priority, they are automatically “stacked” by the NVIC )

    Reply
  3. Hi,

    I need some help working with the watchdog timer (WDT) on the TM4C123 Tiva C series lauchpad. Can you please make a quick tutorial on how to configure and use it?
    Thanks!

    Reply

Leave a Comment