cancel
Showing results for 
Search instead for 
Did you mean: 

Help Needed with UART Data Transmission on STM32H755 Nucleo Board for Student Project

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
Pavel A.
Evangelist III

 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

@Student1 The USB converter should be TTL (low voltage) rather than RS-232 (with 9-pin connector) if you wire it directly to the MCU pins.


I configured the USB settings in CubeMX for CDC communication and tried to transmit data through USART3

Why are you needing to activate USB CDC?

You can use USART3 (as described earlier by @Tesla DeLorean: regular UART config) and use VCP of ST-LINK of the board.

This is a sketch illustrating the connections between the different parts:

SofLit_0-1725269670634.png

 

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.