Datasheet

page 25
USB device
communication
EasyMx PRO
v7 for STM32 also contains USB DEVICE connector (CN26) which enables
microcontrollers that support USB communication to establish a connection with the target
host (eg. PC, Laptop, etc). It lets you build a slave USB device (HID, Composite, Generic, etc.).
Connector supports USB Standard Type B plug. Detection whether USB device is connected to
HOST can be done through VBUS line. This line is traced to microcontroller PA9 pin. Connection of
USB DEVICE VCC line and PA9 pin is established when SW12.7 DIP switch is in ON position. When
connected to HOST, dedicated amber-colored power LED will light up as well. This VCC line cannot be
used for powering the board. It's only used for detecting connection.
Detecting connection
You can detect whether USB device
is plugged into the USB device
connector using VBUS power
detection line (PA9). Before using
this feature, you must connect
PA9 pin to USB connector using
SW12.7 DIP switch.
EasyMx PRO
v7
1
2
3
4
VCC
GND
D-
D+
CN26
USB B
R50 27
R53 27
LD76
R58
4K7
GND
GND
USB-D_N
USB-D_P
USB DEVICE
CONNECTOR
USB-VBUS
R48 100
ON
D2 BAT43
D_N
D_P
1
2 3
4
5
6
7 8
O
N
SW12
USB-VBUS PA9
DATA BUS
communication
Figure 11-2:
Enabling
USB DEVICE
detection
via VBUS
line
Figure 11-1: USB device connection schematic