Skip to main content
Visitor II
June 22, 2023
Question

STM32F103C8 bootloader unable to launch after power up...

  • June 22, 2023
  • 6 replies
  • 7228 views

Hi, Everyone,

I am having a strange problem with my board loaded STM32F103C8T6:

Case 1: With blank MCU, Bootloader via USART1 can only be activated ONCE after power up. (Boot0 pin was soldered to Vcc for testing.) It will never be able to enter BL again after disconnect until power cycled. Error message from programmer:

ming2_3-1687470678026.png

Case 2: If firmware is downloaded first (via SWD), BL will be able to launch with either power on or reset manually after power on. But some time still fail by manual reset. (about 50%) Here is the screen once it is lauched:

ming2_0-1687471596186.png

Any idea everyone??? I am in screwed.

 

 

 

    This topic has been closed for replies.

    6 replies

    ming2Author
    Visitor II
    June 22, 2023

    I am using USB to uart converter, connect PA9/10 for usart1. Just feeling something wrong of BL in this batch of MCU...

    Graduate II
    June 22, 2023

    Hi, I had problems with Bluepill (STM32F103C8T6) due to a resistor in the data line of the USB port being the wrong value, I don't know if this is your case.

    Ref.:

    http://amitesh-singh.github.io/stm32/2017/05/27/Overcoming-wrong-pullup-in-blue-pill.html

    ming2Author
    Visitor II
    June 23, 2023

    Tks for your reply! Mine USB-serial is working fine. I am using own designed board where UART1 of the MCU is direct to usb-serial converter. 

    The thing confuse me why it is matter of preload code or not. Once the code being wiped or it is a blank chip, BL will never work!

    Graduate II
    June 23, 2023

    Well the F1 is a very OLD design, it will boot into whatever memory you've selected via BOOT0 / BOOT1 pins, going to get nowhere if FLASH is selected and BLANK. MCU will just crash.

    Most reasonable designs provide for a means of getting BOOTx pins into a state which the ROM based System Loader runs, if you need that. Or you use SWD/JTAG, or you implement your own loader, and you don't erase that, just application code deeper into FLASH.

    The System Loader is a one-shot deal, it sees whatever noise is on the prescribed pins as being a connection attempt. So a modem or GPS/GNSS that squawks at startup will be seen as the boot source. If the connection fails, reset and try over.

    AN2606 should indicate the pins and methods a specific device might expect.

    For USB, have a crystal that starts properly / promptly, and use a button so the System Loader boots allowing for USB/DFU connectivity.

    Technical Moderator
    June 23, 2023

    Dear @ming2 ,

    STM32F103 ( Medium , Low and High density) are first STM32 from the F1 series put in production and are still running on high volume even now. Initially we do not provide a signature in the system memory to identify the Bootloader version that was added starting from STM32F1 Value line and then on all series.  I confirm that the product contain the bootloader thru UART protocol ( version 2.2).   I Have two options proposal for such issue :

    1) Try to reduce the Baudrate  for example 56K or less and see if the occurrence of connection increase or decrease .

    2) if the same issue is happening when using Cubeprogrammer thru SWD or JTAG ? 

    Hope it helps you. 

    STOne-32 

    ming2Author
    Visitor II
    June 23, 2023

    Thanks for your info!   1. I have tried different BR all the way down to 9600 without success. 2. SWD is always working fine. 

    One strange thing: if I hold boot0 high then power cyc it, BL works. If power has been on, just do reset while holding boot0 high, BL doesn't launch at all. 

    Technical Moderator
    June 23, 2023

    In that case, it may happen that reset pin is more resetting the device , if you can probe it and check external circuitry . As sampling the boot mode is only done after device reset .

    Technical Moderator
    June 23, 2023

    In that case, reset pin is suspected no more functional . You may need to probe it if it goes low for enough time to trig a reset .

    ming2Author
    Visitor II
    June 24, 2023

    I did probe the reset pin which was no issue found. I also solder a push button to it so I can control the length of reset as I need. On the board, there is a open drain reset chip which last 140ms after 3.3v established. I parallel a push button to it. The test was going ok but the result was unhappy: BL was not launch as it should.

    ming2Author
    Visitor II
    June 26, 2023

    Tried many boards, I can confirm now that this F103C8 mcu can only launch its BL by power cycling with boot0 high. It will not work by RESET after power up! Is it something to do with POR of the chip or something else? Need help to fix it.

    Graduate II
    June 27, 2023

    @ming2 wrote:

    Tried many boards, I can confirm now that this F103C8 mcu can only launch its BL by power cycling with boot0 high. It will not work by RESET after power up! Is it something to do with POR of the chip or something else? Need help to fix it.


    Hi, just to comment on something I noticed. In the first message appears the size of 128kB of Flash, the F103C8 model has only 64kB. I already bought BluePill with F103CB (letter B instead of number 8). The F103CB is 128kB of Flash. I believe that there is not much difference in functioning, but it might be interesting to check the specific documents, including Errata if there are any.

    F103CB.png

    https://www.st.com/en/microcontrollers-microprocessors/stm32f103cb.html

    https://www.st.com/en/microcontrollers-microprocessors/stm32f103c8.html

    ming2Author
    Visitor II
    June 27, 2023

    You are right! It supposes to be 64k for F103C8. So is it a counterfeit ? Can you tell by the pic:

    1687891826149.jpg

    Technical Moderator
    June 28, 2023

    That marking seems 99% not original and I never seen no proper finish with our laser marking. Or also device original but defective from F103CB part and then re-conditioned and soldered .   The only way to know is to return it to ST or thru your distribution channel .

    ming2Author
    Visitor II
    June 28, 2023

    Thanks for your info. I will ask JLC for details.

    However, just for compare, I bought few F103C8 from local Digikey (prg shows 64k indeed), and the BL behaves the same: No active on RESET but on power cycle.