cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F469 with external PHY for USB HS

kylepennington
Associate III
Posted on September 16, 2016 at 05:57

I have a STM32F469IIT6 on a custom board attached to an external phy (FUSB2805MLX). I am using a 26MHz crystal on the micro and driving the 26MHz PHY with MCO2. I have built the Cube code with only the USB HS and MCO peripherials enabled, with USB CDC Device stack.

The code does not work out of the box. The phy does not initialise correctly as it doe not produce the 60MHz clock or pull the D+ line high. I've tried changing the stack and heap sizes to 0x2000 and 0x4000, respectively, to no avail.

In another project I managed to get fiddle with the code and it initialises. But as soon as you connect the device it recognises the device as a STM CDC device but either fails to start or fails to get device description or the micro hard faults.

Has anyone managed to get HS CDC working? What changes did you have to make?

In ''usbd_cdc_if.c'' how is ''CDC_Init_HS'' called? It is static and I can find no call in the project and it is required to initialise the buffers to use ''CDC_Receive_HS'' and ''CDC_Transmit_HS''.

#usb #stm32-usb-hs #external-phy
3 REPLIES 3
kylepennington
Associate III
Posted on September 26, 2016 at 02:49

Does anyone have any ideas on how to resolve this issue? Thanks!

tsuneo
Senior
Posted on September 28, 2016 at 16:44

>  I am using a 26MHz crystal on the micro and driving the 26MHz PHY with MCO2.

 

Does your F469 have a port connection to the reset pin of the external PHY?

It takes for a while until the crystal OSC goes stable and your firmware sets up MCO2. In this period, no clock is supplied to the external PHY. This period could make the external PHY upset.

- In early stage of initialization, your firmware drops the external PHY into reset over the port connection.

- After stable clock appears on MCO2 pin, your firmware releases the reset pin.

This procedure would guarantee stable startup of the external PHY.

Tsuneo

kylepennington
Associate III
Posted on October 02, 2016 at 22:39

Thanks for the reply. Currently I don't have a GPIO connection to the PHY reset but I will try doing it manually at first to see if it helps. I'll also try and set the reset bit via the ULPI.