2013-01-15 11:49 AM
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
2013-01-15 12:21 PM
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_ENABLED2013-01-15 12:40 PM
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 Herbert2014-03-05 12:28 AM
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 Torsten2015-01-19 02:44 PM
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