cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G491 USB for data only

ErKaTech
Associate II

Hi,

I'm developing a custom STM32G491CEU6 board with USB-C and pins for external ST-LINK programmer. Board is powered from external source. I connected only D+, D- and GND from on USB-C to MCU, because I wanted to use this only for debug. Right now the USB-C communication works only if ST-LINK is connected (had no idea about VBUS sensing). Can i override it somehow? Schematics below

ErKaTech_0-1776185532867.pngErKaTech_1-1776185559615.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

There's no reason why it can't work. The reason that it isn't is going to be specific to your setup. Maybe NRST is held low, or the firmware doesn't pass a certain stage, or it is miswired.

There are no issues in the posted schematics.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

6 REPLIES 6
MM..1
Chief III

What type of debug you mean? If USB CDC printing you require implement it in your code... USB pins isnt debug interface .

ErKaTech
Associate II

Yes, I meant CDC printing, not classic Debug. More important for me is why it's not working without ST-LINK. I was looking for a solution, but couldn't find one.

Chris21
Senior III

Perhaps the ST-LINK is providing a GND connection to your PC.

TDK
Super User

There's no reason why it can't work. The reason that it isn't is going to be specific to your setup. Maybe NRST is held low, or the firmware doesn't pass a certain stage, or it is miswired.

There are no issues in the posted schematics.

If you feel a post has answered your question, please click "Accept as Solution".
ErKaTech
Associate II

You were right, I had NRST floating, I connected it via 10k resistor to 3,3V and it works like a charm. TY all.


@ErKaTech wrote:

I had NRST floating, I connected it via 10k resistor to 3,3V and it works like a charm. TY all.


That's weird. There is an internal pull-up resistor inside the chip. Refer to the reference manual RM0440:

mALLEm_0-1776252280943.png

It should work without adding an external pull-up resistor on NRST pin!

However you need instead to add a filtering capacitor of 100nF on NRST connected to the ground:

mALLEm_1-1776252629309.png

Please refer to the reference design in AN5093 "Getting started with STM32G4 Series hardware development boards" / Figure 8.

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.