cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 Discovery Board UART1 not working

ToasterOvenDan
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

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 

View solution in original post

4 REPLIES 4
AScha.3
Chief III

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 "Accept as Solution".
Pavel A.
Evangelist III

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 

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

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