Page Links
MSP430 Development Board Operating Environment

Overview

This web page provides resources for using the MSP430F5529LP LaunchPad development board from Texas Instruments including detailed instructions and code examples using a custom Operating Environment that is provided to make using the development board quick and easy.

MSP430F5529 Launchapd Photo

The MSP430F5529LP Launchpad from Texas Instruments is a very low-cost development board which integrates an embedded solution with an on-board debugger. What makes this and other TI development boards special is the standardization of a consistent set of breakout headers, and TI's support for BYOB development. This has resulted in an increasing number of BoosterPacks and community supported accessories. These accessories are great for a variety of Maker-community type projects. Intentional or not, TI has made the Launchpad and BoosterPacks a viable alternative to the popular open-source Arduino platforms and their associated Shields.

To make the transition even easier for people familiar with Arduino development, there is also an open-source MSP430 equivalent to the popular & easy-to-use Arduino processing sketchpad IDE, called Energia. In addition to being a simple IDE, Energia is also supported by a framework of APIs and driver library code. This makes it very easy for people without a lot of firmware experience to make the MSP430 microprocessor "do something cool". If you are the type of person who isn't particularly interested in microprocessors, but instead enjoy what you can do with them, then Energia is probably the right option for you.

If on the other hand, you are the type of person that wants to know more about how and why the MSP430 works the way it does, and you want more control over how it operates, then you're in the right place. This website contains an Operating Environment developed for the MSP430 that provides simple plug-and-play functionality. Want timers in your project? Just include the TIMER files. Want to make analog measurements? Add the ADC files. Want to add an LCD display? Add those files too. This isn't much different than something like Energia. The major difference is that the Operating Environment files are written not to hide the inner workings of the functionality from you, but to expose it to you. The provided files are intended to teach as well as provide functionality. They are written to be easily understood, easily modified, and easily adapted to larger projects.


Integrated Development Environment

In order to utilize the code provided on this website you will need to install the Code Composer Studio™ Desktop (IDE) Integrated Development Environment. This IDE includes tools for developing, compiling, and debugging embedded applications for a variety of Texas Instruments microcontrollers, processors, and wireless connectivity platforms. Most importantly, there is a free GCC compiler for the MSP430 starting with version 6, which supports unlimited code size. The free compiler does not provide code optimization, but this is not an important limitation for Maker-community projects, while unlimited code size is definitely required.

Detailed step-by-step installation Instructions for Code Composer Studio can be found here.

Detailed information for How to Create and Configure a New Project using the Operating Environment provided can be found here.


MSP430F5529LP Operating Environment

The Operating Environment consists of two collections of C-code: Libraries/Hardware and Libraries/Accessories. All of the code is available at GitHub: MSP430F5529LP


Hardware Library Files

The Hardware Library files consist of the core files of the Operating Environment that configure the MSP430F5529LP development board hardware. These files provide functionality such as Clocks, Timers, Analog to Digital Conversion, Serial Communications, etc. These files configure the peripherals and provide access methods which are likely to be compatible for most project needs. All of the files are written in a straight-forward manner that is intended to be easy to understand and modify. The table below includes a summary of the hardware library files.

Click on the Category links for detailed information.

Category Files Summary Description
DEFINITIONS
(always required)
MSP430F5529LP.h
(large file, link may become unresponsive)
This file provides the standard register and bit definitions for the Texas Instruments MSP430F5529 Launchpad development board. This file is not the same as the file provided by most IDEs. This file has been improved to use structure access to registers, and is required to use the operating environment files.
CLOCK
(always required)
MSP430F5529LP_CLOCK.h
MSP430F5529LP_CLOCK.c
These files configure the core voltage and clock module to run the MCLK and SMCLK sources at 24 MHz, and ACLK at 32.768 KHz. This file is required to use the operating environment.
GPIO
(optional)
MSP430F5529LP_GPIO.h
MSP430F5529LP_GPIO.c
When included in a project, these files provide Arduino-like GPIO control, for setting pin direction, special function selection, pin output value, resistor pull-up/down behavior, etc.
TIMERA2
(optional)
MSP430F5529LP_TIMERA2.h
MSP430F5529LP_TIMERA2.c
When included in a project, these files configure Timer A2 to generate an interrupt every 1 ms. The interrupt call is handled by the library. These files expose a variety of blocking and non-blocking timeout and delay functions.
WATCHDOG
(optional)
MSP430F5529LP_WDT.h
MSP430F5529LP_WDT.c
When included in a project, these files configure the watchdog timer to generate an interrupt every 1 s. The interrupt call is handled by the library. When the requested timeout expires, a callback will be executed by the library to the registered function. By default, up to 3 timeouts can be registered.
ADC
(optional)
MSP430F5529LP_ADC.h
MSP430F5529LP_ADC.c
When included in a project, these files configure the analog-to-digital converter to operate in the sequence-of-channels mode starting with ADC12MEM0. Conversions are configured to run in pulse mode at 4.8 MHz using SMCLK/5. The interrupt calls are handled by the library. After channel setup and conversion start, a callback will be executed to the registered functions for conversion errors and conversion completion of the last channel in the sequence.
UART
(optional)
MSP430F5529LP_UART.h
MSP430F5529LP_UART.c
When included in a project, these files configure the Universal Serial Communication Interface UCA0 in UART mode at 57600 Baud using pin 3.3 (Tx) and 3.4 (Rx). Functions are provided to send and receive serial messages.
I2C
(optional)
MSP430F5529LP_I2C.h
MSP430F5529LP_I2C.c
When included in a project, these files configure the Universal Serial Communication Interface UCB1 in I2C mode at 50 KHz using pin 4.1 (SDA) and 4.2 (SCL). Functions are provided to send and receive I2C messages.
BUTTONS
(optional)
MSP430F5529LP_BUTTONS.h
MSP430F5529LP_BUTTONS.c
When included in a project, these files provide a button service framework that scans the registered buttons and executes a callback to the registered functions to report single_press, double_click, and long_press button events. TIMER_A2 must also be included to use these files.

Accessories Library Files

The Accessories Library files consist of optional files that can be added to projects in order to add common accessories such as: LCD Displays, Accelerometers, Temperature and Humidity sensors, etc. These files configure the accessories and provide access methods which are likely to be compatible for most project needs. All of the files are written in a straight-forward manner that is intended to be easy to understand and modify. The table below includes a summary of the accessories library files.

Click on the Category links for detailed information.

Category Files Summary Description
LCD_HD44780_4BIT LCD_HD44780_4BIT.h
LCD_HD44780_4BIT.c
When included in a project, these files configure a 20x4 character LCD display with an HD44780 driver, using a 4-bit parallel connection method. Functions are provided to set the cursor position, and write data to the display.
Requires: A 20x4 character LCD display based on the HD44780 controller and the LCD_HD44780_4BIT accessory library files.


MSP430F5529LP Example Code

The following section provides example code to provide assistance with the use of the library files. The examples are generally provided in the order of easy to more complex from top to bottom.

Example Summary Description
Using the TimerA2 blocking delay This example uses the TIMERA2 hardware library to generate a sequence of blocking delays that blink the LEDs. Blocking delays are very simple to use and understand, and can be useful for creating very simple programs quickly. They have a significant drawback however that they prevent the processor from performing other tasks while it waits for the delay to complete.
Requires: Only the MSP430F529LP development board.
Using the TimerA2 non-blocking delay This example uses the TIMERA2 hardware library to generate a state machine using non-blocking delays that blink the LEDs. The use of the non-blocking delays adds a little complexity to the program flow, however it is a very powerful foundation for creating large applications that can process many tasks simultaneously.
Requires: Only the MSP430F529LP development board.
Using the Watchdog interval timer This example uses the Watchdog hardware library to generate an interval timer that blinks the LEDs. The Watchdog library provides the capability to register a timer and a callback function that is executed when the timer expires. This example uses the callback to re-register a new timer, creating a continuously running interval timer.
Requires: Only the MSP430F529LP development board.
Toggle the LEDs Using the Buttons This example uses the BUTTON hardware library to toggle the LEDs when the button next to the LED is pressed. This demonstrates how to register a button, detect a button event, and take action based on the event. This is a very simple example that does not distinguish between the different kind of events, only that an event occurred.
Requires: Only the MSP430F529LP development board.