cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4Discovery OTG HS in FS Mode with DMA does not enumerate

s1210567007
Associate
Posted on January 15, 2013 at 20:49

Hy STM32 friends,

I am trying to implement an isochronous USB Audio Device with the USB OTG HS Core on the STM32F4Discovery with embedded FS PHY in DMA mode. I recieve the setup telegram over EP0 with DMA but when i try to send the device descriptor the OTG HS core does not send the Data over USB (tested with Logic Analyser). If i switch of the DMA the device enumerates ok. I tested if there is enough free space in the EP0 TxFifo.

txstatus.d32 = USB_OTG_READ_REG32( &pdev->regs.INEP_REGS[ep->num]->DTXFSTS) == 64<br>
<br>deptsiz.b.xfersize == 8

Does anybody have an idea? The fifo configuration is as below:

#ifdef USB_OTG_HS_CORE<br>#define RX_FIFO_HS_SIZE 512<br>#define TX0_FIFO_HS_SIZE 64//128<br>#define TX1_FIFO_HS_SIZE 0//372<br>#define TX2_FIFO_HS_SIZE 372<br>#define TX3_FIFO_HS_SIZE 0<br>#define TX4_FIFO_HS_SIZE 0<br>#define TX5_FIFO_HS_SIZE 0<br>

Regards, Hans Herbert #stm32-usb-hs-embedded-phy-dma
4 REPLIES 4
Posted on January 15, 2013 at 21:21

Project/Compiler defines

USE_STDPERIPH_DRIVER

USE_EMBEDDED_PHY

STM32F4XX

USE_STM324xG_EVAL or USE_STM32F4_DISCOVERY w/appropriate includes and code

USE_USB_OTG_HS

PB12 OTG_HS_ID

PB13 OTG_HS_VBUS (IN)

PB14 OTG_HS_DM

PB15 OTG_HS_DP

Check also

// #define USB_OTG_HS_LOW_PWR_MGMT_SUPPORT

// #define USB_OTG_HS_SOF_OUTPUT_ENABLED

// #define USB_OTG_INTERNAL_VBUS_ENABLED

 #define USB_OTG_EXTERNAL_VBUS_ENABLED

 #ifdef USE_EMBEDDED_PHY

   #define USB_OTG_EMBEDDED_PHY_ENABLED

 #endif

 #define USB_OTG_HS_INTERNAL_DMA_ENABLED

 #define USB_OTG_HS_DEDICATED_EP1_ENABLED

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
s1210567007
Associate
Posted on January 15, 2013 at 21:40

Hy clive1,

Thanks for the reply

I have checked that the only difference is i didnt define

USB_OTG_EXTERNAL_VBUS_ENABLED which is only used

for the ulpi interface and

USB_OTG_HS_DEDICATED_EP1_ENABLED which i don't use.

Anyhow i tried also with your settings and there is no change.

Regards

Hans Herbert

Posted on March 05, 2014 at 09:28

I have my STMF4 Discovery board working with USB (FS, not HS, I think a PHY would be needed externally).

It works as USB Audio Sound Card and I can also use UART emulation (VCD).

Project is here:

http://www.tjaekel.com

Best regards

Torsten

Cristea.Catalin
Associate III
Posted on January 19, 2015 at 23:44

Hi Herbert... or Hans? :)

Did you get anywhere with this?

I also need USB with DMA (HS in FS mode but I need CDC-VCP) and having difficulties.

Thanks,

Cat