cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging using UART on STM32H753

DJ_IND
Visitor

Hi,

Can we use any UART /USART port for debugging? or any dedicated port only i have to allocate for debugging purpose?

what are the main application where USART can be used and UART cannot be used?

1 ACCEPTED SOLUTION

Accepted Solutions

Again not clear what do you need to do exactly?

UART could not replace JTAG for debugging. Debugging means for example going step by step in the program showing in live variables, setting breakpoints etc .. UART/USART could not do that.

So please describe what do you want to do exactly with UART/USART?

PS: please accept as solution if your question has been answered in this thread.

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

5 REPLIES 5
SofLit
ST Employee

Hello @DJ_IND and welcome to the community,

What do you mean by "use any UART /USART port for debugging?" to use "printf" to display some messages or what? please provide more details about your use case.

 

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.
DJ_IND
Visitor

in case i want to avoid JTAG connector for debugging and want to use UART interface using USB to serial converter which which UART4/5/7 or USART1/2/3/6 is preferable?

Again not clear what do you need to do exactly?

UART could not replace JTAG for debugging. Debugging means for example going step by step in the program showing in live variables, setting breakpoints etc .. UART/USART could not do that.

So please describe what do you want to do exactly with UART/USART?

PS: please accept as solution if your question has been answered in this thread.

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.

@DJ_IND ,

You've accepted as solution my comment above, are you sure?

When I said "PS: please accept as solution if your question has been answered in this thread." I'm talking about this thread: https://community.st.com/t5/stm32-mcus-products/stm32h753-boot-from-external-emmc-memory/td-p/754899

 

 

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.

 


@DJ_IND wrote:

Can we use any UART /USART port for debugging? ?


As @SofLit suggested, that depends what you mean by, "debugging" ...

You can certainly use a UART/USART - or any other interface you choose - to send diagnostic messages to a terminal or other "debug" application.

You could add some sort of command-line interface, so that you could send commands/queries to your target, and receive its replies.

You could even write an embedded debug monitor; eg,

https://interrupt.memfault.com/blog/cortex-m-debug-monitor

But all of that requires that you write & load code to execute on your target.

 


@DJ_IND wrote:

what are the main application where USART can be used and UART cannot be used?


UART = Universal Asynchronous Receiver/Transmitter

USART = Universal Synchronous/Asynchronous Receiver/Transmitter

So the clue is in the name: USART includes support for Synchronous comms - UART doesn't.

So you can't use a UART if you require Synchronous comms.