Sam7X and the USB Device Port

View: New views
5 Messages — Rating Filter:   Alert me  

Sam7X and the USB Device Port

by Eric Haver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I have converted the Atmel CDC-Serial example to run under NutOS.

When I enable Endpoint0 in the UDP_IER and in UDP_CSR0, I can see it in the
UDP_IMR before I leave the interrupt, but on the next interrupt, the UDP_IMR
does not show Endpoint0 enabled.

Any ideas?

Thanks,

Eric
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion

Re: Sam7X and the USB Device Port

by Eric Haver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Eric Haver wrote:
I have converted the Atmel CDC-Serial example to run under NutOS.

When I enable Endpoint0 in the UDP_IER and in UDP_CSR0, I can see it in the
UDP_IMR before I leave the interrupt, but on the next interrupt, the UDP_IMR
does not show Endpoint0 enabled.

Any ideas?
Answering my own question here.
The ATMEL defines are not exactly the same as the NutOS Defines:
ATMEL:
#define     AT91C_CKGR_USBDIV_0                    (0x0 << 28) // (CKGR) Divider output is PLL clock output
#define     AT91C_CKGR_USBDIV_1                    (0x1 << 28) // (CKGR) Divider output is PLL clock output divided by 2
#define     AT91C_CKGR_USBDIV_2                    (0x2 << 28) // (CKGR) Divider output is PLL clock output divided by 4

In NutOS we see in at91_pmc.h:
#define CKGR_USBDIV_1               0x00000000  /*!< \brief Divider output is PLL clock output. */
#define CKGR_USBDIV_2               0x10000000  /*!< \brief Divider output is PLL clock output divided by 2. */
#define CKGR_USBDIV_4               0x20000000  /*!< \brief Divider output is PLL clock output divided by 4. */

So when I converted:
    AT91C_BASE_CKGR->CKGR_PLLR |= AT91C_CKGR_USBDIV_1 ;

it should have become:
    outr(CKGR_PLLR, inr(CKGR_PLLR) | CKGR_USBDIV_2) ;

instead of the obvious.

Einfach ist es immer, nicht.

*E

Re: Sam7X and the USB Device Port

by uprinz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


 Hi Eric!

Did you advance with the USB Port for SAM7X? Are you planning to contribute it to the community? Or did you stop on that?
May be I can help and integrate it to NutOS trunk?

Regards, Ulrich


 


 

-----Original Message-----
From: Eric Haver <havereric1@...>
To: Ethernut User Chat (English) <en-nut-discussion@...>
Sent: Mon, 16 Mar 2009 8:48 pm
Subject: [En-Nut-Discussion] Sam7X and the USB Device Port










Hi all,

I have converted the Atmel CDC-Serial example to run under NutOS.

When I enable Endpoint0 in the UDP_IER and in UDP_CSR0, I can see it in the
UDP_IMR before I leave the interrupt, but on the next interrupt, the UDP_IMR
does not show Endpoint0 enabled.

Any ideas?

Thanks,

Eric
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion



 

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion

Re: Sam7X and the USB Device Port

by Eric Haver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey U!

Unfortunately, that project went bust with the economy,  I am working on a
Luminary Micro-Cortex 3 project for someone else.
Send me a private email address, I will send you what I had done, no
problem.

*E

On Wed, Jun 10, 2009 at 9:17 AM, <uprinz2@...> wrote:

>
>  Hi Eric!
>
> Did you advance with the USB Port for SAM7X? Are you planning to contribute
> it to the community? Or did you stop on that?
> May be I can help and integrate it to NutOS trunk?
>
> Regards, Ulrich
>
>
>
>
>
>
>
> -----Original Message-----
> From: Eric Haver <havereric1@...>
> To: Ethernut User Chat (English) <en-nut-discussion@...>
> Sent: Mon, 16 Mar 2009 8:48 pm
> Subject: [En-Nut-Discussion] Sam7X and the USB Device Port
>
>
>
>
>
>
>
>
>
>
> Hi all,
>
> I have converted the Atmel CDC-Serial example to run under NutOS.
>
> When I enable Endpoint0 in the UDP_IER and in UDP_CSR0, I can see it in the
> UDP_IMR before I leave the interrupt, but on the next interrupt, the
> UDP_IMR
> does not show Endpoint0 enabled.
>
> Any ideas?
>
> Thanks,
>
> Eric
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>
>
>
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion

Re: Sam7X and the USB Device Port

by uprinz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


 Hi!

Thanks, I got the code but was not available on the (long) weekend. I'll have a look inside and will start an integration soon.

Regards, Ulrich


 


 

-----Original Message-----
From: Eric Haver <havereric1@...>
To: Ethernut User Chat (English) <en-nut-discussion@...>
Sent: Wed, Jun 10, 2009 10:29 pm
Subject: Re: [En-Nut-Discussion] Sam7X and the USB Device Port










Hey U!

Unfortunately, that project went bust with the economy,  I am working on a
Luminary Micro-Cortex 3 project for someone else.
Send me a private email address, I will send you what I had done, no
problem.

*E

On Wed, Jun 10, 2009 at 9:17 AM, <uprinz2@...> wrote:

>
>  Hi Eric!
>
> Did you advance with the USB Port for SAM7X? Are you planning to contribute
> it to the community? Or did you stop on that?
> May be I can help and integrate it to NutOS trunk?
>
> Regards, Ulrich
>
>
>
>
>
>
>
> -----Original Message-----
> From: Eric Haver <havereric1@...>
> To: Ethernut User Chat (English) <en-nut-discussion@...>
> Sent: Mon, 16 Mar 2009 8:48 pm
> Subject: [En-Nut-Discussion] Sam7X and the USB Device Port
>
>
>
>
>
>
>
>
>
>
> Hi all,
>
> I have converted the Atmel CDC-Serial example to run under NutOS.
>
> When I enable Endpoint0 in the UDP_IER and in UDP_CSR0, I can see it in the
> UDP_IMR before I leave the interrupt, but on the next interrupt, the
> UDP_IMR
> does not show Endpoint0 enabled.
>
> Any ideas?
>
> Thanks,
>
> Eric
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>
>
>
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion



 

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion