MSP430 Development with Linux

January 2nd, 2006 by Brian C. Lane in

Using Linux and the TI MSP430 processor to create blinking LEDs is a learning exercise, not just a way to make cheap Sci-Fi movie panels.

Linux embedded development doesn't only mean embedding Linux in a product, it also means using Linux as a development platform for embedded microprocessors. The majority of computer processors are not on the desktop or in Beowulf clusters, they are embedded in the millions of devices that you use every day: your alarm clock, microwave, thermostat, car, cell phone and so on. Linux can be used to develop software for embedded projects using microprocessors like the Microchip PIC, Atmel AVR, Philips LPC ARM and TI MSP430 devices.

You don't need to be a professional developer to have fun with these tiny computer devices. The development tools are inexpensive, and the hardware required is minimal. Soldering skills and some experience writing in C are really all you need to get started creating a controller for your next Sumo Bot, remote controlled helicopter or digital lock.

The Texas Instruments (TI) MSP430 family of microprocessors have a wide range of features:

  • Power consumption as low as 0.1uA in off mode.

  • Multiple 16-bit timers with capture/compare.

  • PWM outputs, which are very useful for robotics.

  • A/D converters for monitoring sensors.

  • SPI and Asynchronous UARTs for communications.

  • Integrated LCD display controllers.

  • Onboard oscillators.

  • Multiple clock sources for low-power sleep modes.

The '430 family includes more than 80 devices in four major groups. Flash, where the program is stored, ranges from a paltry 1KB to an extravagant 60KB. The available RAM is as large as 5KB or as small as 128 bytes.

Of course, 128 bytes isn't much RAM, but it is enough to get the job done for small projects. Many of my embedded projects are written in assembly code to conserve space, but with the MSP430, I have found myself using C as the primary language. Instead of using a commercial compiler or IDE, I have chosen to use the GNU GCC toolchain, which has had MSP430 support added to it. The GCC compiler does a pretty good job of generating code, and C is certainly the better choice if the the code is going to be maintained over a number of years. There's nothing worse than returning to heavily optimized assembly project five years later and trying to make adjustments without the whole system crumbling to its knees.

With the Microchip PIC processors that I wrote about in 1998, the development process was a bit tedious. I would write some code, compile it, flash the PIC, wonder why it didn't work and then repeat. I used a couple of I/O lines and LEDs as debugging tools, but there's only so much information that you can grok from two flashing LEDs. I really had no way to know exactly what was going on inside the processor when things went wrong. One solution could have been to buy an In Circuit Emulator (ICE). An In Circuit Emulator is a device you plug in to the socket where the processor normally goes. It emulates the CPU and lets you examine every instruction, memory locations and much more. But the $1,200+ US price for an ICE was out of my reach.

Today, things are much easier for both the the hobbyist and professional. Many of the newer processors include built in real-time debugging support using the IEEE Std 1149.1 JTAG specification. This six-wire interface allows real-time debugging of the software running on the target device. You can step through your code, watch registers and memory locations change, insert breakpoints and modify RAM on the fly. This is a dramatic improvement over the old 1- or 2-bit diagnostic line.

Instead of dropping a dozen c-notes on expensive debugging tools, you can get a parallel port JTAG adapter from Olimex for the amazing price of $15 US. This allows people to debug their code with interactive debuggers like gdb instead of relying on blinking LEDs and serial ports.

Setting Up MSP430 Software Development

MSP430 support was added to GCC by a group headed by Dimitry Diky and Chris Lichti. Their project includes the gcc compiler, linker, libraries, gdb debugger and a closed-source interface to the parallel JTAG adapter. The main emphasis of the mspgcc project has been on the Windows. Getting it working on Linux is a bit of a struggle, involving compiling the alternate toolchain, libraries and so on. Maybe I'm getting old, lazy or just used to .deb and .rpm packages, but these days, I prefer not to fight with the software I'm installing. Running rpm -Uhv <package> saves my energy for debugging my MSP430 code.

Thanks to Stephan Linz and his Cross Development Kit for MSP430, I don't need to spend more than five minutes installing development tools. He has done all the hard work getting mspgcc compiled and packaged as RPMs. Stephen also has created Cross Development Kits for the AVR processor and the Altera soft core NIOS, if you are interested in those target processors. If I ever need to write code for the AVR, I know where to go.

The cdk4msp project is available from SourceForge, and here is a minimal list of the packages that need to be installed from the cdk4msp SourceForge download page:

  • cdk-msp-base-0.2-20031111.i386.rpm

  • cdk-msp-binutils-2.14-20031106.i386.rpm

  • cdk-msp-examples-libc-20031101cvs-20031102.noarch.rpm

  • cdk-msp-examples-mspgcc-20031101cvs-20031102.noarch.rpm

  • cdk-msp-gcc-3.3.2-20031106.i386.rpm

  • cdk-msp-gdb-5.1.1-20031106.i386.rpm

  • cdk-msp-gdb-proxy-5.1.1-20031106.i386.rpm

  • cdk-msp-jtag-lib-20031101cvs-20031102.i386.rpm

  • cdk-msp-libc-20031101cvs-20031102.noarch.rpm

Additional document packages can be downloaded, depending on your preference for man pages, info files, PDF or HTML pages. I have successfully used these packages on Fedora Core releases 1 through 4, and although I haven't tried any other RPM-based distributions, I expect them to work just fine. These RPM packages function as a self-contained unit, and don't depend on any outside packages.

Install the packages in this order with the following commands:

rpm -Uhv cdk-msp-base-0.2-20031111.i386.rpm
rpm -Uhv cdk-msp-binutils-2.14-20031106.i386.rpm
rpm -Uhv cdk-msp-libc-20031101cvs-20031102.noarch.rpm
rpm -Uhv cdk-msp-gcc-3.3.2-20031106.i386.rpm
rpm -Uhv cdk-msp-gdb-5.1.1-20031106.i386.rpm
rpm -Uhv cdk-msp-jtag-lib-20031101cvs-20031102.i386.rpm
rpm -Uhv cdk-msp-gdb-proxy-5.1.1-20031106.i386.rpm
rpm -Uhv cdk-msp-examples-libc-20031101cvs-20031102.noarch.rpm
rpm -Uhv cdk-msp-examples-mspgcc-20031101cvs-20031102.noarch.rpm

The install places everything in the directory tree below /opt/cdk4msp. Take a look at the examples in /opt/cdk4msp/examples/mspgcc and the documents in /opt/cdk4msp/doc, info and man directories, depending on which style of documentation you installed.

A Simple Blinking LED

Blinking an LED is the embedded equivalent of “Hello World”. We will modify one of the examples to make it a little easier to understand. Copy the leds example from /opt/cdk4msp/examples/mspgcc/leds/ to a working directory, and replace main.c with the simplified version below. Edit the Makefile and set the CPU variable to msp430x149 so that it compiles for the correct target. If you are using a different version of the MSP430, you can get a list of the supported types by running msp430-gcc --target-help | less and then set CPU to the appropriate type.

Figure 1. Picture of My LED Blinker Development Board and JTAG Adapter

Figure 2. Simple Schematic of the LED Blinker Setup

Replacement for main.c:


/* Simple LED Blinker program for MSP430 */
#include <msp430x14x.h>

/* Brute Force delay loop */
void delay(unsigned int d)
{
    for (; d>0; d--) {
        nop();
        nop();
    }
}

int main( void )
{
    /* Init watchdog timer to off */
    WDTCTL = WDTPW|WDTHOLD;

    /* Init Output ports to GND */
    P1OUT  = 0x00;
    P2OUT  = 0x00;

    /* I/O not module control */
    P1SEL  = 0x00;
    P2SEL  = 0x00;

    /* Setup the data direction registers
       P1.0 output, input on the rest
    */
    P1DIR  = 0x01;
    P2DIR  = 0x00;

    /* No Interrupts on Port Pins */
    P1IES  = 0x00;
    P2IES  = 0x00;
    P1IE   = 0x00;
    P2IE   = 0x00;

    /* Loop until the universe breaks down */
    while (1) {
        /* Toggle P1.0 ouput pin */
        P1OUT ^= 0x01;

        /* Delay for a while before blinking */
        delay(0x4fff);
    }  /* while */
}

Run make to compile it. You should see no warnings or errors:

msp430-gcc -mmcu=msp430x149 -O2 -Wall -g   -c -o main.o main.c
msp430-gcc -mmcu=msp430x149 -o leds.elf main.o
msp430-objcopy -O ihex leds.elf leds.a43
msp430-objdump -dSt leds.elf >leds.lst

At this point, we have the software development set up, but no hardware to run it on or LEDS to blink.

MSP430 Simple Hardware Setup

Very little hardware or money is required to get started with the MSP430. You need a PC board with the processor on it and a JTAG adapter to connect the board to the parallel port. Olimex makes a number of inexpensive evaluation boards and JTAG adapters for the MSP430, ARM, AVR and PIC. In the US, their products are carried by a neat place called Spark Fun Electronics, which carries the Olimex boards as well as its own unique collection of adapter boards and projects. Table 1 shows what's needed to build the circuit on the schematic in Figure 1.

Table 1. Materials and Cost for Circuit

DescriptionPart #Price (US)
Olimex MSP430F149 header boardMSP-H149$22
Olimex MSP430 JTAG AdapterMSP-JTAG$15
AA battery pack from DigiKey2463K-ND$0.78
Red LED from DigiKey160-1499-ND$3.60/10
330-ohm resistor220QBK-ND$0.56/10
 Total:$41.96

One problem with low-powered devices like the MSP430 is that when you try to turn them off, they don't discharge the supply capacitors all the way to ground. This can result in a brownout condition where the processor won't reboot until reset properly. For the sake of simplicity, we are going to run the processor directly off of a pair of AA batteries. It will also run off the power from the JTAG adapter itself if you don't have any batteries handy.

In a production design, I would add a power supply with reset manager to prevent any brownout problems, but for our simple circuit, pulling the batteries loose for a few seconds is sufficient to reset it.

The next thing we need to do is set up the gdb proxy and JTAG software. This requires using the PC's parallel port, and if your Linux installation is set up to use a local printer, you need to remove the printer and disable the printer dæmon before you can use the port for JTAG. You also may need to add your development user to the group that has access to the port. On Fedora Core, this is the lp group, and you can add users to it by editing the /etc/group file as root.

Now that we have the required hardware set up, it's time to compile and flash our LED blinker program. In the directory where we ran make earlier, you can now run make download-jtag, and the program will be flashed into the target processor:

msp430-jtag -e leds.elf
MSP430 parallel JTAG programmer Version: 1.3
SHF_MASKPROC    = 0xf0000000
Mass Erase...
Program ...
188 bytes programmed.

Next, we need to start the gdb proxy that creates a local port for gdb to connect to and handles the communication with the target hardware. Run this in a second window, because it outputs debugging info to stdout while it is running:

msp430-gdbproxy --debug --port=2000 msp430

Remote proxy for GDB, v0.7.1, Copyright (C) 1999 Quality Quorum Inc.
MSP430 adaption Copyright (C) 2002 Chris Liechti and Steve Underwood

GDBproxy comes with ABSOLUTELY NO WARRANTY; for details
use --warranty' option. This is Open Source software. You are
welcome to redistribute it under certain conditions. Use the
'--copying' option for details.

debug:     msp430: msp430_open()
info:      msp430: Target device is a 'MSP430F149' (type 7)
notice:    msp430-gdbproxy: waiting on TCP port 2000

Figure 3. Simple Diagram of GDB to Target Board Connections

GDB needs to know how to connect to the MSP430 JTAG proxy port. Create a file named .gdbinit in your working directory and put the following three lines into it:

set remoteaddresssize 64
set remotetimeout 999999
target remote localhost:2000

Now we are ready to debug our LED blinker program. When you ran make download-jtag, the LED should have begun to blink, and when the gdbproxy was started, it should have stopped, because the processor is being held in reset by the JTAG.

Start debugging by using the msp430-gdb program:

msp430-gdb leds.elf

Run until main() by entering:

break main
c

Debug as you normally would. Here is an example session:

(gdb) break main
Breakpoint 1 at 0x1152: file main.c, line 16.
(gdb) c
Continuing.

Breakpoint 1, main () at main.c:16
16          WDTCTL = WDTPW|WDTHOLD;
(gdb) n
19          P1OUT  = 0x00;
(gdb) n
20          P2OUT  = 0x00;
(gdb) break delay
Breakpoint 2 at 0x1140: file main.c, line 7.
(gdb) c
Continuing.

Breakpoint 2, delay (d=20479) at main.c:7
7           for (; d>0; d--) {
(gdb) n
8               nop();
(gdb) n
9               nop();
(gdb) n
7           for (; d>0; d--) {
(gdb) print d
$1 = 20479
(gdb)

What's happening here is that the proxy is communicating with the JTAG adapter and opening up port 2000 to accept connections from the gdb debugger. The debugger needs to know where to connect to, hence the creation of the .gdbinit file with the port number and timeout in it. When you run msp430-gdb, it is making a TCP/IP connection to the JTAG proxy program, which is in turn communicating with the target hardware if all is going well.

Schematics and Custom PC Boards

Flashing LEDs get boring pretty quickly. Once you get the bugs worked out of your blinking LED, you probably are going to want to design a custom PC board with interfaces to the outside world. One of my projects is a one-wire lock controller with an RS232 interface that uses Dallas Semiconductor iButtons for access control.

For this project, I chose one of the smallest of the family, the MSP430F1101 with 1KB of Flash and 128 bytes of RAM. It uses a pair of transistors to switch a DC motor on and off and a MAX3221 for serial communications with a PC. The C code to control the lock just barely fits into the 1K Flash space of the '1101. A low dropout voltage regulator is used to power the board and provide a clean reset to the processor. I drew the schematic and designed the board using Eagle CAD Lite under Linux. Eagle has several versions of its schematic and PCB auto-router, including a free version for noncommercial use:

  • Free for noncommercial use.

  • Board size limited to 3.2"x4" and two layers.

  • One schematic sheet.

  • Lite version for $49 US with same limitations as the free version.

  • Standard version for $600 US.

  • Pro versions for $1,200 US.

  • Linux, Windows and Mac versions are available

Figure 4. Lock Project PC Board Layout from Eagle

Figure 5. Picture of the Prototype PC Board

Eagle CAD is easy to get started with, low cost and very powerful. A user scripting language allows you to add features and customize the program to fit your needs. User support for Eagle is very strong, and the Web site has an extensive collection of user-created libraries.

The Eagle auto-router supports advanced features like back-annotation, keepout areas, design rules checks and one of my favorites—flood fill with thermal relief. If you have ever tried to solder a pin surrounded by a large ground plane, you will appreciate the advantage of thermal relief on power pins. Without it the ground plane acts like a large heat-sink and solder won't stick. All levels of the PCB and Schematic editor support the concept of back (and forward) annotation. You can make changes on the PCB, and they will be reflected on the schematic and updates made to the schematic are reflected on the PCB.

After designing a PC board, you actually need to make one. You can etch your own, but it is difficult to match the quality of even the least-expensive board manufacturers. Some manufacturers will accept Eagle PCB files directly, which saves you the step of converting the design to the Gerber format. The Gerber format is a lot like an old pen plotter, it tells PCB etching equipment where to draw the trace and how large a line to draw. Most PCB manufacturers still require Gerber files, so Eagle includes a script to output the necessary Gerber files.

One difficulty in dealing with Gerber files is that although Eagle can export the PCB in the correct format, it has no way to view the output to verify it was converted correctly. Linux has needed a good Gerber viewer for years, but it has been available only with recent releases of the gerbv program. It isn't as intuitive as I would like, but it does function well enough to display the Gerber files so that you can check the final output before sending it off to have 1000 of your latest widget design created.

Figure 6. Picture of LinkWiFi PC Board

I have used four different PCB manufacturers myself. Their prices and features vary, but customer service and quality from all four have been excellent. Olimex and PCB Pool both accept Eagle CAD files directly, with no need for conversion to Gerber. Olimex is in Bulgaria, and turn-around time can be up to three weeks, but prices are excellent. PCB Pool is in Ireland and has quick turn-around or longer turn-around times, depending on price (as do most). I used PCB Pool for the one-wire Wi-Fi boards (Figure 6).

AP Circuits is in Canada and has very good prices and very fast turn-around. The bare one-wire lock boards were ordered on a Saturday, and I received them on Wednesday. I ordered them with no silkscreen or solder mask in order to keep the price low. For production, I used E-Teknet for my DT-1A temperature sensor boards with excellent results.

The MSP430 is a fun and easy-to-use processor; its wide range of features and access to free development tools and low-cost JTAG hardware make this processor a good choice for both the hobbyist and the professional developer. Using the GNU gcc toolchain reduces the learning curve and allows you to use the same tools for developing code on the MSP430 that you would use for Linux projects. My set of development tools includes make, gcc, gdb and joe.

Resources for this article: /article/8697.

Brian C. Lane lives in Port Orchard, Washington, with his wife and son, who is a huge Tux Racer fan. He serves as Webmaster For Life for the Kitsap Peninsula Linux User Group and writes Linux apps in his spare time.

__________________________


Special Magazine Offer -- 2 Free Trial Issues!
Receive 2 free trial issues of Linux Journal as well as instant online access to current and past issues. There's NO RISK and NO OBLIGATION to buy. CLICK HERE for offer

Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.

Sorry, offer available in the US only. International orders, click here.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

linux

On October 2nd, 2007 freenigma download (not verified) says:

threads? What are Thanks.

MSP430 Dev just got a lot easier and cheaper

On March 9th, 2007 Doug LaRue (not verified) says:

Nice article Brian but I just wanted to let everyone know that TI has a MSP430F2013 dev setup for $20 and it works with the msp430-dgbproxy. It's call the EZ430 and you can even get 3 extra msp4302012 boards for $10, also from TI.

Now the real 'goody' is that you can get Eclipse using standard packaging software in Ubuntu/Kubuntu/Edubuntu along with the CDT but it's an older CDT so I had to get v3.1.1 in .deb format elsewhere. I was also able to build the mspgcc tools, get the gdbproxy 'seeing' the USB based EZ430 and coding/debugging from within Eclipse.

Pretty awesome. I'll be putting together some online pages to help anybody through this and will post the link ASAP.

Oh, supposedly, the MSP430-JTAG-UIF adapter works the same as the EZ430 adapter since they both have the same USB ID. The difference is the EZ430 uses the 4 wire spy-bi-wire interface and not the full JTAG interface. This does mean that a good number of other MSP430 chips can also be developed and debugged with the $20 EZ430 setup with the right wires/pins connected.

ez430 doc

On March 14th, 2008 Anonymous (not verified) says:

Hi there. Did you ever put up a tutorial for the ez430 and linux? im working in circles trying to get the two work together.

thanks
wernher

ez430 doc

On April 13th, 2008 Anonymous (not verified) says:

Hi Wernher,

please have a look at this resources:

ftp://ftp.fl.priv.at/pub/msp430/
(Thanks to Friedrich Lobenstock)

I 've got it work on a openSuse 10.2 (32Bit) System. If you use the build.sh, it should install from sources for another distribution too.
To avoid a lot of errors download the complete "downloads" dir to your install directory before you start. There are also a few problems with the pathes in build.sh - you should solve them.

Good luck,

Wolfram

help help help

On February 3rd, 2007 Ankur shah (not verified) says:

neeed desperate help!
i am a first time user of gcc and am trying to work out things for a project. howeve a silly thing frustrates me. can anyone tell me how one can read or retrieve data from the keyboard using gcc?? i am finding it difficlut using scanf or even commands like getchar, which my system doesnt recognise? are there any other ways??

msp430 and Linux 10 64bit

On October 19th, 2006 Parseval (not verified) says:

Hello,

I'am trying a solution of the cdk-msp under linux 10 64bit since 3 days now and it is making me crazy.

I cann't use the src.rpm (error: Legacy syntax is unsupported: copyright).

My problem is to get the connection to the JTAG Interface with the msp430-jtag or the msp430-dbgproxy.

Can someone help me plz.

thx
Parseval

64 Bit MSP

On April 16th, 2007 amattas (not verified) says:

Were you ever able to get 64Bit MSP430 to work?

Eagle, PCB Fabrication

On October 6th, 2006 Frank Chambers (not verified) says:

The Eagle website www.cadsoftusa.com has links to several PCB suppliers that can and will work directly from Eagle .brd files. I have used these services for several years and have obtained very good results at a low cost. The company I have done the most with CustomPCB seeems to prefer working with the brd file and provides a rules file for design check prior to sending the file.

This saves the extra steps of converting to Gerber and then trying to see if it is correct.

Frank

excellent article

On February 1st, 2006 timborn says:

I look forward to LJ every month, and with few exceptions read every article. The quality and caliber is uniformly high.

This particular article, however, got positively dog-eared from being re-read a half dozen times. It rekindled a lost love of micros and tinkering. I had flashbacks of when Ciarcia wrote Circuit Celler articles for BYTE many years back (yep, I know about Circuit Cellar Ink, but I'm basically a sotfware guy with a hardware itch, and most of those articles are lost on me).

I would love to see more articles along this line, perhaps expanding on the board layout & etching process eluded to at the tail end of the article. I have etched boards before at home; it's a pain. Clearly there are better ways available now.

Curious how one goes about installing surface mount chips, since it looks like the MSP430 are all surface mount - no bugs with legs for tinkerers!

I make a lot of my own PCBs

On February 7th, 2006 Leon Heller (not verified) says:

I make a lot of my own PCBs at home, and don't have any problems soldering chips like the MSP430 - plenty of light, magnification and a good soldering iron (I use Metcal equipment) are essential.

Leon

Using MSP-430 USB debug interface

On August 3rd, 2006 Sameer (not verified) says:

Hi all,
I want to know whether we could work out programming and debugging msp430 using the MSP430-USB-Debug-Interface. I have MSPGCC's latest version. I tried download using msp430-jtag -e filename.elf but is don't seem to be working. I found very few explations about using USB interface for MSP430 on net.

Sameer S. Upasani
India, Pune

Using MSP430 - eZ430 on ubuntu / linux?

On May 16th, 2007 Arun (not verified) says:

Sameer/Anyone,
I would like to know if there is way to use the eZ430 USB stick on linux specifically on ubuntu! Any info in this regard will be of great help :-)
Thanks and regards,
Arun

Ez430 Linux USB Driver FIX!

On June 21st, 2007 Anonymous (not verified) says:

Hello,

After two days of searching the net, I finally found the fix we've been waiting for.
First, I made fetched ti_usb_3410_5052 v1.1 driver, hoping that would fix it (v0.9 is in the latest kernel for some reason.) After an hour of fixing it to compile with my ubuntu kernel, I was back to square one with this error (v1.1 just adds some product ids, doesn't seem to add any other functionality.)

[462913.996000] drivers/usb/serial/usb-serial.c: USB Serial support registered for TI USB 3410 1 port adapter
[462914.000000] drivers/usb/serial/usb-serial.c: USB Serial support registered for TI USB 5052 2 port adapter
[462914.000000] ti_usb_3410_5052 3-4:1.0: TI USB 3410 1 port adapter converter detected
[462914.000000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c: ti_startup - product 0xF430, num configurations 1, configuration value 1
[462914.000000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c: ti_startup - device type is 3410
[462914.000000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c: ti_download_firmware - downloading firmware
[462914.532000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c: ti_download_firmware - download successful
[462914.812000] usb 3-4: reset full speed USB device using ohci_hcd and address 58
[462915.020000] usb 3-4: device firmware changed
[462915.020000] usb 3-4: USB disconnect, address 58
[462915.020000] ti_usb_3410_5052: probe of 3-4:1.0 failed with error -5

That was the original error. Essentially, it is a bug in driver. After looking at 5+ patches, I ran across one by Oleg V.

It is also right here.

Quoting Oleg Verych <[EMAIL PROTECTED]>:

> pp-by: Oleg Verych
> ---
> i.e. no more uGLYdev with sysfs
>
> Alan, i'm looking forward to deal with this crutch :-E
>
> drivers/usb/serial/ti_usb_3410_5052.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-2.6.21-rc1/drivers/usb/serial/ti_usb_3410_5052.c
> ===================================================================
> --- linux-2.6.21-rc1.orig/drivers/usb/serial/ti_usb_3410_5052.c
> 2007-02-23
> 05:03:57.691537658 +0100
> +++ linux-2.6.21-rc1/drivers/usb/serial/ti_usb_3410_5052.c 2007-02-23
> 05:22:22.766512292 +0100
> @@ -389,13 +389,13 @@
> usb_reset_device(dev);
> }
>
> - status = -ENODEV;
> + status = 0x01E; /* positive status -- device to be reconfigured
> */
> goto free_tdev;
> }
>
> - /* the second configuration must be set (in sysfs by hotplug script) */
> if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) {
> - status = -ENODEV;
> + (void) usb_driver_set_configuration(dev, TI_ACTIVE_CONFIG);
> + status = 0xA1B;
> goto free_tdev;
> }
>
>
> --
>
>

http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg51855.html

So all you have to do, is download your kernel sources, and apply this patch. Now if yoti_usb_3410_5052ur kernel version is < 2.6.16 or so, you will also have to add in the PRODUCT_ids for the Ez430 device. I suggest you upgrade your kernel, since the product id fix is in kernels >~ 2.6.16 or so.

I applied the patch by hand, to the /usr/src/linux-source---/drivers/usb/serial/ti_usb_3410_5052.c file.

recompile.... And viola, it works! if I modprobe it before or after the device is inserted, no hotplug script needed!

Here is the working dmesg dump

[464233.560000] drivers/usb/serial/usb-serial.c: USB Serial support registered for TI USB 3410 1 port adapter
[464233.560000] drivers/usb/serial/usb-serial.c: USB Serial support registered for TI USB 5052 2 port adapter
[464233.564000] usbcore: registered new interface driver ti_usb_3410_5052
[464233.564000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c: TI USB 3410/5052 Serial Driver v1.1
[464241.468000] ti_usb_3410_5052 3-4:2.0: TI USB 3410 1 port adapter converter detected
[464241.468000] usb 3-4: TI USB 3410 1 port adapter converter now attached to ttyUSB0

So in conclusion, apply patch to a newer kernel, and enjoy. I'm glad I devoted my time into fixing this stupid problem once and for all.

--Tom Golubev

TI MSP-30 USB interface

On October 10th, 2006 Tommaso Toffoli (not verified) says:

Dear Sameer:

I'm very interested in that issue. I wonder whether you got any
responses to you enquiry, or in any event found some information on how to interface the MSP430 USB development kit to Linux. I would like to
drive the development (assembly/running/debugging from a Python environment.
Many thanks

Review

On September 9th, 2006 Bodo Michalski (not verified) says:

By reviewing your articles I found out that the quality is very high. I take a lot of advantages from the articles for my work. Thank you to the linux-team and all the comments.
Bodo Michalski from Germany

Featured Videos

Non-linear video editing tools are great, but they're not always the best tool for the job. This is where a powerful tool like ffmpeg becomes useful. This tutorial by Elliot Isaacson covers the basics of transcoding video, as well as more advanced tricks like creating animations, screen captures, and slow motion effects.

Shawn Powers reviews the HP Mini-Note portable computer.

Thanks to our sponsor: Silicon Mechanics

Silicon Mechanics is a leading manufacturer of rackmount servers, storage, and high performance computing hardware. The best warranty offerings available are backed by experts dedicated to customer satisfaction.

From the Magazine

August 2008, #172

There's nuttin like a Cool Project to give you some relief from the summer heat, so get out your parka cuz we got a bunch of em. First up is the BUG, not a bug, The BUG. It's got a GPS, camera and more, in a hand-sized package that's user programmable. The BUG does everything. It's both a floor wax and a dessert topping. Get one now. Need a software version of a Swiss Army knife? Take a look at Billix, and don't leave home without it. Then, chew on this one, an X server on a Gumstix device driving an E-Ink display. Need more storage? How about 16 Terabytes? Can do.

And, of course, we have the usual cast of characters: Marcel, Reuven, Dave, Kyle, Doc, plus the new kid on the block Shawn Powers. But it doesn't stop there: build a MythTV box on a budget, build your own GIS system, set up the tools to monitor your enterprise and more. Finally, remember The War of the Worlds? Now you can play too.

Read this issue