cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F777VI USB enumeration fails with DMA enabled

jr
Associate II
Posted on April 04, 2018 at 18:29

We have the STM32F777VI in HS USB mode using external ULPI. We are using the CDC virtual com port (VCP) example with V1.2.5 HAL Driver and V2.4.2 USB Device Library. Without DMA everything works fine. But as soon as DMA is enabled (hpcd.Init.dma_enable = 1) the USB enumeration will fail at the very first response (device descriptor request). Wireshark and usbmon on the linux host will show that the descriptor response status from the STM32F7 is -EPIPE

0690X0000060APyQAM.png

When I try to debug the problem on STM32F7 side the correct packet and size is given to the DMA. The buffer is 4-byte aligned. I wondered if the packet size must also be a multiple of 4, but it doesn't seem to matter.

L1 cache (D-Cache and I-Cache) is disabled.

Is there a dedicated clock for USB DMA which needs to be activated?

Does someone have a hint?

2 REPLIES 2
Nils -
Associate
Posted on April 05, 2018 at 10:53

Hi,

I can't give you an answer to your problem, but just wanted to add, that this problem also affects me when using a STM32F723ZE with the embedded HS PHY as host accessing a mass storage device.

I can read from the device fine when using hpcd.Init.dma_enable = 0 fine, but hpcd.Init.dma_enable = 1 is stuck in enumeration.

Tried FW 1.9.0 and 1.11.0. Also couldn't really find example code either, since all examples provided by ST seem to disable USB HS DMA.

Nils -
Associate
Posted on April 05, 2018 at 13:59

Okay, I got my device enumerated when enabling DMA on the USB HS... I don't know if it will help in your case (I'm my case it doesn't help me that much, since I don't get any speed gain, because the DMA integration into FatFS seems also not working as of right now... but anyhow):

Can you try to deactivate the D-cache in your project and try to activate DMA on USB HS?