cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G071C8T6 and USART3

gh_rcl
Associate

Hi All,

I don't managed to send char on USART3 with the attached project.

I was wondering if someone had already detected issue in using USART3

Thanks in advance

3 REPLIES 3

Where in the code are you transmitting and how?

What hardware are you using? Did you observe the Tx pin using oscilloscope?

Read out and check/post the relevant USART and GPIO registers content.

JW

TDK
Guru

Your code doesn't attempt to send anything. It initializes the peripheral but never uses it.

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_USART3_UART_Init();
  /* USER CODE BEGIN 2 */
 
  /* USER CODE END 2 */
 
  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */
 
    /* USER CODE BEGIN 3 */
  }

Lots of examples out there to follow:

https://github.com/STMicroelectronics/STM32CubeG0/blob/5cb06333a6a43cefbe145f10a5aa98d3cc4cffee/Projects/NUCLEO-G071RB/Examples/UART/UART_TwoBoards_ComPolling/Src/main.c

If you feel a post has answered your question, please click "Accept as Solution".
gh_rcl
Associate

Hello,

Thanks for your feedback.

Indeed i attached the wrong file.

Anyway i found the issue. Indeed by setting Tx and Rx as output, i noticed that only Rx was OK.

By testing with another board it works.

Thanks again for your time.

gh_rcl