2024-10-26 04:13 AM - last edited on 2024-10-26 10:38 AM by Tesla DeLorean
Hello, I am new to STM32 and need help with UART.
In recent days I have been trying to deploy my own neural network model on NUCLEO-H755ZI-Q development board. Through ST Edge AI Developer Cloud, I have generated my own CUEB IDE project. In the IDE project, it uses USART3. After reading the development board manual, I learned that USART3 communication between TM32H7 and STLINK is enabled by default, but I cannot receive the data sent through the serial port on the PC side.
Then, I used other serial ports such as USART2, USART1 to test serial output, and connected the PC to the development board through a USB to serial port module, but still could not receive data on the PC side.
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USART1_UART_Init();
/* USER CODE BEGIN 2 */
uint8_t data[] = "Hello World!\n";
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
HAL_UART_Transmit(&huart1,data,10,1000);
HAL_Delay(1000);
/* USER CODE BEGIN 3 */
}
The value returned by the function is HAL_OK.
I posted the IOC file generated by ST Edge AI Developer Cloud and the IOC file for testing the serial port output. I am happy to get any help and suggestions!
2024-10-26 06:00 AM
USART3 on PD8 and PD9
Here's the schematic for the board for reference
https://www.st.com/resource/en/schematic_pack/mb1363-h755ziq-d01_schematic.pdf
2024-10-26 08:27 AM
Two things you can try.
2024-10-28 07:12 PM
About USART3 (on PD8&PD9) connected to embedded STLINK, the IO assignment is correct in NUCLEO-H755ZI-Q.ioc as shown below. so if you connect your PC to USB connector CN1 on your board, there no HW connection issue. You may check your FW by open SB17 and loop back PD8 and PD9 to see if you can get data received. in parallel, you may need to check if baud rate is set correctly in PC side.