cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G431 USB C power delivery and Debug options

RMas
Associate II

I'm designing a board G4 MCU and want to be able to power the board from USB C as well as debug or program the board.

  1. Is it possible to program the MCU via the USB C or usb 2.0 interface?
  2. If not, and I have to use SWD, what would i need in order to program the board? Would i need a dedicated MCU like the NUCLEO board or would i use need some kind of USB to JTAG/SWD cable connected to the CLK and IO pins?
  3. If power is being delivered via USB C how might I use this tho power the rest of the board and not just the MCU?

I tried using this post as reference to get a better understanding.

https://community.st.com/s/feed/0D53W000007zVncSAE

1 ACCEPTED SOLUTION

Accepted Solutions
Michael E
ST Employee

Hello if you need more information on USBPD vs STM32 please check wiki articles.

There is also various helpful examples:

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

6 REPLIES 6
TDK
Guru

It's not realistic to debug via a direct USB interface to the board. The workable approach is to use SWD and put a header on the board to interface with a programmer such as the STLINK-V3MINI. No need for a separate chip. Note that the board needs powered elsewhere as the programmer does not provide power.

You can't power the MCU directly from USB as the voltage is too high. You will need an LDO to take the ~5V USB supply down to something like 3.3V which is usable by the MCU. You can use the 5V supplied by the USB for whatever else is on your board, so long as you stay within the power budget.

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

What is the purpose of USB C power delivery if the MCU is not capable of handling the voltages? it's the interface connected directly to the MCU pins? How would i manage the voltages from USB if they are supplied directly to the MCU?

gbm
Lead III

Why don't you read some documents on USBPD and the solutions provided by ST? There is a choice of X-Nucleo extension boards for PD experiments and a bunch of examples and step-by-step tutorials on this topic - easy to find on ST website. Just read, listen, look at the schematics.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Michael E
ST Employee

Hello if you need more information on USBPD vs STM32 please check wiki articles.

There is also various helpful examples:

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.

The purpose is to provide power.

These are electronics 101 questions. Managing voltages is a fairly common theme. Google linear regulators.

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

Sorry. Maybe my question wasn't very clear. The board is designed to control several frequency synthesizers, up/down converters, filters, switches, and amplifiers. I want the MCU to both control these devices and be able to supply voltage via usb if there is no standard supply. I was asking more so how the voltage supply from USB is distributed. I'll read more on the subject. Thanks.