cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 USB Full-Speed with DMA

Antoine Sebert
Associate
Posted on June 14, 2018 at 18:20

Hi everyone,

I am currently using USB Full-Speed for an application and I would like to know if there is a way to implement DMA to access USB FS FIFO.

I know that a dedicated DMA exists for USB High Speed but I can not find something similar for Full Speed. Moreover, the documentation and ressources about the FS FIFO remain a bit confusing and could suggest it may be possible to access buffers via DMA but I still didn't manage to do this.

I would need some peace of advice on how I could achieve and implement a such architecture.

Thank you in advance.

#stm32-usb-dma #usb-fs
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on June 14, 2018 at 23:30

I haven't tried, but I see no reason why you shouldn't be able to perform a memory-to-memory DMA using DMA2 (in 'F2/'F4/'F7) with one port pointing to the respective USB_FS FIFO area, just in the same way as you'd copy data from/into USB_FS FIFO using the processor.

JW

View solution in original post

2 REPLIES 2
Posted on June 14, 2018 at 23:30

I haven't tried, but I see no reason why you shouldn't be able to perform a memory-to-memory DMA using DMA2 (in 'F2/'F4/'F7) with one port pointing to the respective USB_FS FIFO area, just in the same way as you'd copy data from/into USB_FS FIFO using the processor.

JW

Posted on June 15, 2018 at 15:16

Indeed! 

After a few tries it reveals that it is totally possible to access USB_FS FIFO using DMA2. It might though be a bit tricky as it seems important to wait for the transfer to be complete and disable DMA after each transmitted packet!

Thank you