2020-05-13 02:47 AM
I am using STM32h743 , code is generated using STM32CubeMx.
I am using USB_OTG_FS in device only mode, with USB_DEVICE middleware configered as CDC class .
Here's my clock configuration
The usb is clocked from RC48
I could reduce the clock from 480MHz to 120 MHz by changing RCC_OscInitStruct.PLL.PLLP from 2 to 8 .
But when I try to change clock to 96MHz or 80 MHz by changig RCC_OscInitStruct.PLL.PLLP to 10 or 12, the USB is not recognized by windows!!!
I am using windows 10 .
How to overcome this problem?
Solved! Go to Solution.
2020-05-13 11:14 AM
OK so try with decreasing the clock change the AHB prescaler so that AHB frequency stays at or above 60MHz.
Did that change anything?
JW
2020-05-13 09:10 AM
JW
2020-05-13 10:59 AM
When I change RCC_OscInitStruct.PLL.PLLP fro 2 to 8 the AHB Clock is reduced from 240MHz to 60MHz,
when I set RCC_OscInitStruct.PLL.PLLP to 10 the AHB clock is 48MHz
when I set RCC_OscInitStruct.PLL.PLLP to 12 the AHB clock is 40MHz
So the AHB Freuquanc is still greater than 30MHz
2020-05-13 11:14 AM
OK so try with decreasing the clock change the AHB prescaler so that AHB frequency stays at or above 60MHz.
Did that change anything?
JW
2020-05-14 02:35 AM
yes, it's working
reducing main CPU clock while keeping AHB clock high solves the problem
2020-05-14 11:39 AM
Sometimes the USB device is mapped to different VCOMPort even that I am using the same serial number string descriptor
and sometimes The device is not recognized by Windows as shown in the attached pics
2020-05-14 01:11 PM
Sorry, I don't have a magical answer to all the bugs which come with Cube, or may be introduced by yourself, or Windows, or the used hardware...
JW