Using LPC1769 USB EP7 in the DMA mode (IN Isochronous)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using LPC1769 USB EP7 in the DMA mode (IN Isochronous)

308 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by shaunak_s on Fri Aug 17 23:04:51 MST 2012
Hi,
We have decided to use EP3 of the LPC1769 USB module to realize Isochrnous IN transfers to the host. I am currently using the LPCXpresso IDE and LPCXpresso LPC1769 dev kit. The function USB_Reset initializes the DMA.
#define USB_DMA_EP    0x00000080
LPC_USB->EpIntClr  = 0xFFFFFFFF;
  LPC_USB->EpIntEn   = 0xFFFFFFFF ^ USB_DMA_EP; <----- Enable the DMA mode
  LPC_USB->DevIntClr = 0xFFFFFFFF;
  LPC_USB->DevIntEn  = DEV_STAT_INT    | EP_SLOW_INT    |
               (USB_SOF_EVENT   ? FRAME_INT : 0) |
               (USB_ERROR_EVENT ? ERR_INT   : 0);
#if USB_DMA
  LPC_USB->UDCAH     = USB_RAM_ADR;
  LPC_USB->DMARClr   = 0xFFFFFFFF;
  LPC_USB->EpDMADis  = 0xFFFFFFFF;
  LPC_USB->EpDMAEn   = USB_DMA_EP;   <---- Enable the EP for DMA
  LPC_USB->EoTIntClr = 0xFFFFFFFF;
  LPC_USB->NDDRIntClr = 0xFFFFFFFF;
  LPC_USB->SysErrIntClr = 0xFFFFFFFF;
  LPC_USB->DMAIntEn  = 0x00000007;
The DMA mode is enabled in the statement LPC_USB->EpIntEn   = 0xFFFFFFFF ^ USB_DMA_EP; shown above for the EP7 (IN Isochronous). After execution of this statement the USBDMARSt register changes state to 0x00000080 immediately. Is this normal. I expected the register to change state in the event of an interrupt on the corresponding EP.
Executing the statement LPC_USB->EpDMAEn   = USB_DMA_EP; should enable the DMA for EP3 and thereby change the state of the register USBEpDMAEn to 0x00000080 and correspondingly change the value of USBEpDMASt to 0x00000080, however, the values in these register continue to be 0.
Please can you let me know if my understanding is correct. Would anybody happen to know of a tool using which I could send setup packets or IN/OUT requests to my device connected to a PC?
Also, one last question. When using DMA Descriptors, if the UDCA space contains a valid pointer to a descriptor and there is an IN request on the corresponding EP, the transfer should begin without the generation of any interrupts, am I right? An interrupt will be generated after the transfer is complete. Please can you confirm my understanding?
Thanks very much.
Regards,
Shaunak
0 Kudos
0 Replies