dmastm32f4discoveryusb-otg

Receiving data over STM32F407 or STM32L476's USB OTG using DMA?


I am working on a project and I need to receive data over USB OTG using DMA, but I could not find any channel link to it. I have configured DMA but I don't know which channel to link with it ( __HAL_LINKDMA(HANDLE, PPP_DMA_FIELD, DMA_HANDLE), somebody help me please....

Regards,

Waqas A


Solution

  • The USB HS peripheral is already a bus master. Effectively it has the DMA built in so it doesn't need to use the general purpose DMA.

    There are examples in the respective Cube package. Eg: for STM32F4xx, see STM32CubeF4.