Texas Instruments’ Tiva C LaunchPad showcases TI’s ARM Cortex-M4F, a 32-bit, 80Mhz microcontroller based on the TM4C123GH6PM. The Tiva series of LaunchPads serve as TI’s equivalent of the Arduino Uno, and hovers at about the same price point, except with more processing power and a sane geometry for the GPIO pins.
The Tiva’s processor runs five times faster than standard ATMega328P, and it sports 40 multipurpose GPIO pins and multiple serial ports. Just like the Arduino has shields, the Tiva has Booster Packs, and TI offers a decent number of options—but nothing like the Arduino’s ecosystem.
[Jacob]’s Arduino-Tiva project, an entry in the Hackaday Prize, aims to reformat the Tiva by building a TM4C123GH6PM-based board using the same form 2″x 3″ factor as the Arduino, allowing the use of all those shields. Of course, an Arduino shield only uses two rows of pins, so [Jacob]’s board would position the spare pins at the end of the board and the shield would seat on the expected ones.
The finished project could be flashed by either the Arduino IDE or TI’s Energia platform, making it an easy next step for those who’ve already mastered Arduinos but are looking for more power.
[Jordan] has been playing around with WS2812b RGB LED strips with TI’s Tiva and Stellaris Launchpads. He’s been using the SPI lines to drive data to the LED strip, but this method means the processor is spending a lot of time grabbing data from a memory location and shuffling it out the SPI output register. It’s a great opportunity to learn about the μDMA available on these chips, and to write a library that uses DMA to control larger numbers of LEDs than a SPI peripheral could handle with a naive bit of code.
DMA is a powerful tool – instead of wasting processor cycles on moving bits back and forth between memory and a peripheral, the DMA controller does the same thing all by its lonesome, freeing up the CPU to do real work. TI’s Tiva C series and Stellaris LaunchPads have a μDMA controller with 32 channels, each of which has four unique hardware peripherals it can interact with or used for DMA transfer.
[Jordan] wrote a simple library that can be used to control a chain of WS2812b LEDs using the SPI peripheral. It’s much faster than transferring bits to the SPI peripheral with the CPU, and updating the frames for the LED strip are easier; new frames of a LED animation can be called from the main loop, or the DMA can just start again, without wasting precious CPU cycles updating some LEDs.