cancel
Showing results for 
Search instead for 
Did you mean: 

USB virtual com device(STM32F765ZI Nucleo)

Edwin kaus
Associate II
Posted on September 14, 2017 at 18:45

Hai.,

I am using STM32F767ZI NUCLEO board(144 pin), In this I need to use Full speed USB as Virtual com port device, I generated code using 

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef7.html

 programmed the board. If I connect USB to PC it is detecting as virtual com port device But its showing warning sysmbol, and also I can't able to send/receive data from PC. Is there any additional driver reuired in PC side. How to check data  transfer between PC and board.

Can you please sort out this problem as soon as possible??

Thank you.,.  

#stm32f765-nucleo #stme32-cube #usbvcom #stm32f765
9 REPLIES 9
Posted on September 14, 2017 at 22:39

You need a USB VCP (CDC) driver on Windows PC side. With Windows 10 - it comes with it (no need for a driver), for other Windows versions there is/was a STM VCP driver.

It looks to me, when you install the latest ST-LINK Utility or the STM SystemWorkbench (AC6) this driver might come with it.
Posted on September 15, 2017 at 07:08

Hello

Jaekel.Torsten

Thank you for the reply.

Since I am using windows 10 , its not necessary of drivers in PC side as per your suggestion. To start with I need make simple echo device (device should receive data from PC and echo the same to PC), For this Do I need to make any changes to standard USB device VCOM example(which I generated through STM32 cueMX tool).

>> Usb device is detecting in PC as Virtual com port device , but It can't accessible through any application(like hyper terminal,tera terminal).

I have attached the screenshot of device manager, can you please look and sort out the issue.0690X00000608F8QAI.png

Posted on September 15, 2017 at 11:04

Hi

karthikshivanna.94

‌,

as shared by

Jaekel.Torsten

‌,on Windows 10, there is no need for a virtual com port driver to be installed. It is loaded by default when you plug-in a device.

But according to Microsoft documentation, you need to set class and subclass ID to 0x2 (see

https://msdn.microsoft.com/en-us/library/windows/hardware/dn707976(v=vs.85).aspx

.

This should be also fixed in some of our HAL/CubeMX examples.

Best regards,

Cedric

Posted on September 15, 2017 at 14:31

Hi

Lecoutre.Cedric

Yes it is right that its not necessary to load any driver, but my doubt is why that warning coming (screenshot attached in last message). And also the virtual com port shown in device manager is also not accessible in applications (like HyperTerminal), If it is accessible then I can transmit and receive data .

What would you suggest?

Thank you.,

Posted on September 15, 2017 at 16:54

It looks to me, you do not use COM5, not the ST-LINK VCP device, instead you have developed your own VCP (CDC) based on the STM FW/sample/CubeMX and using the user USB port for it ... - if device driver does not start (yellow flag on it) - potentially an issue with your USB Device Enumeration (MCU sends incorrect USB enumeration, classes, PID/VID do not match or still a need to install the STM VCP driver (I could not see anymore a download link on STM site)).

I would start with an USB analyzer, e.g. USBlyzer:

http://www.usblyzer.com/

  and check if you see errors in USB enumeration.

Check also if the PID/VID, the classes sent via the USB Enumeration are correct, e.g. this class 2, subclass 2 as requested by the Windows 10 VCP/CDC driver. Pretty sure, USB Enumerations (all your USB descriptors defined in USB CDC) is the main reason.
Posted on September 15, 2017 at 19:21

Hai.,

I am really wonder because I am using standard STM32 evolution board and standard software provided by STM, I did no changes to standard available USB device code, But still its not working and facing lot of problem,

Even though STM people can't able to suspect the problem , Where I need to raise the issue and who is the right person to give solution .

I have lot of challenges with this controller ahead , but now I am really in big dilemma weather I need to go for other MCU or not.

Because I am not getting good support from your side for this small small issues , then what happen if I may struck in big problems in future.

Please escalate this issue and find resolution as soon as possible.! 

Posted on September 16, 2017 at 00:56

>>Because I am not getting good support from your side for this small small issues , then what happen if I may struck in big problems in future.  Please escalate this issue and find resolution as soon as possible.! 

He doesn't work for ST, you should work with the FAE assigned to your account.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 16, 2017 at 14:08

Hi., 

I analyzed the usb enumeration process, I don't find any issue in enumeration process, But once device get enumerated after some time automatically its getting disconnected.

Can you please internally escalate this issue and try to sort out as soon as possible. Its been one 10 days I stuck in this issue.

I have attached the USB enumeration LOG file for your reference.

//********************************************************************LOG Data**********************************************************************************//

000000: PnP Event: Device Connected (UP), 2017-09-16 17:13:53.3771941 (1. Device: Unknown)

The USB device has just been connected to the system.

000001: Get Descriptor Request (DOWN), 2017-09-16 17:13:53.3772276 +0.0000335 (1. Device: Unknown)

Descriptor Type: Device

Descriptor Index: 0x0

Transfer Buffer Size: 0x12 bytes

000002: Get Descriptor Request (UP), 2017-09-16 17:13:53.3772290 +0.0000014. (1. Device: Unknown) Status: 0x00000000

Descriptor Type: Device

Descriptor Index: 0x0

Transfer Buffer Size: 0x12 bytes

 12 01 01 02 00 00 00 40 83 04 2A 57 00 02 01 02   .......@Æ’.*W....

 03 01                                             ..

000003: Get Descriptor Request (DOWN), 2017-09-16 17:13:53.3772304 +0.0000014 (1. Device: Unknown)

Descriptor Type: Configuration

Descriptor Index: 0x0

Transfer Buffer Size: 0x9 bytes

000004: Get Descriptor Request (UP), 2017-09-16 17:13:53.3772309 +0.0000005. (1. Device: Unknown) Status: 0x00000000

Descriptor Type: Configuration

Descriptor Index: 0x0

Transfer Buffer Size: 0x9 bytes

 09 02 20 00 01 01 04 C0 32                        .. ....À2

000005: Get Descriptor Request (DOWN), 2017-09-16 17:13:53.3772320 +0.0000011 (1. Device: Unknown)

Descriptor Type: Configuration

Descriptor Index: 0x0

Transfer Buffer Size: 0x20 bytes

000006: Get Descriptor Request (UP), 2017-09-16 17:13:53.3772329 +0.0000009. (1. Device: Unknown) Status: 0x00000000

Descriptor Type: Configuration

Descriptor Index: 0x0

Transfer Buffer Size: 0x20 bytes

 09 02 20 00 01 01 04 C0 32 09 04 00 00 02 08 06   .. ....À2.......

 50 05 07 05 81 02 40 00 00 07 05 01 02 40 00 00   P...Â�.@......@..

000007: Get Descriptor Request (DOWN), 2017-09-16 17:13:53.3772340 +0.0000011 (1. Device: Unknown)

Descriptor Type: String

Descriptor Index: 0x0

Transfer Buffer Size: 0x2 bytes

LanguageId: 0x0

000008: Control Transfer (UP), 2017-09-16 17:13:53.3773592 +0.0001252. (1. Device: Unknown) Status: 0x00000000

Pipe Handle: Control Pipe

 04 03                                             ..

Setup Packet

000009: Get Descriptor Request (DOWN), 2017-09-16 17:13:53.3773675 +0.0000083 (1. Device: Unknown)

Descriptor Type: String

Descriptor Index: 0x0

Transfer Buffer Size: 0x4 bytes

LanguageId: 0x0

000010: Control Transfer (UP), 2017-09-16 17:13:53.3774836 +0.0001161. (1. Device: Unknown) Status: 0x00000000

Pipe Handle: Control Pipe

 04 03 09 04                                       ....

Setup Packet

000011: Get Descriptor Request (DOWN), 2017-09-16 17:13:53.3774930 +0.0000094 (1. Device: Unknown)

Descriptor Type: String

Descriptor Index: 0x3

Transfer Buffer Size: 0x2 bytes

LanguageId: 0x409

000012: Control Transfer (UP), 2017-09-16 17:13:53.3776063 +0.0001133. (1. Device: Unknown) Status: 0x00000000

Pipe Handle: Control Pipe

 1A 03                                             ..

Setup Packet

000013: Get Descriptor Request (DOWN), 2017-09-16 17:13:53.3776515 +0.0000452 (1. Device: Unknown)

Descriptor Type: String

Descriptor Index: 0x3

Transfer Buffer Size: 0x1a bytes

LanguageId: 0x409

000014: Control Transfer (UP), 2017-09-16 17:13:53.3777956 +0.0001441. (1. Device: Unknown) Status: 0x00000000

Pipe Handle: Control Pipe

 1A 03 30 00 30 00 30 00 30 00 30 00 30 00 30 00   ..0.0.0.0.0.0.0.

 30 00 30 00 30 00 31 00 41 00                     0.0.0.1.A.

Setup Packet

000015: Select Configuration (DOWN), 2017-09-16 17:13:53.3783508 +0.0005552 (1. Device: Unknown)

Configuration Index: 1

000016: Select Configuration (UP), 2017-09-16 17:13:53.3786279 +0.0000003. (1. Device: Unknown) Status: 0xc0002000

Configuration Index: 1

Configuration Handle: 0x0

000017: PnP Event: Device Disconnected (UP), 2017-09-16 17:13:53.3789437 +0.0003158 (1. Device: Unknown)

The USB device has just been removed from the system, all drivers unloaded.

//********************************************************************end LOG Data**********************************************************************************//

Thank you.,

Posted on September 18, 2017 at 17:22

Hi

karthikshivanna.94

,

As mentioned by

Turvey.Clive.002

, majority of users within ST community are people giving some of their free time to support other users working on ST products. You have also some ST employees (like me). But if you need direct contact with ST support teams (FAEs) for business purposes, you can submit a ticket through ST online support on st.com, at Support & Community / Support / Online support (

https://my.st.com/content/my_st_com/en/support/online-support.html

).

Back to your technical question, you still have not shared with us the device class ID and sub class ID send by the application running on the STM Looking at the tool mentioned by

Jaekel.Torsten

, you should find this in the USB properties

http://www.usblyzer.com/img/screenshots/usb-properties-panel-bg.png

.

Another option is to look at the source code of your application running on the STM32, and search for the USB_DeviceDescriptor (for example USBD_DeviceDesc variable as in

http://www.st.com/en/embedded-software/stm32cubef7.html

Projects\STM32756G_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c). What are the values of the various fields of this structure on your side ?

Best regards,

Cedric