Skip to main content
ToasterOvenDan
Associate II
March 17, 2025
Solved

STM32F407 Discovery Board UART1 not working

  • March 17, 2025
  • 4 replies
  • 1961 views

DS1Z_QuickPrint1.pngGPIO STM serial test.jpg

I'm having the same problem on 2 different boards. I gen'd up a simple program using CubeMX and I'm only sending some data to both ports at the same time:

 

void StartTask02(void const * argument)
{
 /* USER CODE BEGIN StartTask02 */
 /* Infinite loop */
 int i;
 for(i = 0;i < DATA_SIZE;i++)
	 data[i] = i;
 vTaskDelay(1000);
 for(;;)
 {
 vTaskDelay(2);
	HAL_UART_Transmit(&huart1, &data[0], DATA_SIZE/5, 100);
	HAL_UART_Transmit(&huart2, &data[0], DATA_SIZE/5, 100);
 }
 /* USER CODE END StartTask02 */
}

 

I thought maybe one was a 'knock-off' because the LED's aren't colored while the other is.

This topic has been closed for replies.
Best answer by Pavel A.

See the document for your board, page 22. https://www.st.com/resource/en/user_manual/dm00039084-discovery-kit-with-stm32f407vg-mcu-stmicroelectronics.pdf

Pins PA9, PA10 are not free to use. They are connected to the green LED and USB.

Before assigning pins, check that these pins are free to use - even if they are routed to connector.

Try USART3 on TX PD8, RX PD9 

4 replies

AScha.3
Super User
March 17, 2025

Show circuit, what you connect to the boards, so its not only guessing...

+

On your scope pic : 50v/div + 5V/div -> about 30Vss + 15Vss signals , where you measure this ??

If you feel a post has answered your question, please click on " Best Answer ".
ToasterOvenDan
Associate II
March 18, 2025

I just had the scope probes hooked up to TX of UART1 & 2. I didn't bother to set the voltages.

Pavel A.
Pavel A.Best answer
March 17, 2025

See the document for your board, page 22. https://www.st.com/resource/en/user_manual/dm00039084-discovery-kit-with-stm32f407vg-mcu-stmicroelectronics.pdf

Pins PA9, PA10 are not free to use. They are connected to the green LED and USB.

Before assigning pins, check that these pins are free to use - even if they are routed to connector.

Try USART3 on TX PD8, RX PD9 

ToasterOvenDan
Associate II
March 18, 2025

I think you may be right. In the manual, I found this:

USB LD7: green LED indicates when VBUS is present on CN5 and is connected to PA9
of the STM32F407VGT6

dm00039084-discovery-kit-with-stm32f407vg-mcu-stmicroelectronics.pdf  on page 18/32