2024-05-06 02:12 PM
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.
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.
I'm unsure how to resolve these issues and would appreciate any assistance. Thank you!
2024-05-06 02:37 PM
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.
2024-05-07 01:51 AM
thank u for ur answer , i try to work with uart and usb cdc but it dosen't work
2024-05-07 02:10 PM
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
2024-05-07 02:23 PM
2024-05-07 02:34 PM
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
2024-05-07 02:46 PM
@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.
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?
2024-05-07 02:51 PM
@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?
2024-05-08 07:50 AM
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.
2024-05-08 08:57 AM
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.