2026-04-27 8:12 AM - last edited on 2026-04-30 2:23 AM by KDJEM.1
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
Solved! Go to Solution.
2026-04-28 7:32 AM
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 !
2026-04-27 8:25 AM - edited 2026-04-27 8:38 AM
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:
PB14 and PB15. Did you wire something on the board?
2026-04-27 11:51 PM - edited 2026-04-28 12:01 AM
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
I maybe misunderstood something but I'm not supposed to change those settings ? ( nothing is wired on the board )
2026-04-28 1:53 AM
Bonjour,
Sorry but why are you using PA9 and PA10 here?
You should configure PB14 and PB15 to use DB9 for USART1 as indicated in the schematic:
2026-04-28 4:24 AM
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.
2026-04-28 4:48 AM
@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
2026-04-28 4:53 AM
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
2026-04-28 5:03 AM
@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 ?
2026-04-28 6:51 AM
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 ?
2026-04-28 7:01 AM
That time difference is likely just down to spacing between characters - so probably not significant.