STM35F103VCT6 blink LED issue

If you made your own board, post here, unless you built a Maple or Maple mini clone etc
Post Reply
HansaG
Posts: 1
Joined: Sun Jul 23, 2023 11:40 am

STM35F103VCT6 blink LED issue

Post by HansaG »

Hi there,

I'm a quite newbie for the stm32 platform. Rather this is my first attempt at it. So please excuse me.

I'm trying to repurpose a custom board which came for a 3D printer.
Image
schematics https://github.com/bigtreetech/BIGTREET ... %9B%BE.pdf
PCB https://github.com/bigtreetech/BIGTREET ... 9B%BE.docx

So far I was able to;
- Connect to the board via serial
- Use ST demonstrator to fully erase the chip
- Connect to the board via serial through Arduino and upload the blink sketch.
Image
Image

Issue;
- LED blinks a few seconds (5 sec) and stops either in an on or off state.
- LED do not blink continuously.

My guess; (which could be wrong and silly, so pls excuse me) since I did a full erase of the chip, the custom bootloader which was there with the board is erased and Arduino is loading the blink sketch to the bootloader space of the memory.

Kindly help me here and thank you.
ozcar
Posts: 143
Joined: Wed Apr 29, 2020 9:07 pm
Answers: 5

Re: STM35F103VCT6 blink LED issue

Post by ozcar »

I'm sort-of wondering if perhaps the original firmware made use of watchdog and this is still getting activated via the option bytes.

I'm not familiar with the "ST demonstrator" that you said you used so I don't know whether you could have "erased" the device without rewriting the option bytes.
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM35F103VCT6 blink LED issue

Post by ag123 »

some observations
https://github.com/bigtreetech/BIGTREET ... %9B%BE.pdf

- it seemed they did not patch the usb connection pin pa11 pa12 and instead used that for the TFT lcd
- the LCD is not documented, only the pins, it sounds like different lcds may be used
- it seemed the uart and jtag pins are accessible, so are the boot0, boot1 pins

in this case, for the STM32, it looks like the main ways to program it is via a ST-Link V2 dongle
https://www.adafruit.com/product/2548
https://www.st.com/en/development-tools/st-link-v2.html
or a
3.3v usb-uart dongle using the boot0 pins
https://www.sgbotic.com/index.php?dispa ... page_id=48

there is possibly a custom 'boot loader' installed, but that normally, if you program your sketch using ST-link (i.e. SWD) or usb-uart at 0x8000000 it should overwrite the bootloader.

note that doing this may overwrite the proprietary firmware shipped with the board. If you need that you'd need to check if you can obtain it if you want it back.
heretop
Posts: 39
Joined: Sun Jun 20, 2021 2:09 pm

Re: STM35F103VCT6 blink LED issue

Post by heretop »

I encountered the same problem when I first tried using an STM32 board. It seems your guess is spot on – erasing the chip probably removed the bootloader, and that's why the LED isn't blinking right. I fixed mine by putting a new bootloader on the board before I tried uploading the Blink program again. This made everything work smoothly.

On leds.to, I found a guide that walked me through how to fix the bootloader issue step by step. It was exactly what I needed and helped me get my project back on track.
Post Reply

Return to “Custom design boards”