Tag Archives: Stellaris Launchpad

Stellaris Mod Player V2

After having issues with the latest version of Code Composer Studio from TI I decided to port this project over to Keil uVision instead. While doing so I took the opportunity to tidy up the code and add a few new features.

One such feature is auto play next module. If enabled next module in the list will play automatically. Auto play is enabled by simply placing a empty file named “autoplay.dat” in the mods folder of the SD card which is detected during power up.

Auto play WILL NOT work with all modules. To detect the end of the module has been reached the code looks for the point where the playback index equals the total song length which would normally roll back to the start of the module. If the composer has used JUMPTOORDER the module may never reach the end. There is no way to determine if the jump is legitimate or the end of the module has been reached.

Source and project files compatible with Keil uVsion V5 are all available in my GitHub account along with pre built images in binary and hex format.

 

Advertisements

Not another development board

I fear I am suffering an addiction. An addiction to buying development boards. With ARM appearing to take over the world every manufacturer worth its salt seems to be introducing new ARM based development boards. On a recent spending spree on Farnell a new line of STM32 based boards caught my eye. The STM32 Nucleo range offers a great way to try these powerful micro controllers and comes in numerous flavours. One feature of these boards is that they are mbed compliant allowing for fast development with the on-line development environment. MFG_NUCLEOAnother great feature is that they come fitted with arduino headers so you can use any existing  arduino shields you have laying around. An integrated ST-Link debugger/programmer comes as standard so there is no need for any external tools. Supported development environments for these boards include IAR EWARM, Keil MDK, mbed and GCC based IDEs such as Atollic TrueStudio.

I opted for the STM32F401 one of the high powered variants. The STM32F401 comes fitted with a Cortex-M4 micro controller running at 84 MHz, has 512 kB of flash and bags of I/O including 4 dedicated SPIs. Can’t wait to start playing around with this board stay tuned for more updates.

Stellaris Mod Player

I while ago I bought a couple of Stellaris® LM4F120 launch pad evaluation kits. I really wanted to play around with the ARM processors and the Stellaris offers and extremely low cost introduction. This board features a  LM4F120H5QR ARM® Cortex™-M4F processor with 256KB of flash memory, 32KB of RAM, 2KB of EEPROM, two 12-bit analog to digital converters, a USB 2.0 device port, a hibernation module, other serial connectivity and flexible GPIO. The board comes with on-board emulation, which means you can program and debug your projects without the need for additional tools. All this for around £10.

Support for these boards on-line is huge both from Texas Instruments and from other people who have been using them in their own personal projects.

My boards have been sitting in my drawer for months I had used them initially but only running the test code under debug and familiarising my self with the tool set and the StellarisWare library (an extensive suite of software designed to simplify and speed development of stellaris-based microcontroller applications).

One project that did catch my eye was a MOD player a guy named Ronen K had implemented on his Stellaris Launchpad. The player had been ported from another project based on a Microchip PIC32 by Serveur perso.

You can see Ronens work on his blog here and here.

What really impressed me is the audio is generated from driving the GPIO pin with a PWM signal. According to his blog Ronen spent a fair amount of time redoing the PWM/timer code to get it to work on the Stellaris and the timing is fairly crtical. But wow it sounds awesome. A small LC filter (10 Khz cutoff) was added to help improve the audio.

For those who don’t know the MOD file format is a file format used to represent music. The format was very popular on the Commodore Amiga. Having had an Amiga as a teen I really wanted to relive some of those old memories.

Once I had Ronens code up and running playing files from the SD card I decided to add a 1.8″ TFT display module I had lying around. This allowed my to have a menu showing all of the mod files found on the SD card. The user could then choose which file to play. The display also shows some basic information such as the mods title, number of patterns etc all extracted from the mod file being played.

Check out the video to see it in action. Gives you a warm feeling hearing some of those old demo tunes again. The Amiga really was an awesome bit of kit.