cancel
Showing results for 
Search instead for 
Did you mean: 

USB HS implementation difficulties on STM32F405 based board

benjaminmfleming
Associate II
Posted on July 24, 2014 at 14:04

I am trying to implement USB HS communication in peripheral mode on a custom board based on STM32F405. The board has an external USB3300 ULPI chip. I am using the USB library from the ST website. Firstly, I used the VCP example, modified it and managed to get the FS communication working (I was able to both send and receive data). When I tried to switch to the HS mode, I couldn't even get the device recognized by my OS.

I have performed these steps:

I ran the USBD_Init() function with USB_OTG_HS_CORE_ID.

I added these symbols to my linker settings: USE_USB_OTG_HS, USE_ULPI_PHY.

I modified the pin assignment in the usb_bsp.c file to match the connections in the schematic.

I am stuck now and can't find the solution. Do you have any ideas what could be wrong or suggestions how to approach this problem?

Thank you in advance.

#ulpi #stm32f4 #usb
6 REPLIES 6
Posted on July 24, 2014 at 14:35

I am stuck now and can't find the solution. Do you have any ideas what could be wrong or suggestions how to approach this problem?

Start by reviewing the hardware, clocks, supplies.

Test your code on known working hardware, compare it to yours.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
pradeepa
Associate II
Posted on July 25, 2014 at 12:30

What is the clock speed? What is your current PLL setting?

benjaminmfleming
Associate II
Posted on July 25, 2014 at 13:29

PLL_M value is 12. The board uses an external 12 MHz oscillator. Also, I have used this value successfully for the USB FS communication. 

tlegrain23
Associate
Posted on July 25, 2014 at 14:04

''Do you have any ideas what could be wrong or suggestions how to approach this problem?''

There has been several discussion on this forum about problems with some external PHY and STM32F parts. Is the USB3300 known to work?

Do you reset the PHY yourself or let the core do that? Some SMSC3xxx may require special reset.

You mentioned using FS mode. Is that with the USB3300 in FS mode?

Is the Xi pin actually 24MHz?

From: m._fleming.benjamin

Posted: Thursday, July 24, 2014 2:04 PM

Subject: USB HS implementation difficulties on STM32F405 based board

I am trying to implement USB HS communication in peripheral mode on a custom board based on STM32F405. The board has an external USB3300 ULPI chip. I am using the USB library from the ST website. Firstly, I used the VCP example, modified it and managed to get the FS communication working (I was able to both send and receive data). When I tried to switch to the HS mode, I couldn't even get the device recognized by my OS.

I have performed these steps:

I ran the USBD_Init() function with USB_OTG_HS_CORE_ID.

I added these symbols to my linker settings: USE_USB_OTG_HS, USE_ULPI_PHY.

I modified the pin assignment in the usb_bsp.c file to match the connections in the schematic.

I am stuck now and can't find the solution. Do you have any ideas what could be wrong or suggestions how to approach this problem?

Thank you in advance.
Posted on July 25, 2014 at 15:02

Yes, USB3300 used by several boards

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F205%20ULPI&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=151]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FSTM32F205%20ULPI&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=151

Schematic about 50% down here

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/stm32f407IG%20and%20USB3317&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=297]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2Fstm32f407IG%20and%20USB3317&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=297
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
benjaminmfleming
Associate II
Posted on July 26, 2014 at 11:32

I am not sure about the reset of PHY. I will try to read about it in the USB3300 manual. But if you could provide some more insight about the reset and how to control it, it would be helpful.

According to the schematic, the XI pin is connected to the 24 MHz CFPX-104 crystal.