cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 BluePill - USB SOFTWARE IDENTIFIER ISSUE and FEW QUESTIONS...

ALito
Associate

Dear friends.

I bought two $3 STM32 BluePill and one ST-LINK V2 Clone on AliExpress.

After reading and studying about the STM32 technology, I started to practice...

I installed on the PC those aplications:

 - STM32 ST-LINK Utility (To flash .HEX and .BIN files)

 - STM32CubeMX (To pregenerate projects and define I/Os clock & buses)

 - STM32CubeIDE 1.0.2 (To write and compile C programs for the STM32)

My objetive is running GRBL 1.1 on the STM32 because to get fast speeds for co2 laser engraving then the Arduino UNO.

The Arduino UNO port of GRBL 1.1 to BluePill has been done several times:

[url=https://github.com/usbcnc/grbl]https://github.com/usbcnc/grbl[/url]

[url=https://github.com/helimp/grbl_stm32]https://github.com/helimp/grbl_stm32[/url]

[url=https://github.com/djabi/grbl_stm32f103c8]https://github.com/djabi/grbl_stm32f103c8[/url]

This last one have a good wiki there explaining how to flash the .BIN to the bluepill:

[url=https://github.com/djabi/grbl_stm32f103c8/wiki/grbl-stm32f103c8]https://github.com/djabi/grbl_stm32f103c8/wiki/grbl-stm32f103c8

[/url]

So first I made a simple blinking led project with STM32CubeIDE, I had some debugging issues with the ST LINK V2 Clone but I could fix thanks to these informations there:

[url=https://www.eevblog.com/forum/beginners/unexpected-idcode-flashing-bluepill-clone/]https://www.eevblog.com/forum/beginners/unexpected-idcode-flashing-bluepill-clone/[/url]

After I tried to compile those GRBL STM32 firmwares with STM32CubeIDE and NO PROBLEM, it compiles, it loads BUT... NOT USB/Virutal serial port detected :(

I tried to download the HEX files but... same there... Windows error 43, USB not identificated...

I tired with the arduino USB bootloader, same...

I looked about the 10K resistor error, changed it for a 1.8K SMD, no FIX. I resolded the micro USB conector of the board, NO FIX :(

But, I found a strange firmware there:

[url=https://jeelabs.org/2017/09/enabling-usb-on-a-blue-pill/]https://jeelabs.org/2017/09/enabling-usb-on-a-blue-pill/[/url]

I download the BIN located in the part 3 of this page, pass the jumper form 1 to 0, push reset, connect the micro USB and here we go! The bluepill is DETECTED AS "STMicroelectronics Virtual COM Port"!!!

This firmware is the only .BIN I found that have the working USB.

So it isn't an HARDWARE Problem this is a firmware ISSUE...

Here goes a pic of the STM32 of my bluepill. I saw on the web there is a lot of boards with fakes STM... I'm not able to identify an original or a fake. (The pic is in attachement to have a good resolution and see well the engraved characters)

I have these informations about it:

20:32:39 : Device ID:0x410 

20:32:39 : Device flash Size : 64KBytes

20:32:39 : Device family :STM32F10xx Medium-density

Question 1 the MAIN QUESTION : I think there is something I'm making BAD or I forgot into my flashing configuration... and I don't have the experience and the sufficient knowledge to find the problem.

Question 2 : Can I flash like a PIC directly a .HEX or I have to flash fisrt a bootloader or an OS with a KERNEL that allow the USB mode and flash after the hex with the firmware I want?

Question 3 : I saw you can use a FTDI USB-Serial converter to flash the STM with another program called FLASH LOADER DEMONSTRATOR (I tried this to load the arduino USB bootloader and of course everthing OK but USB error 43 no indentifier) - Is flashing with this method is the same of flashing with STM32 ST-LINK Utility and the ST-LINK V2?

Hope you can help me and sorry I hesitate to put this topic into the "begineers category" but it's hard for me to judge...

Regards

2 REPLIES 2

Would expect if you jumper BOOT0 High, then plug in the USB, you should get an "STM32 IN DFU MODE" type device. You should be able to use Cube Programmer to push a .HEX or .BIN in directly.

https://www.st.com/en/development-tools/stm32cubeprog.html

It also has a USART mode so can replace the "FLASH LOADER DEMONSTRATOR", this uses a serial port to inject code, the code you're writing in via USB DFU, USART or ST-LINK is the same thing.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ALito
Associate

Tried to load this firmware:

https://github.com/djabi/grbl_stm32f103c8/releases

And it dosn't work, atfer I connect the USB to the PC and I get a windows 43 error...