-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the instructions for flashing blackmagic on the Bluepill dev board #13
Comments
Thanks! Referenced in https://github.com/joric/bluetosis/wiki/Uploading#blackmagic |
Looks like that's not the case. I have the same 100K resistor on my revision bought here https://www.aliexpress.com/item/32583160323.html in august 2016 and it flashed via uart just fine (uart bought here https://www.aliexpress.com/item/32650897782.html in jun 2016. I also have a new STM32 bought here https://www.aliexpress.com/item/32478120209.html in september 2019 and it has the same resistor but the chip revisions sure look a bit different (laser etching instead of engraving), maybe it's the chip? I don't have time to check it though. |
The markings on mine match the one you bought in September 2019. Have you tried programming that one using the UART? Perhaps that revision of the STM32 just requires a higher voltage to detect a high signal on BOOT0. I found this post on the st.com forums where one person (at the bottom) had the same problem and fixed it the same way. |
I had the same problem with UART. I ended up using dfu programmer, it worked only on one unit since I couldn't override memory limitation |
@andrew-skybound nope haven't tried flashing the latter one yet. |
@andrew-skybound @Flumeded Also updated the article: https://github.com/joric/bluetosis/wiki/Uploading |
The Blue Pill ships with another incorrect resistor on R10: it's 10K, but it should be 1.5K. This resistor is a pull-up for USB support and the incorrect resistor value is the reason the USB on the board doesn't work correctly out of the box (there are dozens of articles about this and how to fix it). Anyhow this is a happy coincidence—since we don't need USB support on the Blue Pill (for programming an nRF5x at least) we can fix the UART by simply moving the 10K resistor from R10 to R3. So you don't need to buy anything else to fix it. (FYI if you do want USB support later, you can fix it without a 10K on R10). As for the firmware size limit: I built version 1.6.1 of blackmagic from source, it's a few hundred bytes under 57K and although it's a little old, it works just fine, no code modifications required. |
hello to @ALL , I confirm that replacing with a 20K resistor in R3 works as well. |
oh god, I wasted so much time and nerves on this.. and it was linked in the wiki in front of my face.. Thanks again for finding this out! |
The resistor on the Bluepill (the $1.39 Aliexpress one linked on the Uploading page) that connects BOOT0 to the MCU is wrong, and prevents the BOOT0 jumper from being set high. Without a working BOOT0 jumper, the board cannot be flashed using the UART adapter.
The Bluepill ships with a 100K resistor between BOOT0 and the MCU, but it must be changed to a 10K resistor in order for it to work. The voltage drop from the 100K resistor is too strong forcing the BOOT0 pin on the MCU to always be low. BOOT0 needs to be high in order to ever enter the factory-burned ROM bootloader.
Updating the Uploading instructions would help others who have this same problem. It will affect anyone who is trying to use the UART adapter to program their Bluepill.
For the curious, here's how I figured it out. The reference circuit on page 24 of STM application note AN2586 places a 10K resistor between BOOT0 and the MCU:
https://www.element14.com/community/servlet/JiveServlet/previewBody/33286-102-4-214601/STM-STM32-STM32F101CB-Learning%20Centre%20MCU-Application%20Notes-STMicroelectronics.Application_Notes_1.pdf
You can see in the schematic on this page that the Bluepill has a 100K resistor on BOOT0 (labelled R3):
https://os.mbed.com/users/hudakz/code/STM32F103C8T6_Hello/
Here is the problem resistor:
Here's my (ghetto) fix:
It's supposed to be a 0603 package resistor. I didn't have one, but I managed to fit a 0805 package resistor in the same spot. I replaced it with a hot air gun and a wad of flux.
After that, blackmagic.bin flashed as per the instructions on the Uploading page.
The text was updated successfully, but these errors were encountered: