DMA to USB IN endpoint?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Good evening, everyone,

   

 

   

I'm trying to DMA CAN messages directly to a USB IN endpoint, but it does not appear that it is possible to DMA anything *to* USB. It seems that you can only DMA from data received from USB into the PSoC. Is this correct?

   

 

   

I am trying to send any CAN messages that are accepted into one of the mailboxes over to a PC over USB. I can easily do this with the "message received" interrupt on CAN and an interrupt handler running on the ARM but I would like to try to do this using DMA and without CPU intervention. I added a hardware interrupt pin to the CAN component and set up the interrupts so that only "message received" generated an interrupt, then wired this to a DMA component.

   

 

   

The DMA Wizard allows me to configure the DMA component to transfer from SRAM to SRAM, but not from SRAM to a USB IN endpoint. The DMA Wizard will also let me configure the USB DMA component with a source of SRAM, Flash, EEPROM or two very odd options: "USB_EP17_DMA_Done_SR" and "USB_EP8_DMA_Done_SR". The only destination that the USB DMA component can choose is SRAM. I have no way to transfer from SRAM to USB.

   

 

   

What is also odd is that I have only one EP configured, EP1 which is an IN endpoint. I don't know where EP17 and EP8 are coming from.

   

 

   

Can anyone shed some light on this?

0 Likes
3 Replies
MuKa_284621
Level 3
Level 3

 Hello,

   

 

   

I don't know if it helps, but if the USB has any type of memory space, or some sort of output buffer that it uses to send data, then you can practically place your message there using a DMA transfer.

   

 

   

Not a pro at USB functionnalities, so I'm not sure if it'll work.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You have seen these ap notes -

   


   

     

   

            

   

http://www.cypress.com/?rID=39404     AN57473

   

http://www.cypress.com/?rID=39553     AN56377

   

 

   


   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Thank you, Dana.

   

 

   

AN57473 doesn't mention DMA at all, but AN56377 has some details I was unaware of. I need to experiment with this a little more.

   

 

   

Do you know where these odd DMA sources ("USB_EP17_DMA_Done_SR" and "USB_EP8_DMA_Done_SR") are coming from? As I mentioned, I have only one endpoint configured in the USBFS component, and that is EP1 as an IN endpoint.

0 Likes