cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407VGTx / CDC / Error Driver

CC_ROB
Associate II

Hello,

I test the CDC with my STM32F407VgTx in an up-to-date environment:

 Windows 10 / STM32CubeMx v5.20 / SW4STM32 / System WorkBench for STM32/ST-LINK V2

The VCP v 1.50 driver for windows 10 has been installed normally and declared active.

The source of the CDC program used is:

\ STM32Cube_FW_F4_V1.24.0 \ STM32Cube_FW_F4_V1.24.0 \ Middleware \ ST \ STM32_USB_Device_Library \ Class \ CDC

When running the program, when init the USB, I get Windows Error 43.

 Unknown USB Device (descriptor request failure).

Can you help me solve this problem?

In advance thank you

Robert

29 REPLIES 29

Hello Christian,

The retrogradation of the 6 files did not solve the problem.

My anomaly has causes different from those you hads

Thanks

Robert

CC_ROB
Associate II

VCP CLEANFLIGT

CDC OK

Pavel A.
Evangelist III

The picture you've posted 2 days ago shows a problem with USB clock. Have you resolved it? Does the board have external oscillator for HSE?

-- pa

CC_ROB
Associate II

Hello,

Sorry to have mixed HSE / HSI in the text 2 days ago.

My card has an external crystal of 26 Mhz / HSE

I'm doing my tests in this extern crystal config

I had been told that the CDC was working in 16 Mhz / HSI but when I saw that there were clock config problems I did not try.

That said if there was a solution to work with the USB without extern crystal outside I would be a taker.

Rob

CC_ROB
Associate II

Hello,

Addition LED2 control by PE0

Libs version 1.24.1

New ioc file attached.

Pavel A.
Evangelist III

>  if there was a solution to work with the USB without extern crystal outside I would be a taker.

Some MCUs with device-only controller (F072 for example) can derive the USB clock from host, using SOF.

They can work without external crystal. I don't know whether OTG can do this, even in device mode.

-- pa

Hello,

After having done, with the community that was interested in this problem, all the investigations that seemed interesting to us,

the problem I described is not solved .

My last investigations with DBG_Trace (present in the project) allowed me to see that the interrupts resulting from a request of the driver (OTG_FS_IRQHandler > HAL_PCD_IRQHandler (& hpcd_USB_OTG_FS) are active and processed but I could not delve deeper to locate the problem ...

The VCP driver for Windows10 does not receive (in 3ms I believe) correct information in descriptor (for him) and reports it in the program manager of Windows 10.

The same thing happens under Windows 7 professionnal.

It should be noted that this driver works without error with several other VCP applications found on the net that I tested on my DIYMORE card.

We can think that the problem lies in the libraries of version 1.24 / 1.24.1 or in the projet generated by CubeMX .

I am attaching my complete project.

Hoping to have a solution as soon as possible ....

At advance thanks.

Regards.

Robert

Harry McKee
Associate II

I think I'm having the same problem (but with an L4 and F7 board). I've got debug output on another thread: https://community.st.com/s/question/0D50X0000Ap1YIzSQM/do-the-virtual-com-port-drivers-work-with-windows-7

Please take a look and see if this is similar to your issue.

When I run it on a Windows 7 system, I get the USB error 10. Window Server 2012 systems shows USB error 43.

The issue I'm seeing has been fixed. It was an unaligned memory access in USB_WritePacket.

Hello,

Thank you for your information.

My error code is different from yours : 43 in Windows 7 and 10 .

I still modified USB_Write Packet (...) but the problem has not been solved.

CC_ROB
Associate II

Hello,

Same problem with last version (5.2.1) of STM32CubeMX.

Sorry.

Robert.