cancel
Showing results for 
Search instead for 
Did you mean: 

What are the effects of clock on STM32 USB HID? (Need explanation)

AAgar.2
Associate III

I am trying to use custom USB HID on an STM32L452RE.

I followed instructions as per the following link.

https://www.youtube.com/watch?v=3JGRt3BFYrM

Initially my STM32 would not get recognized as a device on windows. I would get the error "Device Descriptor Request Failed".

After messing around with the project I ended up changing my clock settings manually. I changed the System Clock Mux to HSI and suddenly the Custom HID device started to work!

Can someone please explain why this change made the USB HID work?

Here is the initial clock configuration (which did not make the USB HID work)

0693W000000WHlSQAW.png

Here is the modified clock configuration (which made the USB HID work)

0693W000000WHlXQAW.png

Edit:

 

I used the PLL clock and set the prescaler to 4 making my clock 20MHz. The device is still working. Is it just the system frequency which is causing the issue? Can I still have HID work will using the 80MHz clock speed?

0 REPLIES 0