Skip to main content
ZThat
Associate III
December 19, 2018
Solved

Why doesn't STMicroelectronics VCP driver work for USBC? (This device cannot start Code 10)

  • December 19, 2018
  • 3 replies
  • 1185 views

The driver has been successfully installed and used on my computer to communicate with the STM32F769NIH eval kit over a microUSB to USB2.0 cable at full speed (the STMicro chip being the device and the computer the host). I then took the STM CDC driver and used it for the STM32F765VI chip without making any changes to the driver (only switched out the startup code).  ​Connected the FS DP and FS DN lines to the corresponding USBC connection pins, and connected the CC pins to a USB C PD device. Upon connecting to a computer, the endpoint 0 control transfer seems to occur and the computer sees a comport and downloads the driver. However, the driver then fails to work and gives me the "This device cannot start (Code 10)" error code. Is this a difference in endpoint addresses between the chips, or does this have to do with the USBC connection? (I have seen that the endpoint address for the F769 chip are 0x81, 0x01, and 0x82. If anyone with a CDC driver for a F765 could confirm these are the same, that would be very helpful). Does the driver need to be modified because this connection has CC pins rather than the USB OTG ID pin? All suggestions welcome.

This topic has been closed for replies.
Best answer by Imen.D

Hello @ZThat​ ,

I invite you to follow this FAQ related to the problem "USB device not recognized": https://community.st.com/s/article/FAQ-USB-device-not-recognized

Hope this helps you.

Kind Regards,

Imen

3 replies

Imen.DBest answer
ST Technical Moderator
December 19, 2018

Hello @ZThat​ ,

I invite you to follow this FAQ related to the problem "USB device not recognized": https://community.st.com/s/article/FAQ-USB-device-not-recognized

Hope this helps you.

Kind Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
ZThat
ZThatAuthor
Associate III
December 20, 2018

​Imen,

 Thank you! That was very helpful. I am one large step farther along. Unfortunately I am running into another issue now.

I am attempting to communicate over my newly use-able VCP, but it is not working. Communicating worked on the EVAL board with the microUSB connector, but now is not working on the STM32F765 with the USBC connector.

By debugging I have determined that the interrupt does not fire when I send messages to the board (by interrupt I mean (HAL_PCD_IRQHandler(&hpcd);). I have also determined that the pdev->pClassData is not populated when I attempt to transmit data from the board.  Does this have something to do with the OTG functionality and no longer having an ID pin?

I have also seen that the hcdc->TxBuffer fills with the correct data when I set the Txbuffer. But the pdev->pClassData remains as size 1 array with nothing inside. And the value of pClassData is 0x000000.

Thanks!

ZThat
ZThatAuthor
Associate III
December 19, 2018

​Imen,

Thank you! That was very helpful. I am one large step farther along. Unfortunately I am running into another issue now. I have terraterm open and I am attempting to communicate, which also used to work on the eval board. I have messages that automatically send to terraterm from the board and I am attempting to send the board messages via typing. Nether sending or receiving messages is working.

By debugging I have determined that the interrupt does not fire when I send messages to the board (by interrupt I mean (HAL_PCD_IRQHandler(&hpcd);). I have also determined that the pdev->pClassData is not populated when I attempt to transmit data from the board. The USBD Does this have something to do with the OTG functionality?

I have also seen that the hcdc->TxBuffer fills with the correct data when I set the Txbuffer. But the pdev->pClassData remains as size 1 array with nothing inside. And the value of pClassData is 0x000000.

Thanks!