Olimex MSP430 Development Boards

Introduction

On this page you will find information about various Texas Instruments MSP430 based microcontroller development boards from Olimex as I add them to my collection. The MSP430 microcontrollers are especially suited for battery applications due to their low power consumption and where high performance isn't the main concern.

Please see Olimex's MSP430 page for more information:

https://www.olimex.com/Products/MSP430/

Please note: screenshots can be found at the bottom of the page for download.

MSP430-5510STK

Introduction

The product page for the MSP430-5510STK development board from Olimex can be found at:

https://www.olimex.com/Products/MSP430/Starter/MSP430-5510STK/

On the page there are various links including user's manual, schematic, and demo examples.

The board retails for €17.95 euro (~£15.61) but I got it for £13.50 from eBay, brand new.

Its features are:

Texas Instruments MSP430F5510 MCU (microcontroller) with 32KB Program Flash, 4KB RAM, 25MHz (the MSP430-5510STK has a 4MHz crystal, the stated 25MHz is the maximum for the MCU)

LCD display 8 alphanumeric

Micro SD card connector

Li-Po battery on board charger

Mini USB connector with USB bootloader support

Two user buttons (BUT1 and BUT2), and one green user LED (LED1)

Red power on LED

Bootloader button (USB_BSL)

Reset button

Access to every pin near prototype area

UEXT connector that supports Olimex modules (MOD-MP3, MOD-NRF24L01, etc.)

JTAG connector

32768Hz oscillator crystal

4 MHz crystal oscillator

Dimensions: 100 mm x 80 mm (3.94x 3.14")

The datahseet for the MCU can be found at:

https://www.ti.com/lit/ds/slas645l/slas645l.pdf?ts=1703414416391

According to the datasheet the maximum supply voltage is 4.1V and the maximum voltage applied to any pin (excluding VCORE, VBUS, V18) is VCC + 0.3V, thus it's best to treat the MCU GPIO pins as NOT 5V tolerant.

The MSP430-5510STK board came with four little feet which can be inserted in the four mounting holes in the corners of the board. On the board is a copyright date of 2012.

Example Projects

When I plugged the board into my computer via USB the PWR LED came on and LED1 flashed a few times, and 'OLIMEX' appeared on the LCD, which is what the built-in demo is supposed to do. Windows, however, reported it as an unknown device, Device manager showed 'Unknown USB Device (Device Descriptor Request Failed)', but that wasn't a problem, as we shall see shortly.

I downloaded the demo examples from the product page, there are only two examples, Blinking_LED and MSP-5510STK_Full_Example. To try out the examples we can use the board's bootloader and the USB Firmware Upgrade app without the need for a JTAG programmer. You need to first run 'MSP430_USB_Firmware_Upgrade_Example-1.1.4-Setup.exe' in the downloaded examples root folder, which installs the 'MSP430 USB Firmware Upgrade Example' program, as it's called by the installer (V1.1.4). During install it gives the option to either install 'Application with Source Code', 'Application Only', or 'Custom'. For the first option it warns you that you need the Microsoft Windows Drive Kit to be installed before compiling the code (for the application). I selected 'Application Only'. 

Once installed, the 'MSP430 USB Firmware Upgrade' screen appears, which explains that the software is designed to write either one of the selectable examples or other firmware through USB BSL to a 55x device (the MCU model number, I assume). 

After accepting the license, you're then taken to a window where you can select from an example or custom firmware:

I selected 'Blink LED Example'. 


In step two you are instructed to hold the BSL Button (S3) and plug in the FET board into USB (note that FET means Flash Emulation Tool but in our case we plug in the MSP430-5510STK), and then in step 3 click the 'Upgrade Firmware' button. The BSL button is located between the USB mini and battery connectors. When holding the button and plugging in the USB, the power LED comes on and nothing else but the Upgrade Firmware button becomes enabled. Note that for me at least, Windows no longer showed a USB error.


As seen below, a bar shows the firmware upgrade progress and various messages are displayed.

After writing the firmware the app now showed 'No device connected' but despite no issues writing to the board the LED wasn't blinking, pressing the user buttons did nothing. I tried unplugging and re-plugging into USB without holding the BSL Button and I also tried powering the board off a USB power supply but there was still no blinking LED.

Next, I tried programming using the 'Select Firmware' option in the USB Firmware Upgrade software and chose the MSP-5510STK_Blinking_LED.txt file located in the MSP5510-STK_examples\MSP5510-STK_WEB_examples\Blinking_LED\MSP-5510STK_Blinking_Led\Debug\Exe folder in the downloaded examples. That was successful, after programming (which the app reported took 0s) LED1 was continually blinking. Perhaps the built-in selectable examples in the USB Firmware Upgrade program are for a different board.

On to the other downloaded example, MSP-5510STK_Example.txt, located in MSP5510-STK_examples\MSP5510-STK_WEB_examples\MSP-5510STK_Full_Example\MSP-5510STK_Example\Debug\Exe, don't forget to unplug and re-plug the board with USB BSL button held down so that it can be programmed again.

After programming (which took 1s according to the app), LED1 was blinking, and 'OLIMEX' displayed on the LCD, and a 127KB drive appeared in Windows, containing a text file, data_log.txt, which reads:

TI's Mass Storage sample application, using MSP430.

Additionally, there will also be a second drive, which will be greyed out unless you have a micro SD card inserted in the board's SD card slot, which will allow you to explore the SD card's contents as if it were directly connected to your computer. As advised in the project example readme it may take 15 secs for the SD card to appear. For me, Windows did report that there was a problem with the drive but that was most likely a problem with the SD card rather than the board.

You should also find a COM port appear in Device Manager, a 'USB Serial Device', which I opened up in Putty as a serial connection with default 9600 speed (it's not specified in the example project readme), and anything typed appeared, which is what the readme says is supposed to happen (i.e. echo).

Pressing BUT1 is supposed to display the battery voltage on the LCD, you have to hold the button for at least one second, for me the LCD showed 4300 mV even though its supposed to display 4314 mV if no battery is connected. Also, LED1 flashes much faster. Pressing BUT2 will display 'OLIMEX' on the LCD and LED1 flashes slower again. I found that pressing BUT1 will sometimes display 4300mV as the battery voltage, other times 4296mV, which may be due to the actual USB voltage the board is receiving.

Creating Your Own Projects

The user's manual suggests that for developing software for the MSP430-5510STK you can use IAR Embedded Workbench, Rowley CrossWorks, Code Composer Studio (CCStudio), and other IDEs. Currently, IAR Embedded Workbench for MSP430 only has a free trial version but I went with CCStudio even though I've had no experience of using it or any of the other recommended IDEs, however, CCStudio is from Texas Instruments, who also make the MCU that powers the MSP430-5510STK, so it seemed a good choice. Additionally, new versions of CCStudio are based on the open source Eclipse IDE, and are now free to use. You can download CCStudio from:

https://www.ti.com/tool/download/CCSTUDIO/

I downloaded the most recent version, which at the time was V12.5.0 released 4th Oct 2023, and since I have Windows I went with the Windows single file offline installer. After downloading and extracting, you need to run the ccs_setup_12.5.0.00007.exe (or whatever version) to install CCStudio. During installation, when it came to selecting components to be installed, you can just select 'MSP430 ultra-low power MCUs'.

On the Getting Started page in CCStudio there is a 'Browse and Import Examples' option but the MSP430-5510STK isn't a board option but MSP430F5510 is as a device, which is the MCU used by the MSP430-5510STK.

Although it seems the downloaded demo examples were created in Visual studio going by the file extensions, and while you can open the project folder in Visual studio you cannot build it. I did also try using CCStudio (see image below), using these steps:

File->Open Projects from File System...

Click Directory... button and navigate to where the example you want to load is located, eg Blinking_LED

Click Finish button

But it cannot be built. 

On the Getting Started page click the button to go into Simple Mode and you should see the project example to the left in the Project Explorer section. You can double-click any of the files (eg main.c) to open them up but you can't build the project.

What we can do is create a new project and we will duplicate the LED blink example as a very simple test just to go through the process of creating a project from scratch for the MSP430-5510STK in CCStudio. In CCStudio select 'Project->New CCS Project…', then set the Target to MSP430F5510, and Project name to LED_Blink, and in the 'Project templates and examples' section choose 'Blink the LED'  - see the next image. Click the Finish button, which loads the project. Note that CCStudio uses workspaces, so it’s possible to have multiple projects open at once.

The LED_Blink template isn't for a specific development board so we have to adjust it to fit the MSP430-5510STK. If you look in blink.c (see image below) you will see in main() that it’s quite low level, as we are directly accessing the MCU registers.

The first thing of concern is this line:

P1DIR |= 0x01; // configure P1.0 as output

Recall that the board has a MSP430F5510 MCU, looking at the datasheet:

https://www.ti.com/lit/ds/slas645l/slas645l.pdf?ts=1703414416391

On page 68 we can see that P1DIR is the Port P1 direction and we can see in the diagram on page 77 that 1 sets the pin to output and 0 to input, so OR'ing (the pipe symbol) P1DIR with 0x01 (the bit value) will set the first bit, P1.0, to output. Now we understand that we need to change it for the on board LED on the MSP430-5510STK. If we look at the schematic for the MSP430-5510STK:

https://www.olimex.com/Products/MSP430/Starter/MSP430-5510STK/resources/MSP430-5510STK-Rev-B-schematic.pdf

We can see that the on board LED, LED1, is connected to P4.7 of the MCU. Thus we need to use P4DIR and set bit 7 to output by OR’ing with its bit value:

P4DIR |= 0x80;

Continuing in main(), we enter a while() loop set as an infinite loop, as following:

while(1)

{

P1OUT ^= 0x01; // toggle P1.0

for(i=10000; i>0; i--);     // delay

}

The first line of while():

P1OUT ^= 0x01;

Toggles P1.0 on/off by XOR’ing the bit value with itself. It shouldn’t come as surprise that we need to replace the line with the following:

P4OUT ^= 0x80;

To toggle the on board LED of the MSP430-5510STK on/off.

The last line of the while() loop creates a delay, which is not the best approach but does the job for this simple test.

After making those 2 modifications main() should look like this:

void main(void)

{

WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer

P4DIR |= 0x80;                  // configure P4.7 as output (on board LED)


volatile unsigned int i; // volatile to prevent optimization


while(1)

{

    P4OUT ^= 0x80; // toggle P4.7 (on board LED) on/off

for(i=10000; i>0; i--);     // delay

}

}

We can now build: Project->Build Project, which should take seconds. The console gives some interesting feedback, for example:

Detected SW delay loop using empty loop. Recommend using a timer module instead

Which is what I previously mentioned. We also get some other warnings:

remark #10371-D: (ULP 1.1) Detected no uses of low power mode state changing instructions

remark #10372-D: (ULP 4.1) Detected uninitialized Port A in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.

remark #10372-D: (ULP 4.1) Detected uninitialized Port B in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.

remark #10372-D: (ULP 4.1) Detected uninitialized Port C in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.

Which shouldn't be anything to worry about, the downloaded LED example does initialise the port but we’re keeping things simple here.

By default we don't get a file we can use with the USB Firmware Upgrade tool, which requires a .txt file with hex values, so we need to do the following:

Project->Show Build Settings...

Click on 'MSP430 Hex Utility' and check the Enable check box 'MSP430 Hex Utility' under Configuration drop-down.

Expand 'MSP430 Hex Utility' on the left, click on 'Output Format Options' and set the 'Output format' drop-down as 'TI-TXT hex (--ti, txt)'.

You can see the 'Output Format Options' in this screenshot:

Build again and you will find a .txt file, eg LED_Blink.txt, in the Debug subfolder of the project folder (located in the workspace folder).

Open up the USB Firmware Upgrade tool and use the 'Select Firmware' option to load the generated .txt file and write it to the board. After programming you should see the on board LED rapidly flashing. I measured the LED frequency with an oscilloscope and found that the LED was flashing on/off at a frequency of 4.8Hz (conveniently P4.7 is exposed in the prototype area).

If we wanted to see how fast we can toggle a GPIO pin then we could use something like this:

void main(void)

{

WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer

P4DIR |= 0x20;                  // configure P4.5 as output


volatile unsigned int i; // volatile to prevent optimization


while(1)

{

    P4OUT ^= 0x20; // toggle P4.5

}

}

This time we’re using P4.5 which has nothing connected to it and is available both in the prototype area and on the UEXT connector (see the board schematic). This gives us 65.79KHz when I measured.

Note: I realised after I had forgotten to remove the i variable declaration but that doesn't affect the while() loop.

I hope these couple of examples will help get you started in developing your own projects for the MSP430-5510STK.

All content of this and related pages is copyright (c) James S. 2024