cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with data reception via USART3 on STM32F429-Disco board

Emanuele78
Associate III

Original post: https://community.st.com/t5/stm32cubemx-mcus/problems-with-data-reception-via-usart2-on-stm32f429zi/td-p/741765

Even setting USART3 it doesn't work (see attachments). Did I make a mistake setting some parameters, or is something missing? Thanks a lot

1 ACCEPTED SOLUTION

Accepted Solutions

Please refer to the thread I provided to you (there is an example of printf attached): https://community.st.com/t5/stm32-mcus-embedded-software/how-to-use-printf/m-p/736985#M56462

F429-DISCO is using USART1 connected to VCP:

From the user manual of the board:

SofLit_1-1731409358224.png

From F429-DISCO schematics:

SofLit_0-1731409235084.png

Hope it 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.

View solution in original post

14 REPLIES 14
SofLit
ST Employee

The attachments are not helpful. Normally you need to share your code and attach your ioc file.

Meanwhile, you can use this example already running on STM32F429ZI-Nucleo board:

https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM32F429ZI-Nucleo/Examples/UART/UART_Printf

Hope it 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.
Andrew Neil
Evangelist III
SofLit
ST Employee

I noticed you are using F429 disco board that it is using USART1.

See the example I attached in this thread.

As stated by @Andrew Neil you need to share the code + provide which HW you are using, ST board? Custom board? this prevents us to provide you wrong answers.

 

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.
SofLit
ST Employee

Hello @Emanuele78 , did you mistakenly accept the wrong comment as solution ?

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.

Given that I am using the STM32F429ZIT6 DISCOVERY KIT connected to the PC via USB, from the received messages I didn’t understand whether I should use USART3 or USART1. I tried following the instructions, but it doesn’t work.

Ok, the code in main.c is very simple:

/* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
   if(HAL_GPIO_ReadPin(Pulsante_on_board_GPIO_Port, Pulsante_on_board_Pin))
   {
   stato = !stato;
   HAL_Delay(250);
   }

   HAL_GPIO_WritePin(Led_on_board_LD3_GPIO_Port, Led_on_board_LD3_Pin, stato);

   if(HAL_UART_Transmit(&huart3, (const uint8_t *)"TEST ", 6, 100) !=HAL_OK)
		   Error_Handler();
   HAL_Delay(500);
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
  }

 

Yes, sorry..

Please refer to the thread I provided to you (there is an example of printf attached): https://community.st.com/t5/stm32-mcus-embedded-software/how-to-use-printf/m-p/736985#M56462

F429-DISCO is using USART1 connected to VCP:

From the user manual of the board:

SofLit_1-1731409358224.png

From F429-DISCO schematics:

SofLit_0-1731409235084.png

Hope it 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.

@Emanuele78 wrote:

I am using the STM32F429ZIT6 DISCOVERY KIT connected to the PC via USB ... I didn’t understand whether I should use USART3 or USART1


You need to use whichever USART is connected through to that USB connection!

That will be stated in the User Manual for the board, and can also be seen in the schematics of the board.