cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8T6 Bluepill giving Windows "Device Descriptor Request Failed"

JLHK01
Associate II

Hi all,

Total newbie here.

I am seeing this error in Windows 11 Device Manager: "Device Descriptor Request Failed", when I plug the Bluepill to a PC using Bluepill's onboard micro-USB Port

Windows Error.jpg

Although the Bluepill looks like it is running OK with the previously flashed program (Blink PC13) with power supplied via the Bluepill's onboard micro-USB, Windows is giving this error.

 

Being a "perferctionist", I would like to see the Windows error eliminated.

I have check few "solutions" on youtube and none of them seems to apply to STM32, and thus not working.

 

Can any kindly soul please help.

 

Sorry if this has been asked before, but being a newbie to this site, I can't find anything suitable.

1 ACCEPTED SOLUTION

Accepted Solutions

How do you know his blue pill has a fake chip soldered? There are lot of BP boards with chips from other manufacturer. Moreover this error also happens with a original chip. Thats because ST simply forgot to integrate a switchable 1k5 connect resistor. So the BP adds a 1K5 resistor from PA12 to V3.3.

The downside of this is the host sees a new connected USB device and tries to enumerate it. This of course fails when no usb firmware is loaded. 

There are 2 possible solutions:

1. use a usb cable with VBUS and GND only so there are no D+ and D- connection. (Charge only cable) to power the BluePill board.

2. set PA12 to output and PA12 to low so the host cant see the 1k5 resistor

    // Pin PA12 as Open Drain Output 
    GPIOA->CRH &= ~(0b1111 << 16);
    GPIOA->CRH |=  (0b0110 << 16);
// set PA12 low
GPIOA->ODR &= ~(1 << 12);

 dont forget to set PA12 back to floading input before you want to use USB.

   GPIOA->CRH &= ~(0b1111 << 16);

thats all

View solution in original post

19 REPLIES 19
Peter BENSCH
ST Employee

Welcome @JLHK01, to the community!

If you use the search function of the community and search for ‘blue pill’, you will find a lot of similar questions. You will also very often find answers such as: ‘blue pill is not a product of STMicroelectronics and has only been using counterfeit STM32F103 for years’. This means that you should ask the manufacturer of the blue pill or the counterfeit, not the manufacturer of the original STM32F103.

You can also convert the Blue Pill: simply unsolder the counterfeit and fit an original STM32F103C8T6 - you are immediately compatible and you will be gladly helped here.

Good luck!
/Peter

In order 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.

@JLHK01 You could also get a Nucleo board, and be sure that you have a genuine & supported board & chip - plus you get a free genuine ST-Link thrown in!

JLHK01
Associate II

Thanks Peter and Andrew for your reply.

As a total newbie, I didn't know that bluepill is not a ST product. I thought it is a nickname of a developemnt board by ST.

My apologies and sorry for the disturbace.

Anyway, thanks for your advices.

How do you know his blue pill has a fake chip soldered? There are lot of BP boards with chips from other manufacturer. Moreover this error also happens with a original chip. Thats because ST simply forgot to integrate a switchable 1k5 connect resistor. So the BP adds a 1K5 resistor from PA12 to V3.3.

The downside of this is the host sees a new connected USB device and tries to enumerate it. This of course fails when no usb firmware is loaded. 

There are 2 possible solutions:

1. use a usb cable with VBUS and GND only so there are no D+ and D- connection. (Charge only cable) to power the BluePill board.

2. set PA12 to output and PA12 to low so the host cant see the 1k5 resistor

    // Pin PA12 as Open Drain Output 
    GPIOA->CRH &= ~(0b1111 << 16);
    GPIOA->CRH |=  (0b0110 << 16);
// set PA12 low
GPIOA->ODR &= ~(1 << 12);

 dont forget to set PA12 back to floading input before you want to use USB.

   GPIOA->CRH &= ~(0b1111 << 16);

thats all

Peter,

According to STM32 Bluepill parte 5: Identificar clon de bluepill y el original - YouTube, My STM32F103C8T6 looks like a genuine one. Am I able to get support with my post in this forum ?20241031_010805.jpg

Andrew,

The only NUCLEO candidate I can find is the NUCLEO-F103RB.

But I don't need a 64 pin MCU and I don't need 128K Flash.

Afterall, the board is too big / expensive for my final "deployment" after project,

Thomas,

Thanks for your reply.

Is that Python script ?

Are you implying that I have to load the MicroPython interpreter onto the bluepill using e.g. https://github.com/lupyuen/bluepill-micropython ?

But I can't see the right choice under ports/stm32/boards ?

As I am not familiar with building the python interpreter, is there a bin/elf file I can download and then flash onto the bluepill so that I can use your script ?


@JLHK01 wrote:

But I don't need a 64 pin MCU and I don't need 128K Flash.


That's not the point.

The point is that the Nucleo is a known-good and supported platform

So you use a known-good and supported platform to develop your code.

You can then port to a smaller chip/board, if required.

thats a C code snippet i always use at the start of main to disable the connect resitor. I dont speak Python so i cant help you on that. I am using GCC. 

BTW: I was wrong with the value and the connection of that resistor. It is 4k7 between PA12 and Vusb. But I know of Blue Pill boards with various values of that resistor.