This is a guest post from PentiumPC who figured out a way to make the Launchpad’s serial port to work reliably on an OSX platform
I have been using CCS with Parallels(VM) on the Mac for my MSP430 development. Using a virtual machine for my development wasn’t a big deal but was hoping some of my Mac user friends to try out something with the Launchpad that I was working on. After spending a considerable amount of time learning how to program the LaunchPad and getting my code to work, I realised that the USB on the emulator won’t work on Mac.
After doing some research, it seems that a standard CDC device not need any extra drivers to work, but it looks like TI implemented a non standard CDC (Communication Device Class) device with the TUSB3410. The device consist of a Composite device with a CDC device for a Virtual Com Port and a HID for debugging. TI provided a driver for the WinXP but not other platform. A search on the net shows that this has been a long standing problem and there has been no fix from TI yet.
After running a few more tests in WinXP, I realized the Mac driver failed due to the control and data pipes sharing the same interface. Instead, there should be two separate interfaces. A short study on Apple’s CDC driver implementation show that OSX needed seperate drivers for the Control and Data interface.
When a LaunchPad is plugged into a Mac, OSX matches the driver to the device. Once matched, the CDC control driver loads and attaches to the MSP430 -FET device. Since the control and data are implemented as one interface, only a single driver can attach to it. The data driver is not loaded at all. The CDC driver times out trying to talk to the data driver and unloads.
If we can load two drivers for a single interface, that would solve the problem on a Mac, but to my knowledge that does not seem to be possible.
I picked up open source codes for the control and data driver from Apple’s Darwin site and set out to combine the two. The first task at hand was to make it work and after a quick mash up and a week of debugging I got it to work, still a little buggy but worked. After optimising and removing unused code from the source, I ran some tests on all the Macs at home and in the office, form OSX 10.6 to 10.7.1 the code work pretty well.
The new driver was published in the 43oh Forums for testing. The first few “not working” responses were disappointing. We later found it was due to a codeless Kext (driver) used for MSPdebug, blocking the CDC driver. I revised to code to include a driver to block the HID debug driver for MSPdebug and it seemed to work fine. Many thanks to fcobcn for helping me test the driver.
There was another bug that came up during testing – The CDC driver will attach to any CDC device. To avoid this, codes were added to the driver to load only if TI’s VID was found and unload if none are found. The driver now works well with TI’s device and will co-exist happily with other CDC devices like Arduinos or other USB com ports.
Many thanks to PentiumPC for doing up the driver and writing this report up. If you have any problems, you may comment below or ask it in the following forum thread. Drivers are also available in the first post of the thread linked below: