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
14 REPLIES 14
Javier1
Principal

maybe i have clock issues?

0693W00000HozBTQAZ.png

we dont need to firmware by ourselves, lets talk

setting my clock to HSE+PLL didnt work either

0693W00000HozVTQAZ.png

we dont need to firmware by ourselves, lets talk
Javier1
Principal

I increased Minimum Heap size to 0x2000 didnt work either.

As sugested by @Radek RIPA​ https://community.st.com/s/question/0D50X00009XkeGNSAZ/stm32-usb-cdc-device-descriptor-request-failed

we dont need to firmware by ourselves, lets talk
Javier1
Principal

I found the issue: incompatiblityin the autogenerated CUBEMX code USB+BLE=no bueno

0693W00000Hp0cAQAR.pngif i comment out MX_APPE_Init() my usb CDC device is regoniced.

It turns out the BLE thing MX_APPE_Process() corrupts the USB CDC device.

If MX_APPE_Process() gets commented out, CDC device works as expected

TODO:

i need to figure out why USB and BLE are not happy working together......and fix it

we dont need to firmware by ourselves, lets talk

0693W00000Hp0htQAB.pngMX_APPE_Process() is accessing the "Sequencer" maybe thats the problem

The BLE stacked sequencer cannot work with the USB device?

we dont need to firmware by ourselves, lets talk

Hi @Javier Muñoz​ ,

At this level, I suggest to involve our experts for STM32CubeMX @Khouloud OTHMAN​  & STM32WB @Remi QUINTIN​  to help you invistigating the issue.

Don't hesitate to share your findings meanwhile.

Thanks.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks @Amel NASRI​ , i would normally fight this untill i find the problem but my resources are limited.

My design allowed me to replace USB for UART communications.

I dont think im comming back to face this USB+BLE issue anytime soon.

we dont need to firmware by ourselves, lets talk
jsoda.1
Associate III

Well, I was finding solution for my USB flash stick project and found this post.... AMAZING!!

0693W00000Nq2avQAB.gif

we dont need to firmware by ourselves, lets talk