cancel
Showing results for 
Search instead for 
Did you mean: 

VCP on Nucleo : What's wrong ?

root
Associate II
Posted on August 25, 2014 at 16:33

Hello,

I'm developping an internal production tool that uses a nucleo as MCU board.

It uses the built in VCP to communicate with a .NET application.

I'm using vitual com ports on many many apps and never had such problems.

First you can't send a byte buffer to the VCP driver, you have to send data byte per byte (otherwise it just doesn't send anything !) ...

Then receiving ... it seems to work at first, but if you start sending some data (more than a few bytes at a time), then you randomly loose data or it just stops working (or signal the OS that a byte is received many seconds after the byte arrived, etc).

I connected a logic analyser on TX/RX lines and on no problem on this level.

I need a reliable com port communication, is that possible with Nucleo?

Did someone already managed to get it working correctly?

Thomas.
2 REPLIES 2
S C
ST Employee
Posted on August 25, 2014 at 18:56

Hello,

May you please first check that the version V2J22M5 is programmed on your board (

https://mbed.org/teams/ST/wiki/Nucleo-Firmware

).

Then if you can, prefer using USB2.0 ports when using the virtual com port. Issues have been reported in the OUT direction (PC to Nucleo) through USB3.0 ports. Or try to do a packet segmentation with different sizes before sending data to the driver to USB3.0 port. Investigations are in progress.

In the IN direction (Nucleo to PC), the last sent frame may be delayed - but not lost (like a cache flush issue), depending on its size and not systematically: this will be fixed in a next Nucleo firmware version.
root
Associate II
Posted on August 28, 2014 at 08:41

Hello,

Thanks for the insight. Being on a hurry, I redesigned a board with an external USB/serial converter.

I was using latest version of ST-Link. It was plugged on USB3.0 port indeed. And yes I can confirm both bugs (I had to send data byte per byte to make it working from PC to nucleo, and from Nucleo to PC I sometimes had HUUUUUUUGE delay - like 10s - to received data).

I have some projects for the Nucleo boards I have here (about 10 ...) but all of them need reliable PC communication through VCP. When this will work it will be a killer.

Thomas.