2021-12-17 03:52 AM
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
______________________________________________________________________
Problem:
Windows doesnt recognise the USB device.
________________________________________________________________
How did i got here:
I enabled the USB device mode in cubeMX
I enabled the middleware
I autogenerate the code....
Inside usb_cdc_if.c i add this code
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 )The usb handle struc doesnt show any errors after init
2021-12-17 03:54 AM
maybe i have clock issues?
2021-12-17 04:22 AM
setting my clock to HSE+PLL didnt work either
2021-12-17 04:35 AM
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
2021-12-17 06:24 AM
I found the issue: incompatiblityin the autogenerated CUBEMX code USB+BLE=no bueno
if 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
2021-12-17 06:31 AM
MX_APPE_Process() is accessing the "Sequencer" maybe thats the problem
The BLE stacked sequencer cannot work with the USB device?
2021-12-23 05:53 AM
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.
2021-12-23 11:25 PM
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.
2022-05-16 08:28 AM
Well, I was finding solution for my USB flash stick project and found this post.... AMAZING!!
2022-05-16 08:59 AM