Most of us who work with electronics know the name of Texas Instruments (TI) as a manufacturer of several important digital and analogue ICs as well as fancy sophisticated scientific calculators. However many people don’t know that TI is also a manufacturer of some of industry’s best microcontrollers. TI’s portfolio of micros is pretty large. ARM micros are getting popular day-by-day and on that family of micros TI has some of the best devices one can imagine. One such family from TI is the Tiva C series. Enter the TM4C123x Tiva C micros – one of the best possible combination of high-end hardware ever integrated with an ARM Cortex M4.
The Tiva C series MCUs are high performance ARM Cortex M4F micros. Now what does that mean? Generally speaking the ARM Cortex M series is meant to be used in place of (or simply replace) regular microcontrollers like PICs and AVRs while the A series and R series are designed for application-specific and real-time purposes respectively. The “4” in the “M4F” means it has all of the features of ARM Cortex-M3 along with additional features like Digital Signal Processing (DSP) extensions. Likewise the “F” indicates the presence of a Floating Point Unit (FPU). Thus Tiva C micros are high-end ARM microcontrollers with DSP and FPU support.
As with many other ARM family MCUs, there are no good books on Tiva C series. Thus the very first things that will be need are the reference manuals and datasheets. TI’s website is somewhat more sophisticated than that of other manufacturers like Microchip, STMicroelectronics, etc. You need to have a TI account and agree with their export policies to download stuffs. Huh! Okay here you can find the required docs: http://www.ti.com/product/TM4C123GH6PM/technicaldocuments.
First of all I would like to discuss about the hardware we can lay our hands on. To facilitate learning TM4C12x Tiva C MCUs easily, TI has released Tiva C Launchpads. These boards like many others are as easy to use as common Arduino boards. However unlike other development platforms that follow Arduino pin layout, TI’s MCU boards are not Arduino pin compatible. Well that doesn’t matter much.
At present three different Tiva C series Launchpad boards are offered by TI and these are:
- TM4C123GXL Tiva C Launchpad
- TM4C1294XL Connected Launchpad
- TM4C129EXL Crypto Connected Launchpad
The latter two boards looks similar and have almost all the features common. The former one is the one we will be using as it is the flagship board of the Tiva C series Launchpads. This board features a TM4C123GH6PMI ARM Cortex M4F MCU. Some of the features of this micro are as follows:
- Low Power 80 MHz (100 DMIPS) ARM Cortex-M4 CPU with Floating Point Unit
- 256KB Flash Memory, 32KB RAM, 2KB EEPROM
- 2 x 12-bit 1MSPS ADCs
- 2 x Analog Comparators
- Internal Temperature Sensor
- 6 x 64-bit and 6 x 32-bit Timers
- 16 x Motion PWM Channels
- 2 x Quadrature Encoders
- 8 x UART
- 4 x I2C
- 4 x SSI
- 2 x CAN
- 1 x USB 2.0 OTG/Host/Device
- 32 Channel DMA
The Launchpad board features stackable 40-pin headers for BoosterPacks and on-board programmer-debugger interface. BoosterPacks are like Arduino shields that can be stacked with the Launchpad boards to port additional hardware like LCDs, communication modules like Xbees, sensors, etc. easily. Since the Launchpad boards come with their own programmer-debugger interface, it is unnecessary to buy additional hardware for such tasks.
MikroC Pro for ARM
I have been playing with ARM MCUs from STMicroelectronics for quite some time and for their STM32 ARM Cortex M3 and M4 MCUs, I have been using MikroElektronika’s MikroC Pro for ARM and Arduino-IDEs like Leaf Maple. MikroC Pro for ARM is an ANSI C compiler. It has a cool IDE as well as many hardware libraries, examples, useful tools and help docs that have been simplified for easy usage. Unlike most other ARM C compilers, MikroE supports ARM MCUs from different manufacturers under one IDE and so it is easy to port codes across different platforms while conserving time for creativity. MikroC is one compiler you pay for and in return you get access to multiple ARM platforms like STM32, LPC series, etc. Fortunately for me MikroC supports Tiva C series devices and so this tutorial series will be MikroC-oriented. Although the compiler is not completely free, MikroElektronika still allows a code-size limited version of the compiler for download. If you haven’t used it yet, I suggest you take look.
Software link: http://www.mikroe.com/mikroc/arm.
The other option of using open-source Arduino-like IDEs is not very great because those tools are not meant for professional works and neither well maintained by professionals or experts. Another peril that awaits open-source IDE users is number of chips supported by the toolchain. Consider the case of Arduino, Arduino IDE doesn’t officially support all AVR chips. One good examples is the ATMega32.
For STM32F103 series you check out Leaf Maple IDE (http://www.leaflabs.com/) and for TI Launchpads Energia IDE (http://www.energia.nu/). These IDEs are open-source community-based IDEs and are good for doing small prototype projects.
LM Flash Programmer
The next software that we’ll be needing is a programmer software. TI’s LM Flash Programmer GUI is that tool. With this tool we can use the Launchpad’s on-board programmer-debugger hardware interface to upload our codes to Launchpad boards. Just like PICKIT2 or other programmer interfaces, this GUI is simple.
Software link: http://www.ti.com/tool/lmflashprogrammer.
Tiva C Series Pinmux Utility
Tiva C series Pinmux Utility will be need to quickly find out the additional properties of a GPIO pin. This is a very important tool because Tiva C chips GPIOs are highly multiplexed with various hardware peripherals and so when doing a complex work we may end up messing with pins. Without it we may never be able to debug such camouflaged hardware conflicts rapidly. With simple mouse button clicks we can find out which hardware is using what and if any attention is needed. It can also be used to generate codes for GPIOs although that is not our prime concern.
For More Details: EmbeddedLab introduces us TI’s Tiva C MCUs