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!
Solved! Go to Solution.
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:
2024-08-29 11:24 AM - edited 2024-12-08 08:40 AM
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 are quite high.
If you need output via the USART, get that working FIRST, figure out the plumbing
2024-08-29 01:16 PM
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.
2024-08-29 05:53 PM
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!
2024-08-30 02:53 AM - edited 2024-08-30 03:49 AM
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!
Same issue as this thread.
2024-08-31 01:32 AM - edited 2024-08-31 01:36 AM
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.
2024-08-31 01:33 AM
2024-08-31 01:38 AM
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?
2024-08-31 02:09 AM
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.
2024-08-31 05:54 AM
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