cancel
Showing results for 
Search instead for 
Did you mean: 

problem with USB and timer

Jsong
Associate II

Hello,

I need your help to recognize my issue correctly, please help me,

background:

I am having trouble using the stm32l053RB NUCLEO development board for USB protocol parsing.

issue:

When​ using timer to generate PWM, once the USB receive data is configured, the PWM waveform frequency will be greatly reduced.

Also when using the timer to generate a timed interrupt, once the USB work is configured, the CNT data will be stuck, and the timer will stop unless the USB is reset.

I have tried all the timers of this chip and will have the same problem.

Why is this happening, does USB work affect the clock of TIMER?

 if you can help to solve issue or give any advice, I am very thankful for your kindness in advance.

Thanks.​

my email is jysong@mindpointeye.com

12 REPLIES 12
Jsong
Associate II

Thank you very much for your guidance.

This problem has been solved by closed USB low_power_enable.

Bit 2 LP_MODE: Low-power mode 

This mode is used when the suspend-mode power constraints require that all static power 

dissipation is avoided, except the one required to supply the external pull-up resistor. This 

condition should be entered when the application is ready to stop all system clocks, or 

reduce their frequency in order to meet the power consumption requirements of the USB 

suspend condition. The USB activity during the suspend mode (WKUP event) 

asynchronously resets this bit (it can also be reset by software). 

0: No Low-power mode.

1: Enter Low-power mode.

Thanks for coming back with the solution.

JW

I've got exactly the same issue in my STM32F750V8T6 and the solution helped.

Thank you!