EmbeddedRelated.com
Forums

CDC problem - My bulk in endpoint freezes after 1 transmission.

Started by slouwilson78 September 11, 2008
Hi all,

I have the exact same problem as described here by Cliff.

http://www.embeddedrelated.com/groups/AT91SAM/show/2053.php

However, my bulk in endpoint is set up for bulk(b0010) not iso. Does
anyone else have any ideas or tips to give me in debugging this
problem?

I have usbsniffers and can view my bulk out endpoint working
correctly. When i transmit a character out of the hyperterm I can
view it using a breakpoint at my bulk out int handler. I then put
this character into UDPRegisters->UDP_FDR[AT91C_EP_IN] and set
AT91C_UDP_TXPKTRDY. It works once then stops transmitting. TXPKTRDY
never clears TXCOMP interrupt never fires.

Please can anyone help me before I pull my hair out?

Thanks

swilson
The problem with the bulk-in endpoint was caused by a
misconfiguration of the 4th endpoint, which should have been an
interrupt endpoint, but instead it was configured as iso in the
example driver. The control, bulk-in, and bulk-out endpoints were
always configured correctly.

The misconfiguration of the interrupt endpoint killed the bulk-in
endpoint on _some_ versions of host controllers. In other words, it
worked fine with some computers but didn't work with others. Recheck
the configuration of all of the endpoints.

Cliff
Hi Cliff,

Thanks for the reply.

I don't have a 4th endpoint.

I have checked and rechecked my descriptors. Can you check them for
me please?

I am also using 6119.inf with usbser.sys. Is this what you were
using? I have tried using 6124.sys but I cannot get it to work with
6119.inf.



Any help is really appreciated....

Thanks

swilson
--- In A..., "slouwilson78" wrote:
>
> Hi Cliff,
>
> Thanks for the reply.
>
> I don't have a 4th endpoint.

Yes, you do. :)

> // Endpoint 1 descriptor
> 0x07, // bLength
> 0x05, // bDescriptorType
> 0x83, // bEndpointAddress, Endpoint 01 - IN 333333
> 0x03, // bmAttributes INT
> 0x0a, // wMaxPacketSize
> 0x00,
> 0x00, // bInterval

The comment is wrong, this is an Endpoint 3 (the 4th endpoint)
descriptor, and it's being configured as an interrupt in. I believe
the interrupt in is required for the serial class driver whether you
use it or not (I'm not 100% sure about that).

Now make sure you have something like this in the init code:

pUDP->UDP_CSR[3] = AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN;

That was the line that got me. I believe it was originally
indicating that endpoint 3 was an ISO endpoint.

Cliff
Thanks so much for your reply.

I didn't understand this properly at all. I thought that was my
control endpoint. So I

I still have some other issues (my config set up) but its working a
lot more reliably now.

I am so relieved!

Thanks.....