cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H523 USB Host & Device without external crystal

rogdiv
Associate II

Hi,

I'm working on a new design using a STM32H523VET6 in which we want to use USB host & device functionality. Whether the board should function as a host or device is determined when it is switched on and will not be changed during operation.

As far as I understand I don't need an external crystal for both modes host & device? But what I don't understand is  how to configure the clock recovery system CRS. Do I need the SOF signal, but this seems only available when in device mode.

So my questions are:

1. Is it true that I don't need external crystal for USB host & device modes?

2. What is needed from clock recovery system SRS (SOF signal...)?

Thanks,

Roger

1 ACCEPTED SOLUTION

Accepted Solutions
Gyessine
ST Employee

Hello @rogdiv 
HSE is recommended for host function and specially needed for USB high speed operations because HSI cannot provide a clean clock signal for HS operations
also, this article can help you in your project.  STM32H5 is USBX native but the article can help you understand the ground rules of what should be done to do the switch
BR
Gyessine

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
gbm
Principal

The host should provide precise timing to the device. With CRS, you may synchronize the device's HSI48 clock to the host but not the reverse. So, no crystal is needed for the device but definitely you need one for the host (unless this host is used only for communicating with a device without its own precise clock source - synchronizing to the host clock).

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Gyessine
ST Employee

Hello @rogdiv 
HSE is recommended for host function and specially needed for USB high speed operations because HSI cannot provide a clean clock signal for HS operations
also, this article can help you in your project.  STM32H5 is USBX native but the article can help you understand the ground rules of what should be done to do the switch
BR
Gyessine

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

rogdiv
Associate II

@Gyessine 

@gbm 

That make sense! Thank you both for your answers!