2023-11-09 04:16 PM
I enabled usb cdc by stm32cubemx in an empty project. I connected dp, dm, gnd and (to ground). I tried a 1.5k pull up resistor on dp pin. But still I get “usb not recognized”. I am using stm32l152re-nucleo board.
I have set up usb cdc on other stm boards in the past and didn’t have this issue. I couldn’t find any solution or any information on how this board is different or if I’m doing something incorrectly.
2023-11-17 07:07 AM
Hello @Femah and welcome to the Community :),
I advise you to follow this FAQ: USB device not recognized, with the solution is to either increase the heap size, or configure the USB library to use static allocation.
The USB library configuration requires enough space to allocate the structure related to the implemented USB class (e.g. USBD_CDC_HandleTypeDef in case of CDC class implementation). A value of 0x1000 heap size should be enough for most cases.
I hope this help you to solve the issue.
Kaouthar
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.
2023-11-17 06:12 PM
thanks for your reply.
I tried this but didn't help.