cancel
Showing results for 
Search instead for 
Did you mean: 

Troubles in Programming USART of NucleoF429

Hasan
Associate II

Hi All,

I am new in ST microcontrollers. I tried to get messages from the USART module of NucleoF429. i follow the steps in this article:

STM32StepByStep:Step3 Introduction to the UART - stm32mcu

I used many serial monitor tools such as TeraTerm but I could not get anything ..

I tried all the USART modules of F429, but I could not get anything.

Could you please help me ?

Thanks

6 REPLIES 6
KDJEM.1
ST Employee

Hi @Hasan​  and welcome to the Community 🙂,

Unlike the step by step tutorial, USART3 needs to be used for Nucleo-F429 (show the UM1974 and precisely section 6.9 USART communication).

I suggest you follow these steps:

  1. Create a new project using STM32CubeMx.
  2. Select Nucleo-F429ZI board using Board Selector.
  3. Answer Yes to Initialize all peripherals with their default mode ? popup.
  4. In Pinout view tab, check that USART3 mode is configured to Asynchronous, PD8 is connected to USART3_TX and PD9 is connected to USART3_RX.
  5. Click on USART3 button, select Parameter Settings and make sure the parameters as shown in the below figure.0693W00000QNhhNQAT.png
  6. Select GPIO Settings and make sure the configuration GPIO as shown in the below figure.0693W00000QNhhrQAD.png
  7. Disable all other USARTs.
  8. Switch to the Project Manager tab and select STM32CubeIDE as Toolchain / IDE and give a name to your project.
  9. Click on Generate Code and accept to open your project in STM32CubeIDE.
  10. Open main.c in Project Explorer / myproject / Src / main.c.
  11. Insert the following lines between /* USER CODE BEGIN 3 */ and /* USER CODE END 3 */:
uint8_t Test[] = "Hello World !!!\r\n"; //Data to send
HAL_UART_Transmit(&huart3,Test,sizeof(Test),10);// Sending in normal mode
HAL_Delay(1000);

12.Check that no problem happened by rebuilding all files. There must be no error and no warning.

13.Open TeraTerm, select file>New connection and choose the right Port as shown in the below figure.0693W00000QNhiBQAT.png 14.Select Setup>Serial port setup and connection and modify the speed to 115200 as shown in the below figure.0693W00000QNhifQAD.png 15.The TeraTerm displays Hello Worlds !!! string confirming you were able to program and use RS232.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar

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.

I fellow your steps, then the ST-Linker crashed (does not work). I could not now program my device and I get the following messages when i try to download my program on Nucleo-F429:

In the console, I get the following message:

Target no device found

Error in initializing ST-LINK device.

Reason: No device found on target.

and then I get a message box saying:

Error in final launch sequence:

Failed to execute MI command:

target remote localhost:61234

Error message from debugger back end:

localhost:61234: Connection timed out.

Failed to execute MI command:

target remote localhost:61234

Error message from debugger back end:

localhost:61234: Connection timed out.

localhost:61234: Connection timed out.

Could you please help me in this problem ...

Hi @Hasan​ ,

Refer to the UM1974 Section 5.1 and check if all jumpers are correctly configured:

-JP1 is OFF

-JP3 on U5V

-JP5 is ON 

-CN4 is ON

Also, try to connect with STM32CubeProgrammer and upgrade the ST-Link firmware.  

Kaouthar

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.

I have checked all these jumpers at the beginning, and I programmed my device many times after that without any problem. So, let us skip the point of checking the jumpers.
The ST-Link does not respond at all .. how can I make a hardware reset for it ?
Thanks
Husni Khanfar,
Hasan
Associate II

Thanks ... I use the programmer now ... this problem has been fixed ..

but I still could not program USART .. I think there is a bug in Nucleo-F429

KDJEM.1
ST Employee

Hi @Hasan​ ,

Glad to know that ST-Link issue is already fixed.

For me, I can program the USART3 for Nucleo-F429ZI by following the steps shared with you.

Kaouthar

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.