Hi,
I am using AT91SAM7x-ek eval board with Keil uVision 3.55a. I am trying to use bulk transfer and I am hoping to port "memory" example from KEil/ARM/Boards/Atmel/AT91SAM7X-EK/USB directory. For now I am only trying to make sure I understand how it works. I want to use Endpoint 2 for IN and OUT. I change endpoint descriptors to 2 for both IN and OUT. I also wanted a vendor specific class so I use 0xFF for that. I wrote a code that would turn on LED3 in this function:
void USB_EndPoint2 (DWORD event) { AT91D_BASE_PIO_LED->PIO_CODR = AT91B_LED3; /* Turn On Read LED */ }
IS this the right spot to write my user code? I believe that this function should be called if there is an interrupt, but I don't know how to make sure.
Thanks Mario
"I want to use Endpoint 2 for IN and OUT."
Is it possible? This device seems to support just single direction, IN or OUT, on each endpoint. See the description of EPTYPE field of the UDP_CSRx register, on the datasheet.
www.atmel.com/.../doc6120.pdf
EPTYPE[2:0]: Endpoint Type (doc6120.pdf p474) 010 Bulk OUT 110 Bulk IN
Tsuneo
"Is it possible? This device seems to support just single direction, IN or OUT, on each endpoint."
You are right, I can't believe I didn't see that. I was probably setting OUT endpoint 2 and then IN endpoint 2 and when trying to write to endpoint 2 it was in fact endpoint IN and it wouldn't work.
Thanks a lot Mario