cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to display messages on Tera Term via USART1 on STM32F429I-Discovery

chachamaru
Associate III

Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code.

Hello,

I’m using the STM32F429I-Discovery board and trying to display “Hello World” on Tera Term via USART1 (PA9, PA10).

I configured the project in STM32CubeIDE as follows:

  • USART1 → Mode: Asynchronous

  • TX: PA9, RX: PA10

  • Baudrate: 115200, 8N1, No Flow Control

  • Using the ST-LINK Virtual COM Port (USB connector CN1)

 

main.c

HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_USART1_UART_Init();

const char msg[] = "Hello World\r\n";
HAL_UART_Transmit(&huart1, (uint8_t*)msg, sizeof(msg)-1, HAL_MAX_DELAY);
while (1)
{
HAL_UART_Transmit(&huart1, (uint8_t*)"Hello Again\r\n", 13, HAL_MAX_DELAY);
HAL_Delay(1000);
}

However, nothing appears on Tera Term.
The “ST-LINK Virtual COM Port (COMxx)” is visible in the Windows Device Manager, and I’ve selected the correct COM port in Tera Term.
Also, when I checked the PA9 pin with an oscilloscope, there was no signal output.

Has anyone successfully used USART1 on the F429I-Discovery board?
Any advice or examples on how to correctly enable UART output on this board would be greatly appreciated

19 REPLIES 19

First in next time please use </> button to paste your code. 

Second, please share your project (attach it in zip file) so I could test it from my side:

mALLEm_0-1762419655888.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.

@chachamaru wrote:

I’m currently working with the official STM32 example project “UART_TwoBoards_ComPolling”, and I’m trying to display “Hello” on Tera Term.


As the name suggests, that example is intended to work between two boards.

There should be separate examples to illustrate comms with a PC ...

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.

@Andrew Neil wrote:

@chachamaru wrote:

I checked the PA9 pin with an oscilloscope, there was no signal output.


What about PA10 - ie, is stuff transmitted by the PC arriving at the STM32?


@chachamaru - have you done this?

 


@Andrew Neil wrote:

Are you sure that your code has actually been built and downloaded to the board?

Have you tried stepping it in the debugger?


And this ?

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.
Andrew Neil
Super User

@chachamaru Have you tried using a different terminal app?

Sometimes, TeraTerm does seem to get itself into a "confused" state ...

 

PS:

A bit more on that "confused state" here.

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.
mƎALLEm
ST Employee

Unfortunately I can't try with Tera Term right now but I can try with Hercule.

Attached a project where "Hello World" is printed in Hercule interface:

mALLEm_0-1762445770158.png

The HyperTerminal config:

mALLEm_1-1762445809340.png

PS: the code you shared in your last post should be used with two boards. You need to read the readme file of the example before to run the example. 

Ensure: SB11, SB15 are soldered and JP4 is not fitted.

mALLEm_2-1762446170486.png

Hope that helps

 

 

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.

Thank you for your reply.

I finally managed to display “Hello World”!

Now I’m integrating it into the program I was originally using.

I’d be happy if you could continue helping me from here on out.


@chachamaru wrote:

I finally managed to display “Hello World”!


Great - what was the secret?

Please mark the solution - whichever post gave you the clue, or write a description if none did.

 


@chachamaru wrote:

I’d be happy if you could continue helping me from here on out.


Of course - start a new thread for a new question.

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.

I ran the example “F429_DISCO1_UART_Print” and successfully displayed “Hello World” on Tera Term.

Then I tried to port this project into my own one (which is a camera project).
However, the result was garbled characters in the terminal.

The baud rate (115200) and PLL/clock configuration are the same as in the working example.
Do you have any idea what might cause the characters to be corrupted?

 

 

chachamaru_0-1762763969388.png

Fig.1 Display result

chachamaru_1-1762764045629.png

Fig.2 PLL configuration

chachamaru_2-1762764099219.png

Fig.3 Baud rate (115200)  on Teraterm

chachamaru_3-1762764179996.png

Fig.4 Baundrate on project

Hello @chachamaru 

You've already accepted the solution and the original question has been answered and now you unmarked it because you you are asking a new question now not related to the USART config but to another staff. I will mark the solution again and please open a new thread and refer to this one.

Thank you for your understanding.

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 new thread is here: 

https://community.st.com/t5/stm32cubeide-mcus/uart-output-is-garbled-on-tera-term/td-p/854692

@chachamaru - always helps to give a link!

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.