cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723 serial communication using USB

smn
Associate

Hi,

I'm trying to build a small board using the STM32H723 MCU and my requirement is that I have one USB Micro B receptacle on the board for communication with the MCU. However, the communication should happen via USART and not the standard USB protocol. I'm planning to use the D+/D- lines from the USB receptacle and connect it to PD8/PD9 of the MCU (LQFP-144 package). I'm not sure if this would work straight forward as USB is at 5V and the STM32 MCU is at 3.3V. Should I probably use a voltage translator between these lines? Also, is there anything else that I'm missing? I would like to also program the MCU using the same USB Micro B connector. Would it work?

Thanks in advance for your help!

3 REPLIES 3
TDK
Guru

Yes, you will need a voltage regulator to take 5V down to 3.3V

In order to use the USB port as a serial port, you will need to program firmware on the board to communicate over this. It is not trivial to do so.

> Would it work?

In theory, but it's not a very good plan in terms of productivity.

 

Use the SWD port for programming/debugging. Using the USB requires that you use the system bootloader or your own bootloader to program the chip. It also makes traditional debugging impossible as that requires the SWD port.

 

Perhaps buy a nucleo board until you are familiar enough with the architecture and the hardware. A nucleo board can connect directly to USB since it has an on-board programmer. There are many nucleo boards and they are relatively cheap. Here is one for your chip:

NUCLEO-H723ZG - STM32 Nucleo-144 development board with STM32H723ZG MCU, supports Arduino, ST Zio and morpho connectivity - STMicroelectronics

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

Hi @TDK ,

Thanks for the quick reply, much appreciated!

Infact, I already developed the code on the Nucleo board and now want to reduce the board size and hence looking for a custom board with only the STM32 MCU and a USB receptacle for both programming the MCU and continuing with serial communication. I was just worried about developing another MCU code for the USB-USART conversions or the complexity in getting this to work with minimal components.

The nucleo board has a USB connector on it that is connected directly to the chip (CN13, next to ethernet connector). You can develop and trial your firmware on there before making a new board.

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