cancel
Showing results for 
Search instead for 
Did you mean: 

I have a STM32L152RE Nucleo-64. I would like to send data through the USB port, but I always get the following error: USB Device not recognized.

FLomb.1
Associate II

I have been trying to solve this problem for more than two weeks. I have two Nucleo-64 cards and get the same error.

I have configured everything using the STM32CUBEMX, I have configured the clock, following several tutorials, but it is impossible for me to create a virtual port com on the PC.

I have changed the JP5 jumper and have powered the card externally (without USB) via the E5V pin, in this case, I have been able to create a virtual com port (this works randomly), but when I try to access via Putty, I get the following error "Unable to open connection to COM9. Unable to configure serial port". I have a card with a STM32L151CBU6 and it works fine (I have used it to test the cables and connections). Honestly, I'm a bit lost, I would really appreciate the community, if someone could help me.

Thank you.

BR, Federico.-

6 REPLIES 6
Imen.D
ST Employee

Hello @FLomb.1​ and welcome to the Community :)

Make sure that you follow this article USB device not recognized, with the solution is to either increase the heap size, or configure the USB library to use static allocation.

 Please keep me informed if you still need help.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Imen.D
ST Employee

Hi @FLomb.1​ ,

Do you have still this problem to solve?

Did you tried to follow the article? Does it work?

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello Imen,

Thank you for your help.

I was testing this morning. I have added 1000, 1024 and 2048. But the problem has not been solved. = (

I am using VisualGDB with Visual Studio 2017. Could this be the problem? What do you think?

Here the values have been changed:

File: usbd_cdc_if.h

/* It's up to user to redefine and/or remove those define */

#define APP_RX_DATA_SIZE 1000

#define APP_TX_DATA_SIZE 1000

I will continue looking for a solution. But I no longer know where to find.

I hope you can help me. I need to move forward with the project. =/

Thank you!

BR, Federico.-

Imen.D
ST Employee

Hi @FLomb.1​ ,

Do you have still this problem to solve?

Did you tried to upgrade your firmware?

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello Imen,

Thank you for your reply.

Unfortunately it does not work. =(

I have been able to create the COM12 port (increasing the Minimum heap size value to 1000), but it is impossible for me to open it or send data via PuTty.

I have tried different USB ports on the PC, but the problem is the same. =/

If you have any other suggestions, it would be very helpful.

Thank you for your help.

BR, Federico.-

Imen.D
ST Employee

Hi @FLomb.1​ ,

Please try the proposal in this discussion.

Then, please keep me informed about your update.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen