cancel
Showing results for 
Search instead for 
Did you mean: 

USB Data Transfer with STM32L552E-EV

Nirene
Associate

Greetings,

Kindly, I would like to know which USB interface I can use to transfer data between the STM32L552E-EV and the reComputer J4012.

I am working with TEE, and my goal is to send plaintext from the reComputer to the STM32L5 so that it can be encrypted on the device. However, when I send data, I do not receive any response.

I have tried using both the USB port and ST-Link, but the result is the same. I can see the ST-Link device on the reComputer, but when I use USB CDC, it is not recognized.

Could you explain the proper USB connection and how to set up the communication?

 

3 REPLIES 3
mƎALLEm
ST Employee

Hello,

The connection (CN22) of STLINK over a virtual comport (windows)  offers a kind of "UART protocol over USB".

If you need to use the USB you need to use CN1 connector (USB FS).

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.
Andrew Neil
Super User

Some more detail would help:

How to write your question to maximize your chances to find a solution

 


@Nirene wrote:

the reComputer J4012.


You mean this: https://files.seeedstudio.com/wiki/reComputer/reComputer-J40.pdf ?

 


@Nirene wrote:

I am working with TEE,


What do you mean by that?

 


@Nirene wrote:

However, when I send data, I do not receive any response.


So what, exactly, did you try?

As @mƎALLEm said, the ST-Link provides a Virtual COM Port (VCP); for native USB, you would use CN1.

 

For the VCP, you just need to use the STM32L5 UART on whichever of the STM32L5's pins is connected to the VCP - see the board's User Manual for details.

 

For native USB, you would have to make a complete USB device implementation.

 

CubeMX will give you access to examples...

 

PS:

The STM32L552E-EV also has an RS232 port, so you could use a USB-to-RS232 adaptor;

There are also logic-level UART signals available on the PMOD and STMOD+ connectors, so you could use a UART-to-USB adaptor (of the appropriate voltage) there.

These will also give you a VCP.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

From the User Manual:

AndrewNeil_0-1768994297502.png

AndrewNeil_2-1768994340285.png

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.