Author Topic: [SOLVED] STM32H725 USB FS PHY not detected  (Read 749 times)

0 Members and 1 Guest are viewing this topic.

Offline habosfingTopic starter

  • Newbie
  • Posts: 3
  • Country: hu
[SOLVED] STM32H725 USB FS PHY not detected
« on: May 23, 2024, 05:34:42 am »
Hello,

I have been working on a project that requires USB communication with an STM32H7 mcu. Unfortunately, the computer cannot recognize the device. On the hardware side, I am using the STM32H725VGT6 mcu, an isolator, and a USB-C connector with some ESD protection. On the software side, I am using the internal FS PHY. The clock source is connected to PLL1Q running at 110 MHz. Windows couldn't even detect the device. What could cause this problem? Connections on the PCB are confirmed ok, and the isolator gets both the high side (5 V) and low side supply (3.3 V).

 
« Last Edit: May 23, 2024, 11:35:22 am by habosfing »
 

Offline Chalcogenide

  • Regular Contributor
  • *
  • Posts: 159
  • Country: it
Re: STM32H725 USB FS PHY not detected
« Reply #1 on: May 23, 2024, 05:48:29 am »
First off I would try running the USB clock from the HSI48 and see if anything changes.
 

Offline habosfingTopic starter

  • Newbie
  • Posts: 3
  • Country: hu
Re: STM32H725 USB FS PHY not detected
« Reply #2 on: May 23, 2024, 05:53:43 am »
Did that, nothing changed.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1656
  • Country: nl
Re: STM32H725 USB FS PHY not detected
« Reply #3 on: May 23, 2024, 07:08:23 am »
I'm pretty certain USB FS needs a fairly precise clock (which HSI can't match) and the module needs to receive 48MHz. Why give it 110MHz from PLLxQ?

On occasions like these I also like to test the hardware first. The ROM bootloader of ST contains a USB DFU bootloader, so if you can pull the BOOT0 pin high during reset you could rule out hardware issues first (on Linux it should pop up with lsusb, or on Windows as IIRC some kind of USB controller device, you could try USBview).
« Last Edit: May 23, 2024, 07:10:04 am by hans »
 

Offline Chalcogenide

  • Regular Contributor
  • *
  • Posts: 159
  • Country: it
Re: STM32H725 USB FS PHY not detected
« Reply #4 on: May 23, 2024, 08:08:18 am »
The H7 bootloader uses HSI48 as USB clock, as HSI48 is auto-trimmed by USB clock recovery (see AN2606): that's why I suggested using it for testing; I use it all the time with G4 MCUs.
Honestly hans's idea of trying to enter bootloader is great as that way USB MUST work unless there are hardware gremlins. If that still fails, I would just lift the pins on the isolator and try to connect directly: it that still fails, something is really screwed up somewhere.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1656
  • Country: nl
Re: STM32H725 USB FS PHY not detected
« Reply #5 on: May 23, 2024, 08:15:28 am »
Ah yes you're right for this STM32. For other parts it measured HSE frequency and then configured PLLs accordingly.

But the idea of testing hardware with the built in bootloader first still stands. USB can be tricky to debug as its often a black box, so any hints on hardware function are very welcome.
 

Offline habosfingTopic starter

  • Newbie
  • Posts: 3
  • Country: hu
Re: STM32H725 USB FS PHY not detected
« Reply #6 on: May 23, 2024, 11:34:55 am »
So after resoldering every D+ D- leg on the low side and high side, it is working properly. However, Windows gives out error code 43 if I use anything other than 48 MHz. So I switched to HSI 48 MHz and I've been able to send and receive data.
 
The following users thanked this post: hans


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf