2024-08-29 10:35 AM - last edited on 2024-11-05 01:07 PM by Andrew Neil
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.
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.
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.
CubeMX Configuration:
I2C Sensor Data:
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.
Thank you so much for your support!
2024-08-31 02:23 PM
> 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.
2024-09-02 02:35 AM - edited 2024-09-02 03:01 AM
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: