2024-10-30 03:15 AM - last edited on 2024-10-30 03:27 AM by Andrew Neil
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
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.
Solved! Go to Solution.
2024-10-30 09:48 AM
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
2024-10-30 05:08 AM - edited 2024-10-30 05:09 AM
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
2024-10-30 05:35 AM
@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!
2024-10-30 06:56 AM
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.
2024-10-30 09:48 AM
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
2024-10-30 10:38 PM - edited 2024-10-30 11:00 PM
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 ?
2024-10-30 10:46 PM
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,
2024-10-30 10:56 PM
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 ?
2024-10-31 01:31 AM
@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.
2024-10-31 04:10 AM
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.