cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H753-EVAL -- Use DB9 port (CN2) as usart 1

giorgio29
Associate

Hie, according to the documentation of the board, USART1 can be used with db9 port by setting up JP7 and JP8 to 1 and 2 ( which I did). The second thing is to connect usart_tx and usart_rx to PB14 and PB15.
The problem is that nothing is showing up on the pc with DB3 port. I've check the tx port with an oscilloscope and I'm getting signal on data sending but only 1.1 V (in AC). I don't know if it's part of the issue but I hope someone has the solution

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
giorgio29
Associate

After activating the usart1_de pin, it is now working. I don't know why it was the issue but it has solved the problem.

Thank's you for the help !

View solution in original post

18 REPLIES 18
mƎALLEm
ST Employee

Hello @giorgio29 and welcome to the ST community,

I didn't understand this statement:


@giorgio29 wrote:

The second thing is to connect usart_tx and usart_rx to PB14 and PB15.


Why you need to do that? by setting up JP7 and JP8 to 1 and 2 connects RS232_Tx and RS232_Rx respectively to PB14 and PB15. From the board schematic:

mALLEm_0-1777303447771.png

mALLEm_1-1777304274880.png

PB14 and PB15. Did you wire something on the board?

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.
giorgio29
Associate

First, thank's for the response. I'ce done that because by default when activating the usart 1, tx and rx are setup on PA9 and PA10

Capture d'écran 2026-04-28 084924.png

 I maybe misunderstood something but I'm not supposed to change those settings ? ( nothing is wired on the board )

Bonjour,

Sorry but why are you using PA9 and PA10 here?

mALLEm_0-1777366337388.png

You should configure PB14 and PB15 to use DB9 for USART1 as indicated in the schematic:

mALLEm_1-1777366377005.png

 

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.
giorgio29
Associate

Ok I'll clarify.

1 ) I've activated the USART1 in asynchronous mode -> The default pins that were activated were PA9 and PA10.

2) I've changed those pins to match the documention -> The pins are now PB14 and PB15

3 ) I've changed the JP7 and JP8 as the documentation tells.

4 ) After several research, I've put the GPIO Pull up/pull down to Pull up in order to get a 5V output.

5 ) When looking at the tx pin (3rd for db9) with an oscilloscope, I can see data going throught but I can't get it on PC.

6 ) I've tryied several PCs and adapter so no problem there.

 

Tell me if there is anything not clear enough.


@giorgio29 wrote:

5 ) When looking at the tx pin (3rd for db9) with an oscilloscope, I can see data going throught but I can't get it on PC.


So your UART is now working.

Use the oscilloscope to measure the baud rate - is it correct?

 

How, exactly, are you physically connecting to the PC?

Note that this is RS232 levels - so you will need a PC connection supporting that.

 

What application(s) are you using on the PC?

 

BTW: Strictly, that connector is DE9 - not DB9:

The 'E' denotes the small shell, with a maximum of 9 pins;

The 'B' denotes a larger shell, with a maximum of 25 pins.

See: https://news.sparkfun.com/14298 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
giorgio29
Associate

The baud rate is fine too and I'm using an RS232 to USB adapter with both software (reflection and tera term). The setup is perfectly working on other projects with other MCUs


@giorgio29 wrote:

The setup is perfectly working on other projects with other MCUs


Are you sure the DE9 pinout of this board matches your other setups? Does it need a pin 2/3 swap?

Are specific states required on the other control lines ?

 

Have you tried with a simple USB-to-UART logic-level converter ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
giorgio29
Associate

I've try to send the same message with first the pc with the adapter connected to the oscilloscope and second with the card connected to the oscilloscope. I've got the same voltage, same baud rate but the difference is in the length of the message.With a baudrate of 38400, the message took 3.1ms to be send against 2.8ms on the card. It would say that for the same message, the pc is sending more data.

Is this helpful ?

That time difference is likely just down to spacing between characters - so probably not significant.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.