0
\$\begingroup\$

I puchased some STM32F103C8T6 from AliExpress which I soldered to my homemade PCB via a reflow oven. But, the problem is my program uploaded, but it did not run.

To confirm that it's not the pcbs, I removed some STM32F103C8T6 from readymade boards which I'm no longer using, and mounted them on my custom PCBs. The code uploaded and ran successfully. I tried different programs and they worked well.

But all the chips from AliExpress wont run after uploading different codes. STMCUBEPROG detected the chips, I did a full chip erase, programmed the ICs again but the code still did not execute.

I'm programming with Arduino IDE via USB-serial converter (A9,A10). I have contacted the seller from AliExpress but he said the chips are original and that I should look for the fault elsewhere.

Someone mentioned bootloader problem. That the chip may not come preloaded with bootloader which is responsible for program execution.

Pin 44 - boot0 was pulled high during programming them pulled to ground via a resistor after programming.

Please advise on what I'm doing wrong or let me know if I have bought 50 pcs of fake STM32F103C8T6.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ We have no idea what your schematics look like. We also don't know what bootloader you speak of. If Arduino IDE requires some custom hardware and custom bootloader to be present on the chip, likely the chips don't have a Arduino bootloader uploaded. The chips however do come with uneraseable factory bootloader which can be used to upload anything you want and that bootloader is accessed via BOOT0 pin. If CubeProg detected the factory bootloader, it likely works OK. If this is about how to make them compatible with Arduino, there is an Arduino.SE. \$\endgroup\$
    – Justme
    Commented Nov 29, 2023 at 20:48
  • \$\begingroup\$ @Justme thank you for the contribution, I will post the question at arduino stack exchange. \$\endgroup\$
    – bquark
    Commented Nov 30, 2023 at 3:14

1 Answer 1

0
\$\begingroup\$

Your MCUs come empty and they only have a factory bootloader.

If you want to upload Arduino code with Arduino IDE, you must first program the MCUs with a custom bootloader called the "Arduino Core". This is done using the factory bootloader by setting BOOT0 high, programming the "Arduino Core" and setting BOOT0 low again and rebooting the MCU.

After that, your MCUs should be programmable with normal Arduino programs using the Arduino IDE, like your othe chips.

The point might be to select a correct version of the "Arduino Core" bootloader you want to use. There is plenty of options.

If the other MCUs worked, your hardware might be OK and you simply selected wrong bootloader, but we can't be sure.

You can try reading the bootloader off a working MCU and clone it to your empty MCUs.

\$\endgroup\$
2
  • \$\begingroup\$ @ justme thank you for this information, you see I had previously flashed the mcu with "generic_boot20_pc13.bin" from stm32duino-bootloader using stmcubeprog. But still the arduino code did not run after programming. Probably it's the wrong approach. I will try and get the Arduino Core as you suggested. Also how can I clone an existing bootloader from a working MCU? Is there a way to do it with STMCUBEPROG ? Thanks for the assistance. \$\endgroup\$
    – bquark
    Commented Nov 30, 2023 at 8:07
  • \$\begingroup\$ @bquark If the MCU is not read-protected then just read it with cubeprog and write to another MCU. \$\endgroup\$
    – Justme
    Commented Nov 30, 2023 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.