STM32-OTG-CDC

From Embedded Workshop
Revision as of 10:25, 18 July 2021 by JMerkle (talk | contribs) (Created page with "Using '''STM32CubeMX''', Choose: * New Project-> Start My project from ST Board -> ACCESS TO BOARD SELECTOR -> in Commercial Part Number box, type "NUCLEO-F446RE" * Double-cli...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Using STM32CubeMX, Choose:

  • New Project-> Start My project from ST Board -> ACCESS TO BOARD SELECTOR -> in Commercial Part Number box, type "NUCLEO-F446RE"
  • Double-click the NUCLEO-F446RE board in the lower right section
  • "Initialize all peripherals with their default Mode ?" - Select "Yes"
  • "Pinout & Configuration" tab, select Connectivity -> USB_OTG_FS -> Mode -> Device_Only
At this point, USB pins get selected and configured
PA11  "USB_OTG_FS_DM"
PA12  "USB_OTG_FS_DP"
  • "Pinout & Configuration" tab, select Middeleware -> USB_DEVICE -> "Class For FS IP" -> "Communication Device Class (Virtual Port Com)"
  • "Pinout & Configuration" tab, select Connectivity -> UART2 - This should already be selected, and configured as follows:
Mode: Asynchronous
Hardware Flow Control (RS232): Disable
Basic Parameters
  Baud Rate: 115200
  Word Length: 8 Bits (including Parity)
  Parity: None
  Stop Bits: 1
Advanced Parameters
  Data Direction: Receive and Transmit
  Over Sampling: 16 Samples

UART2 will be used as a serial debug port, already connected to the STM32-F103 JTAG hardware, to function as a USB Com Port