EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Anyone with success with TUSB3410 interfacing to MSP430?

Started by Kipton Moravec December 14, 2006
I needed a MSP430f1610 with USB.

I followed the schematics in the application note, but I can't figure
out the software. It looks like there are so many ways to do it, and I
can't find one that works.

The first problem I have is trying to figure out the baud rate on the
serial side. I do not see any examples of setting it. I would have
thought it would be one of the EEPROM parameters, but it is not.

I took the code out of the applications note and it would not work out
of the box, it hung trying to determine if there was an EEPROM.

So I started looking for the technique for loading from the USB side.
The applications notes reference each other and none of them tell you
how to do it from A to Z, because they talk about the TUSB3210,
TUSB3410, TUSB5052, and TUSB6250. I guess they just assume you can
connect all of the dots. And they reference some code that is not easy
to find on TI's web site. (It took a while, but finally found it. One
would think to search for the code name in the TI document would do it,
but it didn't.)

Even though the board is working except for the USB, I am thinking of
redoing it with a simpler chip that is easier. My Linux friend is
recommending a PL-2303 as it is well supported with Linux and "just
works".

We loaded the TUSB3410 Linux drivers, and it tells if it is plugged in
or not, but does not make connection.

Has anyone outside of TI got this to work?

I have spent 2 weeks on it and am nowhere, and I normally do not get
stuck. The fall back plan is to hack a USB to serial cable for this
version of the prototype, and rip the USB chip off the board.

Kip
--
Kipton Moravec

Beginning Microcontrollers with the MSP430

Kipton Moravec wrote:

>I needed a MSP430f1610 with USB.
>
>I followed the schematics in the application note, but I can't figure
>out the software. It looks like there are so many ways to do it, and I
>can't find one that works.
>
>The first problem I have is trying to figure out the baud rate on the
>serial side. I do not see any examples of setting it. I would have
>thought it would be one of the EEPROM parameters, but it is not.
>
>I took the code out of the applications note and it would not work out
>of the box, it hung trying to determine if there was an EEPROM.
>
>
How did it hang? Swinging to the left and right or just stayed still?

>So I started looking for the technique for loading from the USB side.
>The applications notes reference each other and none of them tell you
>how to do it from A to Z, because they talk about the TUSB3210,
>TUSB3410, TUSB5052, and TUSB6250. I guess they just assume you can
>connect all of the dots. And they reference some code that is not easy
>to find on TI's web site. (It took a while, but finally found it. One
>would think to search for the code name in the TI document would do it,
>but it didn't.)
>
>
Sometimes an apps engineer is so busy with a dozen other projects,
assumptions can be made.

>Even though the board is working except for the USB, I am thinking of
>redoing it with a simpler chip that is easier. My Linux friend is
>recommending a PL-2303 as it is well supported with Linux and "just
>works".
>
>We loaded the TUSB3410 Linux drivers, and it tells if it is plugged in
>or not, but does not make connection.
>
>
Ah Linux! Who wrote this driver and is there anyone you can actually
pay for support?

>Has anyone outside of TI got this to work?
>
>
I think you should first ask if you are the first one outside of TI to
even bother to try this?

>I have spent 2 weeks on it and am nowhere, and I normally do not get
>stuck. The fall back plan is to hack a USB to serial cable for this
>version of the prototype, and rip the USB chip off the board.
>
>
Not a bad idea if you ask me.

>Kip
>
>
On Thu, 2006-12-14 at 13:19 -0800, Steve Sabram wrote:
> Kipton Moravec wrote:
>
> >I needed a MSP430f1610 with USB.
> >
> >I followed the schematics in the application note, but I can't figure
> >out the software. It looks like there are so many ways to do it, and
> I
> >can't find one that works.
> >
> >The first problem I have is trying to figure out the baud rate on the
> >serial side. I do not see any examples of setting it. I would have
> >thought it would be one of the EEPROM parameters, but it is not.
> >
> >I took the code out of the applications note and it would not work
> out
> >of the box, it hung trying to determine if there was an EEPROM.
> >
> >
> How did it hang? Swinging to the left and right or just stayed still?

Here is the code from the TI demo software:

unsigned char EEPROM_CheckNACK(void)
{
while (I2CDCTL & I2CBUSY); // Wait for I2C module
U0CTL &= ~I2CEN;
I2CTCTL |= I2CRM; // Disable repeat mode
U0CTL |= I2CEN;

U0CTL |= MST; // I2C master mode
I2CTCTL |= I2CTRX; // Transmit mode (R/W
bit = 0)
I2CIFG &= ~NACKIFG; // Clear interrupt flag
I2CTCTL |= I2CSTT; // Send slave address
// It hangs on the next line
while (I2CTCTL & I2CSTT); // Start condition
I2CTCTL |= I2CSTP; // Stop condition
while (I2CDCTL & I2CBUSY); // Wait until finished

U0CTL &= ~I2CEN;
I2CTCTL &= ~I2CRM; // Enable repeat mode
U0CTL |= I2CEN;

if (I2CIFG & NACKIFG) // NACK received?
return true; // EEPROM not ready/not
detected
else
return false; // EEPROM detected
}

>
> >So I started looking for the technique for loading from the USB side.
> >The applications notes reference each other and none of them tell you
> >how to do it from A to Z, because they talk about the TUSB3210,
> >TUSB3410, TUSB5052, and TUSB6250. I guess they just assume you can
> >connect all of the dots. And they reference some code that is not
> easy
> >to find on TI's web site. (It took a while, but finally found it. One
> >would think to search for the code name in the TI document would do
> it,
> >but it didn't.)
> >
> >
> Sometimes an apps engineer is so busy with a dozen other projects,
> assumptions can be made.
>
> >Even though the board is working except for the USB, I am thinking of
> >redoing it with a simpler chip that is easier. My Linux friend is
> >recommending a PL-2303 as it is well supported with Linux and "just
> >works".
> >
> >We loaded the TUSB3410 Linux drivers, and it tells if it is plugged
> in
> >or not, but does not make connection.
> >
> >
> Ah Linux! Who wrote this driver and is there anyone you can actually
> pay for support?

http://focus.ti.com/docs/toolsw/folders/print/tusbwinvcp.html

These drivers are not compatible with WinCE or WinXP-Embedded.

Beta Linux drivers are also available from our third party Brimson Labs
(www.brimson.com) for the following kernels:

* Linux kernel 2.4 (beta)
* Linux kernel 2.6.9 (beta)

Now I have to find out if the Nokia 770 runs 2.4 or 2.6. Their release
notes say 2.4 will not download the software if no EEPROM is present,
2.6 will.
>
> >Has anyone outside of TI got this to work?
> >
> >
> I think you should first ask if you are the first one outside of TI
> to
> even bother to try this?

It is more important to find someone who has been successful.

>
> >I have spent 2 weeks on it and am nowhere, and I normally do not get
> >stuck. The fall back plan is to hack a USB to serial cable for this
> >version of the prototype, and rip the USB chip off the board.
> >
> >
> Not a bad idea if you ask me.

I opened up a Q-Stor USB to Serial adapter. I was able to cut the molded
part with box cutters, and the inside was potted. I carved the potting
until I hit the edge of the board. Then I was able to pry the potting
off the top and bottom of the board. They were nice enough to wrap the
board in masking tape prior to potting so the potting came off easily.
After unwrapping the masking tape, I had a relatively clean little
board. And it still works.

The USB connector from the Nokia 770 does not supply 5V, it expects 5V
so I have to add a 5V regulator, but this may work for now. I normally
have only 3.3V on the board.

Kip

--
Kipton Moravec
Kipton Moravec wrote:

>On Thu, 2006-12-14 at 13:19 -0800, Steve Sabram wrote:
>
>
>>Kipton Moravec wrote:
>>
>>
>>
>>>I needed a MSP430f1610 with USB.
>>>
>>>I followed the schematics in the application note, but I can't figure
>>>out the software. It looks like there are so many ways to do it, and
>>>
>>>
>>I
>>
>>
>>>can't find one that works.
>>>
>>>The first problem I have is trying to figure out the baud rate on the
>>>serial side. I do not see any examples of setting it. I would have
>>>thought it would be one of the EEPROM parameters, but it is not.
>>>
>>>I took the code out of the applications note and it would not work
>>>
>>>
>>out
>>
>>
>>>of the box, it hung trying to determine if there was an EEPROM.
>>>
>>>
>>>
>>>
>>How did it hang? Swinging to the left and right or just stayed still?
>>
>>Here is the code from the TI demo software:
>
>unsigned char EEPROM_CheckNACK(void)
>{
> while (I2CDCTL & I2CBUSY); // Wait for I2C module
> U0CTL &= ~I2CEN;
> I2CTCTL |= I2CRM; // Disable repeat mode
> U0CTL |= I2CEN;
>
> U0CTL |= MST; // I2C master mode
> I2CTCTL |= I2CTRX; // Transmit mode (R/W
>bit = 0)
> I2CIFG &= ~NACKIFG; // Clear interrupt flag
> I2CTCTL |= I2CSTT; // Send slave address
>// It hangs on the next line
> while (I2CTCTL & I2CSTT); // Start condition
> I2CTCTL |= I2CSTP; // Stop condition
> while (I2CDCTL & I2CBUSY); // Wait until finished
>
> U0CTL &= ~I2CEN;
> I2CTCTL &= ~I2CRM; // Enable repeat mode
> U0CTL |= I2CEN;
>
> if (I2CIFG & NACKIFG) // NACK received?
> return true; // EEPROM not ready/not
>detected
> else
> return false; // EEPROM detected
>}
>
>
Can't immedately see a problem 'til I move into billable-hours-mode.

>
>
>>>So I started looking for the technique for loading from the USB side.
>>>The applications notes reference each other and none of them tell you
>>>how to do it from A to Z, because they talk about the TUSB3210,
>>>TUSB3410, TUSB5052, and TUSB6250. I guess they just assume you can
>>>connect all of the dots. And they reference some code that is not
>>>
>>>
>>easy
>>
>>
>>>to find on TI's web site. (It took a while, but finally found it. One
>>>would think to search for the code name in the TI document would do
>>>
>>>
>>it,
>>
>>
>>>but it didn't.)
>>>
>>>
>>>
>>>
>>Sometimes an apps engineer is so busy with a dozen other projects,
>>assumptions can be made.
>>
>>
>>
>>>Even though the board is working except for the USB, I am thinking of
>>>redoing it with a simpler chip that is easier. My Linux friend is
>>>recommending a PL-2303 as it is well supported with Linux and "just
>>>works".
>>>
>>>We loaded the TUSB3410 Linux drivers, and it tells if it is plugged
>>>
>>>
>>in
>>
>>
>>>or not, but does not make connection.
>>>
>>>
>>>
>>>
>>Ah Linux! Who wrote this driver and is there anyone you can actually
>>pay for support?
>>
>>http://focus.ti.com/docs/toolsw/folders/print/tusbwinvcp.html
>
>These drivers are not compatible with WinCE or WinXP-Embedded.
>
>Beta Linux drivers are also available from our third party Brimson Labs
>(www.brimson.com) for the following kernels:
>
> * Linux kernel 2.4 (beta)
> * Linux kernel 2.6.9 (beta)
>
>Now I have to find out if the Nokia 770 runs 2.4 or 2.6. Their release
>notes say 2.4 will not download the software if no EEPROM is present,
>2.6 will.
>
>
Again who wrote these?

>
>
>
>>>Has anyone outside of TI got this to work?
>>>
>>>
>>>
>>>
>>I think you should first ask if you are the first one outside of TI
>>to
>>even bother to try this?
>>
>>It is more important to find someone who has been successful.
>
>
There may have been noone that has been successful. If so, you can
learn from the mistakes of others instead of your own. Don't assume
this was already done.

>
>
>>>I have spent 2 weeks on it and am nowhere, and I normally do not get
>>>stuck. The fall back plan is to hack a USB to serial cable for this
>>>version of the prototype, and rip the USB chip off the board.
>>>
>>>
>>>
>>>
>>Not a bad idea if you ask me.
>>
>>I opened up a Q-Stor USB to Serial adapter. I was able to cut the molded
>part with box cutters, and the inside was potted. I carved the potting
>until I hit the edge of the board. Then I was able to pry the potting
>off the top and bottom of the board. They were nice enough to wrap the
>board in masking tape prior to potting so the potting came off easily.
>After unwrapping the masking tape, I had a relatively clean little
>board. And it still works.
>
>The USB connector from the Nokia 770 does not supply 5V, it expects 5V
>so I have to add a 5V regulator, but this may work for now. I normally
>have only 3.3V on the board.
>
>
Voltage regulartors such as the TI REF711 series is wonderful for this.

>Kip
>
>
>
On Fri, 2006-12-15 at 04:56 -0600, Jose I Quinones wrote:
> Hi Kipton,
>
> I have used the TUSB3410 on two of my designs and have found the
> typical
> learning curve issues. Here is what I suggest:
>
> 1. Make sure the 12MHz Xtal on the TUSB3410 is oscillating.
> 2. Make sure the drivers are installed properly. I have found the
> drivers to not install as they should under Windows XP. Then you have
> to
> uninstall them and install them again, until you see both the serial
> port
> and the VCP running properly. I am not aware of how to deal with this
> under
> Linux.

Which drivers are you using under XP? (I will start there then move to
Linux after it is communicating.)

> 3. The other item that bit me was the two 33 ohm resistors at the
> differential data inputs. I had not placed them and the device would
> not
> work. Be certain they are there!

I have them.

> 4. There is one input (I will have to get back at you at which one is
> it) which I had to ground (although the app files say this was not
> necessary) in order for the device to work. This was the hardest item
> to
> find, but once it took place, the device worked perfectly! Have been
> using
> it for over a year with no problems.

This is what I am looking for.
I may have the same problem. What is the input pin?

> Hope the info helps. Good luck!
>
> www.avayan.com _____
>
> From: m... [mailto:m...] On Behalf
> Of
> Kipton Moravec
> Sent: Thursday, December 14, 2006 2:06 PM
> To: m...
> Subject: [msp430] Anyone with success with TUSB3410 interfacing to
> MSP430?
>
> I needed a MSP430f1610 with USB.
>
> I followed the schematics in the application note, but I can't figure
> out the software. It looks like there are so many ways to do it, and I
> can't find one that works.
>
> The first problem I have is trying to figure out the baud rate on the
> serial side. I do not see any examples of setting it. I would have
> thought it would be one of the EEPROM parameters, but it is not.
>
> I took the code out of the applications note and it would not work out
> of the box, it hung trying to determine if there was an EEPROM.
>
> So I started looking for the technique for loading from the USB side.
> The applications notes reference each other and none of them tell you
> how to do it from A to Z, because they talk about the TUSB3210,
> TUSB3410, TUSB5052, and TUSB6250. I guess they just assume you can
> connect all of the dots. And they reference some code that is not easy
> to find on TI's web site. (It took a while, but finally found it. One
> would think to search for the code name in the TI document would do
> it,
> but it didn't.)
>
> Even though the board is working except for the USB, I am thinking of
> redoing it with a simpler chip that is easier. My Linux friend is
> recommending a PL-2303 as it is well supported with Linux and "just
> works".
>
> We loaded the TUSB3410 Linux drivers, and it tells if it is plugged in
> or not, but does not make connection.
>
> Has anyone outside of TI got this to work?
>
> I have spent 2 weeks on it and am nowhere, and I normally do not get
> stuck. The fall back plan is to hack a USB to serial cable for this
> version of the prototype, and rip the USB chip off the board.
>
> Kip
> --
> Kipton Moravec >
>
--
Kipton Moravec
On Thu, 2006-12-14 at 15:43 -0800, Steve Sabram wrote:
> Kipton Moravec wrote:
> >>>
> >>Ah Linux! Who wrote this driver and is there anyone you can
> actually
> >>pay for support?
> >>
> >>
> >
> >http://focus.ti.com/docs/toolsw/folders/print/tusbwinvcp.html
> >
> >These drivers are not compatible with WinCE or WinXP-Embedded.
> >
> >Beta Linux drivers are also available from our third party Brimson
> Labs
> >(www.brimson.com) for the following kernels:
> >
> > * Linux kernel 2.4 (beta)
> > * Linux kernel 2.6.9 (beta)
> >
> >Now I have to find out if the Nokia 770 runs 2.4 or 2.6. Their
> release
> >notes say 2.4 will not download the software if no EEPROM is present,
> >2.6 will.
> >
> >
> Again who wrote these?

I am guessing that Brimson Labs wrote them for TI.

>
> >
> >
> >
> >>>Has anyone outside of TI got this to work?

> >>I think you should first ask if you are the first one outside of TI
> >>to
> >>even bother to try this?
> >>
> >>
> >
> >It is more important to find someone who has been successful.
> >
> >
> There may have been noone that has been successful. If so, you can
> learn from the mistakes of others instead of your own. Don't assume
> this was already done.

It seem odd that nobody has done this. But it is possible.

Kip

--
Kipton Moravec
----- Original Message -----
From: "Kipton Moravec"
To:
Sent: Thursday, December 14, 2006 8:05 PM
Subject: [msp430] Anyone with success with TUSB3410 interfacing to MSP430?
>I needed a MSP430f1610 with USB.
>
> I followed the schematics in the application note, but I can't figure
> out the software. It looks like there are so many ways to do it, and I
> can't find one that works.
>
> The first problem I have is trying to figure out the baud rate on the
> serial side. I do not see any examples of setting it. I would have
> thought it would be one of the EEPROM parameters, but it is not.
>
> I took the code out of the applications note and it would not work out
> of the box, it hung trying to determine if there was an EEPROM.
>
> So I started looking for the technique for loading from the USB side.
> The applications notes reference each other and none of them tell you
> how to do it from A to Z, because they talk about the TUSB3210,
> TUSB3410, TUSB5052, and TUSB6250. I guess they just assume you can
> connect all of the dots. And they reference some code that is not easy
> to find on TI's web site. (It took a while, but finally found it. One
> would think to search for the code name in the TI document would do it,
> but it didn't.)
>
> Even though the board is working except for the USB, I am thinking of
> redoing it with a simpler chip that is easier. My Linux friend is
> recommending a PL-2303 as it is well supported with Linux and "just
> works".
>
> We loaded the TUSB3410 Linux drivers, and it tells if it is plugged in
> or not, but does not make connection.
>
> Has anyone outside of TI got this to work?
>
> I have spent 2 weeks on it and am nowhere, and I normally do not get
> stuck. The fall back plan is to hack a USB to serial cable for this
> version of the prototype, and rip the USB chip off the board.

Another easy chip to use for USB is the PIC18F2455:

http://www.leonheller.com/usb

Leon
--
Leon Heller, G1HSM
Suzuki SV1000S motorcycle
l...@bulldoghome.com
http://webspace.webring.com/people/jl/leon_heller/

The 2024 Embedded Online Conference