Forum: ARM programming with GCC/GNU tools Problem with DMA interrupt

Author: Torsten Liebig (ziba)
Posted on:

Rate this post
0 useful
not useful

I'am using the AT91SAM9RL64 Eval Board. To get to know USB, I extended
the  USB-Example "usb-device-core-project-1.4-at91sam9rl-ek" from the
ATMEL homepage.

I extended the configuration descriptor with two endpoint descriptors,
one bulk in- EP (1) and one bulk out EP (6). The size of the endpoints
is 512 byte. DMA is activated.

For testing I call the USBD_Write- function with the following
USBD_Write( 0x1,&data,512,(TransferCallback)usbdWriteCallback,0);

Directly after this, my Callback- function is executed, because an
interrupt is triggered by the DMA Channel1, but I didn't read Data by
the host.

In my opinion this interrupt should only be triggert, when the host
read's data. Do you know a possible reason for this behavior? What I
have to consider?

On the host I use the LibUsb-Win32 driver/library.


Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Maybe you can compare your code with the cdc-serial project also in the
software-package. It also sets up bulk-endpoints and descriptors are
included. It might be easier to adapt this example to your needs than to
add code to the core-example.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.