Skip to main content
miki_pf
Visitor II
November 5, 2014
Question

STM32F103RB - USB Keyboard

  • November 5, 2014
  • 1 reply
  • 641 views
Posted on November 05, 2014 at 16:20

Hi All

I'm working on a project which needs to send few standard USB Keybord commands to a WIN7 Desktop. It is very simple project I'm using F103 and the ST USB library and everything seems to be working fine. When I plug the USB cable into the PC, the device gets enumerated correctly and everything works perfectly. The problem starts if I switch off and on the PC with the USB cable still plugged in - the device is not enumerated at all - I have to unplug the device and plug it back in for it to start working again.

I was hoping that someone had come accross something simillar and could shed some light on this mystery.

Thanks in advance.

Marek

#stm32 #usb
This topic has been closed for replies.

1 reply

tsuneo
Associate II
November 7, 2014
Posted on November 07, 2014 at 05:04

To answer to your question, more information is required.

a) Power source - bus-/self-powered

Is your USB device powered by the USB 5V line (VBUS)? - bus-powered

OR

Does it have a dedicated power source like a battery? - self-powered

b) D+ Pull-up - fixed or controlled

Does the D+ pull-up resistor (1.5k Ohm) connect directly to 3V3 (or 5V) rail? - fixed

OR

Is this resistor driven by a transistor (FET) or one of MCU port? - controlled

Tsuneo