cancel
Showing results for 
Search instead for 
Did you mean: 

UART Data Transmission on STM32H755 Nucleo Board

Student1
Associate II

Hello everyone,

I'm reaching out in hopes of getting some urgent assistance with a project I'm working on for my studies. The deadline is approaching quickly, and I need to resolve this issue as soon as possible.

Project Overview:

I'm developing an anomaly detection application using NanoEdge AI Studio for a student project. My setup involves an LSM6DSOX accelerometer/gyroscope sensor connected via the I2C protocol to the STM32H755 Nucleo board. The objective is to collect motion data for training AI models that detect anomalies.

Problems Encountered:

  1. UART Data Transmission: My main issue is that I can't get any data to show up on the serial monitor of my PC. Here's what I have tried:

    • Virtual COM Port over USB: I initially set up UART communication using a virtual COM port through USB. I configured the UART in CubeMX, ensuring the baud rate, word length, parity, and stop bits matched on both ends. However, no data appears on the serial monitor.

    • UART to USB Converter: I also tried using a UART-to-USB converter, thinking the problem might be with the virtual COM port setup. I connected the TX and RX pins correctly and verified the settings. Unfortunately, there was still no communication between the board and my PC.

  2. CubeMX Configuration:

    • I configured USART2 in asynchronous mode and assigned the TX  and RX  pins, setting them to their alternative function in the GPIO settings.
    • All clock configurations and peripherals were set up according to the STM32H755 datasheet and tutorials. I enabled HSE and LSE oscillators, ensured proper configuration, and checked all clocks (HCLK, PCLK1, PCLK2, etc.).
  3. I2C Sensor Data:

    • I implemented a test in the code to check if data is being received from the I2C sensor. The test involves blinking an LED every time data is received from the sensor. This test confirms that data transmission over I2C is working correctly, as the LED blinks when data is present.
  4. No Data in Serial Monitor: Despite using both methods (virtual COM port and UART-to-USB converter), the serial monitor remains blank. The baud rate and other communication settings were double-checked and matched on both the microcontroller and the PC, but nothing seems to work.

Specific Questions:

  • Is there something I'm missing in my UART configuration that could be causing this issue?
  • Is it possible to collect data from an I2C sensor and transmit it over UART in this setup? Has anyone done this successfully with the STM32H755 Nucleo board?
  • Are there known issues with the STM32H755 regarding UART communication that I should be aware of?
  • What additional steps can I take to debug this and ensure proper communication between the microcontroller and the PC?

Thank you so much for your support!

 

 

11 REPLIES 11

Do you have a Project Supervisor, who can help you?

There aren't any known issues with the NUCLEO-H755ZIQ serial port, by default the VCP furnished by the ST-LINK resides on the H755's USART3 using PD8 / PD9. The others should also work for external connectivity, provided they aren't conflicted with other usage on the board.

Here's a schematic if you've not found that yet

https://www.st.com/resource/en/schematic_pack/mb1363-h755ziq-d01_schematic.pdf

>>Is there something I'm missing in my UART configuration that could be causing this issue?

Not really provide any specificity what you've done, or pins you've used. Think of it like the lottery, you're not going to win it unless you have all the winning numbers.. and the opportunities to lose a quite high.

If you need output via the USART, get that working FIRST, figure out the plumbing

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Karl Yamashita
Lead III

Without seeing code, we don't know what you're doing to even attempt to send UART data.

Might as well attach the IOC file too.

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.
Pavel A.
Evangelist III

Hi, for urgent help with your project look here. A dedicated helper can review your schema and source files, even connect remotely to your machine and fix things. Good luck!

 

SofLit
ST Employee

The first issue resides in the UART instance selection. You selected USART2 while you need to select USART3 (Tx: PD8 / Rx: PD9) as this is the instance connected to the VCP. That's why before starting to struggle with the coding and configuration you need to check the HW and schematics before!

SofLit_0-1725011524353.png

Same issue as this thread.

 

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.

Thank you for your response.

I initially used USART3, as I understand it’s set up by default for the virtual COM port with the ST-LINK. I used a standard USB data cable to connect and attempted to send data, but nothing appeared on the serial monitor. After that, I tried using another USART, specifically USART2 with usart to Usb converter, and made sure to connect the RX and TX to the corresponding pins as per the datasheet. Unfortunately, the data transmission also failed with this setup.

I appreciate any further guidance you can provide on this.

thanks for responding 
here is what i tried to do 

Thank you for the advice!

I understand that USART3 is connected to the VCP and is already selected by default for the Virtual COM Port. I configured the USB settings in CubeMX for CDC communication and tried to transmit data through USART3, but it failed to show up on the serial monitor. Afterward, I tried using USART2 with a USB to UART converter, but this also didn't work. Could this issue be related to a clock configuration problem, or might there be another underlying issue?

The USB pins are on PA11 and PA12. If you want to use CDC, you have to use the USB connector on CN13.

Only the VCP can only communicate with UART3 and can't be configured as a CDC. 

UART2 looks to be remappable but you haven't mentioned which pins you used?

Upload your IOC file to see how you configured it.

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

USART3 is used like a regular USART, you send data to it using HAL_UART_Transmit() functions, and recover via the ST-LINK's COM port on the PC side.

You don't have to configure the H755 as a USB CDC Device.

Make a simple app to enable USART3 PD8/PD9 at 115200 baud, write a simple function to send a string to USART3, confirm you can see the data in a PC Terminal application.

 

For a H755 hosted CDC you'd use the USB connection on the South end of the NUCLEO-H755ZI-Q

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..