cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WBA65 USB for debug

SLevi.1
Associate III

I want to use a USB connection on a STM32WBA65 processor, purely for debug purposes to get some info back to a PC on a virtual com port. The device will not be powered by USB.

I don't want the processor to act as a host.

Questions:

  1. Can the STM32WBA65 provide this implementation of a virtual com port? How is this set up in the HAL?
  2. If I use a USB micro connector, which pins should be connected to where? In the past, on simpler STM32 devices, I have just connected ground, DP & DM from the cable directly into the micro.
  3. If I use a USB-C connector, because they are generally more sturdy, which pins need connecting? Do I need to connect CC pins? Can I just pull them up (or down) with simple resistors?

 

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

Hi @SLevi.1 

STM32WBA65 integrates a USB HS peripheral.

  • It can be configured as a USB device CDC class to emulate a serial port over USB.
  • This is commonly used for debug or communication purposes with a PC.

You can check this example. You can refer to CAD resources.

If you are using USB type C only ( without power delivery), you need to connect CC1 and CC2 pins each to ground via 5.1 kΩ pull-down resistors (required for USB-C device detection).

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


View solution in original post

1 REPLY 1
FBL
ST Employee

Hi @SLevi.1 

STM32WBA65 integrates a USB HS peripheral.

  • It can be configured as a USB device CDC class to emulate a serial port over USB.
  • This is commonly used for debug or communication purposes with a PC.

You can check this example. You can refer to CAD resources.

If you are using USB type C only ( without power delivery), you need to connect CC1 and CC2 pins each to ground via 5.1 kΩ pull-down resistors (required for USB-C device detection).

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.