Having a problem with bootloader after uploading code

Bootloader for STM32F103 and STM32F4xx micro-controllers
No special driver is required. Support for Windows, Linux and Mac Operating System
Post Reply
soniccd123
Posts: 3
Joined: Mon Dec 30, 2019 6:09 pm

Having a problem with bootloader after uploading code

Post by soniccd123 »

Hello,

I am trying to use STM32duino core for some time now with the HID Bootloader and a STM32F103 bluepill. I can flash the bootloader with the stm32flash and a USB-Serial adapter thing and my PC recognizes the device. I set boot0 to 0 and it continues to recognize it normally. The problem is when i upload code through Arduino IDE. I select the HID bootloader as upload method, the upload occours normally, but when it finishes uploading and the Bluepill resets, windows stops to recognize the device and i cannot upload anything anymore. The strange thing is that the code works normally on the bluepill, its only like the bootloader became corrupted. The same happens with Maple bootloader 2.0. Someone has ever had this problem? Can someone help me?

Thanks

stevestrong
Posts: 35
Joined: Fri Dec 27, 2019 4:53 pm

Re: Having a problem with bootloader after uploading code

Post by stevestrong »

After you upload your code and restart the device, the bootloader is no longer active.
So if you have not activated USB serial in your uploaded code, then the PC cannot recognize anything, is normal.

soniccd123
Posts: 3
Joined: Mon Dec 30, 2019 6:09 pm

Re: Having a problem with bootloader after uploading code

Post by soniccd123 »

stevestrong wrote:
Tue Dec 31, 2019 9:50 am
After you upload your code and restart the device, the bootloader is no longer active.
So if you have not activated USB serial in your uploaded code, then the PC cannot recognize anything, is normal.
I'll give it a try, the thing is that i can't upload any new code after the first upload.

Thanks

User avatar
Vassilis
Posts: 4
Joined: Wed Dec 18, 2019 3:04 pm
Location: Thessaloniki, Greece
Contact:

Re: Having a problem with bootloader after uploading code

Post by Vassilis »

stevestrong is right. Please select these settings

hid_bl.PNG
hid_bl.PNG (14.93 KiB) Viewed 826 times
Vassilis Serasidis

fredbox
Posts: 25
Joined: Thu Dec 19, 2019 3:05 am

Re: Having a problem with bootloader after uploading code

Post by fredbox »

Set BOOT1 = 1 and press reset to see if the HID bootloader is still available.
From the hid-bootloader readme:

Code: Select all

Normally, both BOOT-0 and BOOT-1 must be connected to '0'. 
If you connect BOOT-1 pin to 3.3V (or '1' on BluePill boards), 
the board will stay in HID Bootloader mode.

soniccd123
Posts: 3
Joined: Mon Dec 30, 2019 6:09 pm

Re: Having a problem with bootloader after uploading code

Post by soniccd123 »

Vassilis wrote:
Tue Dec 31, 2019 6:04 pm
stevestrong is right. Please select these settings


hid_bl.PNG
Thanks! That just worked, it was the USB support CDC setting!

Thanks for everybody who tried to help too!

Post Reply

Return to “STM32 HID bootloader”