cancel
Showing results for 
Search instead for 
Did you mean: 

USB host or usb cdc or UART

sana1
Associate III

In my graduation project, I'm utilizing the STM32H735_DK microcontroller to communicate with a GMSL (Generalized Memory Scalable Logic) device. Typically, these devices are configured using terminal programs like Putty or TeraTerm. Commands, such as "PICT START," are sent via a USB A to USB B cable from a PC to the GMSL.

 

sana1_0-1715029002465.pngsana1_1-1715029034646.png

 

sana1_2-1715029194638.png

 

Despite my attempts to replicate this communication using UART and USB CDC with the STM32, I've encountered difficulties. Conversely, my friend successfully communicated with a GMSL device using a Raspberry Pi via a serial port.

sana1_3-1715029876065.png

 

I'm unsure how to resolve these issues and would appreciate any assistance. Thank you!

18 REPLIES 18

The DISCO' ST-LINK provides for a COM port CDC connection which terminates on the STM32H735 as a UART, this is perhaps the easiest to deal with.

You could use a USB CDC Device implementation on the H735 via one of it's own USB interfaces. This is somewhat more complicated as the STM32 must run it's USB processing loop, and if you want to do other things concurrently you're either going to need to use an RTOS, or create your own stateful implementation that can run briefly, and come back later, or periodically pump the USB task/work.

Mess that up and the host is going to stall the USB transactions.

The RPi has an OS, you don't.

You need to implement a subset of that functionality or timeliness required to implement USB.

You won't be the first to find it challenging to move away from the linear execution model.

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

 

thank u for ur answer , i try to work with uart and usb  cdc but it dosen't work 

Unfortunately "doesn't work" is very difficult to debug.

Show the UART code, show the wiring.

How is this GMSL device connected to the STM32H735-DK

You're going to have to explain this a whole lot better for people to remotely debug what on earth you're doing.

Can your friend explain how he did it to you? Or to us?

Does the GMSL connect via USB? Is there any other way to connect it?

For the H735 to connect that way you'd need a USB HOST driver

 

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

Typically, commands are sent to the GMSL via Tera Term. However, I'm now aiming to send the same commands using an STM32 microcontroller instead. I'm uncertain about the exact protocol I should be working with. The GMSL has a port  B similar to the one shown in the photo I provided earlier.

and my friend send the same caamnd via port usb from rasberry to GMSL 


@sana1 wrote:

I'm uncertain about the exact protocol I should be working with.  


Then you're going to have to look into that further.

  1. Study its documentation.
  2. Contact its manufacturer and/or supplier for support. Do they have a forum?
  3. Seek help from your friend and/or your supervisors/tutors

You've given no details of this "GSML" - so we can't help you there.

You still haven't explained what you mean by "communication using UART and (sic?) USB CDC".

UART and USB CDC are two different things - does your "GMSL" support both?

UART would be far simpler to implement than USB CDC - have you tried that?


@sana1 wrote:

a GMSL (Generalized Memory Scalable Logic) device. 


Not finding any hits for that.

But many for "GMSL" as "Gigabit Multimedia Serial Link" - is that what you mean?

FBL
ST Employee

Hi @sana1 

 

The following FAQ may help you on How to write your question to maximize your chance... - STMicroelectronics Community

You need to provide details on how you establish communication between the GMSL device and at least using your raspberry? Attach the datasheet of GMSIL device. Unfortunately, pictures attached does not explain your hardware setup. Knowing the connector cannot allow us to predict the protocol used.

Thank you for your understanding.

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.


I'm out of offce with limited access to my emails.
Happy New Year!

sana1_1-1715183354280.png

sana1_2-1715183395130.png

 

I have gathered information from the schematic of the GMSL UART connection to an MCU (Micro 100). This MCU is then linked to uart then  PC via USB to receive commands through Tera Term or PuTTY. My question is about configuring the USB on the STM32. Should I set it up as a USB CDC device or host, or is there another configuration that I should consider? I apologize for any confusion in my explanation; I'm new to working with STM and this project marks my first venture into this field. Any guidance would be greatly appreciated.