public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] USB on the AT91SAM7S
@ 2008-02-29 15:11 Frank Pagliughi
  2008-02-29 15:33 ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Frank Pagliughi @ 2008-02-29 15:11 UTC (permalink / raw)
  To: ecos-discuss

Hey All,

I just got an AT91SAM7S-EK board and tried playing around with the USB 
features under eCos. I'm having some trouble and am wondering if anyone 
knows whether the USB device driver for the chip/board is in an 
operational state. A few things I've seen so far:

- The board's target doesn't include the base USB I/O and slave packages
- The USB test application doesn't compile for the board
- All three of the general purpose endpoints are defined as receivers 
(usbs_rx_endpoint). Not one transmitter.
- The driver doesn't appear to set the function address register, 
UDP_FADDR, on a "set address" command.

So a fairly simple application that I have won't enumerate. I don't have 
my bus analyzer with me - when I get it I might know more.

But I's starting to think I'm completely missing something.

Thanks,
Frank

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] USB on the AT91SAM7S
  2008-02-29 15:11 [ECOS] USB on the AT91SAM7S Frank Pagliughi
@ 2008-02-29 15:33 ` Andrew Lunn
  2008-02-29 16:18   ` Frank Pagliughi
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2008-02-29 15:33 UTC (permalink / raw)
  To: Frank Pagliughi; +Cc: ecos-discuss

On Fri, Feb 29, 2008 at 10:10:27AM -0500, Frank Pagliughi wrote:
> Hey All,
>
> I just got an AT91SAM7S-EK board and tried playing around with the USB  
> features under eCos. I'm having some trouble and am wondering if anyone  
> knows whether the USB device driver for the chip/board is in an  
> operational state.

It does work. I've used it for real applications.

> A few things I've seen so far:
>
> - The board's target doesn't include the base USB I/O and slave packages

Just add it if you need it. It should not make a difference if it is
included or not, so i could permanently add it.

> - The USB test application doesn't compile for the board

True. In its default configuration it needs too much RAM. When testing
i hacked it so that it uses less threads and smaller stacks.  Running
the test then shows up what appears to be a hardware problem. The
first received packet on an EP does not cause an interrupt. You only
get the interrupt when the second packet is received. After that all
works well.

> - All three of the general purpose endpoints are defined as receivers  
> (usbs_rx_endpoint). Not one transmitter.

It will look at the enumeration data and determine the direction of
the endpoints. What does your enumeration say?

    Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] USB on the AT91SAM7S
  2008-02-29 15:33 ` Andrew Lunn
@ 2008-02-29 16:18   ` Frank Pagliughi
  2008-03-03 14:18     ` Frank Pagliughi
  0 siblings, 1 reply; 6+ messages in thread
From: Frank Pagliughi @ 2008-02-29 16:18 UTC (permalink / raw)
  To: andrew, ecos-discuss


> It does work. I've used it for real applications.
>   
Great! Sounds like I'm doing something wrong. I'll trek through the snow 
today to get my bus analyzer and look at it over the weekend.
>> - The USB test application doesn't compile for the board
>>     
>
> True. In its default configuration it needs too much RAM. When testing
> i hacked it so that it uses less threads and smaller stacks.  Running
> the test then shows up what appears to be a hardware problem. The
> first received packet on an EP does not cause an interrupt. You only
> get the interrupt when the second packet is received. After that all
> works well.
>   
The AT91 is probably the most "current" USB platform and driver (which 
is why I went out and bought one), so it would be great to have the test 
working - at least as an example for people like me trying to get it to 
run the first time. Sounds like your "hacked" version would be better 
than the version that's checked in now.
>   
>> - All three of the general purpose endpoints are defined as receivers  
>> (usbs_rx_endpoint). Not one transmitter.
>>     
>
> It will look at the enumeration data and determine the direction of
> the endpoints. What does your enumeration say?
>   
I have my own test application that has one IN and one OUT bulk 
endpoint. It uses the lower-level non-blocking API, with functions like:
     usbs_start_tx_buffer(usbs_tx_endpoint* ep, ...);

The first parameter is a pointer to a transmit endpoint 
(usbs_tx_endpoint). If the driver doesn't define any, how do I use this 
function?

Frank

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] USB on the AT91SAM7S
  2008-02-29 16:18   ` Frank Pagliughi
@ 2008-03-03 14:18     ` Frank Pagliughi
  2008-03-03 14:34       ` [ECOS] Intel e1000 driver Steve West
  2008-03-03 14:36       ` [ECOS] USB on the AT91SAM7S Andrew Lunn
  0 siblings, 2 replies; 6+ messages in thread
From: Frank Pagliughi @ 2008-03-03 14:18 UTC (permalink / raw)
  To: andrew, ecos-discuss


>
>>  
>>> - All three of the general purpose endpoints are defined as 
>>> receivers  (usbs_rx_endpoint). Not one transmitter.
>>>     
>>
>> It will look at the enumeration data and determine the direction of
>> the endpoints. What does your enumeration say?
>>   
>

Ah, so since they're binary compatible, the driver just overlays a 
'usbs_tx_endpoint' over one of the defined 'usbs_rx_endpoint' 
structures? So, say, if you define EP2 as IN (tx) then you can just cast 
the struct like this:

        usbs_tx_endpoint* tx_ep = (usbs_tx_endpoint*) &usbs_at91_ep2;

Is this correct?


Frank


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ECOS] Intel e1000 driver
  2008-03-03 14:18     ` Frank Pagliughi
@ 2008-03-03 14:34       ` Steve West
  2008-03-03 14:36       ` [ECOS] USB on the AT91SAM7S Andrew Lunn
  1 sibling, 0 replies; 6+ messages in thread
From: Steve West @ 2008-03-03 14:34 UTC (permalink / raw)
  To: ecos-discuss

Hello all,

    Does anyone have an updated e1000 driver that will handle ich8lan or 
device code 104b?

Steve 


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] USB on the AT91SAM7S
  2008-03-03 14:18     ` Frank Pagliughi
  2008-03-03 14:34       ` [ECOS] Intel e1000 driver Steve West
@ 2008-03-03 14:36       ` Andrew Lunn
  1 sibling, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2008-03-03 14:36 UTC (permalink / raw)
  To: Frank Pagliughi; +Cc: ecos-discuss

> Ah, so since they're binary compatible, the driver just overlays a  
> 'usbs_tx_endpoint' over one of the defined 'usbs_rx_endpoint'  
> structures? So, say, if you define EP2 as IN (tx) then you can just cast  
> the struct like this:
>
>        usbs_tx_endpoint* tx_ep = (usbs_tx_endpoint*) &usbs_at91_ep2;
>
> Is this correct?

It is a while since i used this code. What i have in my protocol
driver package is:

extern usbs_control_endpoint CYGDAT_IO_USB_RUP_EP0_STRUCT;
extern usbs_rx_endpoint CYGDAT_IO_USB_RUP_OUT_EP_STRUCT;
extern usbs_tx_endpoint CYGDAT_IO_USB_RUP_IN_EP_STRUCT;

Where CYGDAT_IO_USB_RUP_*_STRUCT are defined in my CDL for this
package. They default to usbs_at91_ep0, usbs_at91_ep1, usbs_at91_ep2
etc, but if i wanted to run this over a different USB device i can
just change the values of the CDL variables.

What you suggest should also work for the AT91.

  Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-03 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 15:11 [ECOS] USB on the AT91SAM7S Frank Pagliughi
2008-02-29 15:33 ` Andrew Lunn
2008-02-29 16:18   ` Frank Pagliughi
2008-03-03 14:18     ` Frank Pagliughi
2008-03-03 14:34       ` [ECOS] Intel e1000 driver Steve West
2008-03-03 14:36       ` [ECOS] USB on the AT91SAM7S Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).