cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC device not being recognised by windows. (STM32WB5M, Bluetooth low energy)

Javier1
Principal

Context:

I have succesfully implemented a CDC device in a stm32f205 board 6 months ago.

Now im trying to implement the exact same thing in my STM32WB5M discovery board.

BLE is already activated and working P2P custom server

  • Using CUBEMX 6.3.0
  • FW package STM32Cube_FW_WB_V1.13.0

0693W00000HozAeQAJ.png 

 ______________________________________________________________________

 Problem:

Windows doesnt recognise the USB device.

0693W00000Hoz9qQAB.png 

________________________________________________________________ 

How did i got here:

I enabled the USB device mode in cubeMX

0693W00000HozCVQAZ.png 

I enabled the middleware

0693W00000HozCkQAJ.png 

I autogenerate the code....

Inside usb_cdc_if.c i add this code

0693W00000HozFFQAZ.png0693W00000HozDxQAJ.png 

everything compiles and runs but windows doesnt recognice the USB device

Find attached my cubeMX file.

The Windows doesnt recognice error appears when the usb is enabled (i dont know if this means anything )0693W00000HozmJQAR.pngThe usb handle struc doesnt show any errors after init

0693W00000HoznHQAR.png

we dont need to firmware by ourselves, lets talk
13 REPLIES 13

I'm having the same symptom.

I am using a board where the USB hardware interface works fine when I run other firmware.

I started with the .ioc file from the P2PServer and used CubeMX to generate my own project. With the help of some code from the p2pserver project, the project works fine without USB enabled, and I was able to modify it to enable it to work with FUOTA. I used CubeMX to enable the USB full-speed device, set the heap size to 0x2000, changed the GPIO speed to very fast, changed app_conf.h to the following:

#define CFG_USB_INTERFACE_ENABLE    1

and still I get the same problem where computer I plug the USB into says there's a problem with the device. I have tried disabling low power mode with no success, and I also updated the clock configuration to better match my working USB example:

0693W00000WL8NcQAL.png 

@Khouloud OTHMAN​  @Remi QUINTIN​  Are there any known examples of USB working alongside USB? I just received the first small production run of a new product I'm making where I was counting on using the USB device along with BLE.

As i said 1yr ago:

My design allowed me to replace USB for UART communications.>I dont think im comming back to face this USB+BLE issue anytime soon.

And i very didnt, i still suspect the "Sequencer" used with the BLE API is the reason USB doesnt work.

Maybe they changed something since STM32Cube_FW_WB_V1.13.0 ? maybe not

Good luck @Adrian Adamson​ 

we dont need to firmware by ourselves, lets talk
ICMosquera
Associate III

Im still waiting for the developers to address this problem. I hope this get fixed soon.

KlemenPfce
Associate II

Hello, I had same problem with STM32WB5M module on our custom project and also gave up on fixing USB sequencer bug, due to limited time resources and just switched to USART1 and added an ftdi serial to usb converter.