Hi, I have creality 3d printer board V4.2.2 and I want to use it as arduino. Board has STM32F103RET6 and built it Ch340G on PA9 and PA10 pins. When I am trying to burn bootloader with STM32CubeProgramer I get error ".. please verify boot mode configuration" Maybe somebody can help me ?
This is link to V4.2.2 Scematic: https://klipper.discourse.group/uploads ... FPNi87.pdf
Help with STM32F103
Re: Help with STM32F103
for this board get a st-link v2 to program it
https://www.adafruit.com/product/2548
https://www.st.com/en/development-tools/st-link-v2.html
the SWD (ICSP port) is shown in the schematic
you would need to connect to those pins with st-link v2
On the schematic:
there is something else unusual about your board, pin 60 boot0 is apparently pulled up to 3.3v. This is unusual and not normal.
if it is indeed the case, there has to be a jumper or some sort to pull BOOT0 to GND instead.
Otherwise, in this mode, you should be able to program it over the on board ch340.
But that if you cannot put BOOT0 to GND after programming, then it'd "forever" remain in program mode.
BOOT0 should be GND - 0v in normal use.
and you set BOOT0 pull up to 3.3v if you want to program it over uart1 (PA9, PA10) - connected to the ch340
https://www.adafruit.com/product/2548
https://www.st.com/en/development-tools/st-link-v2.html
the SWD (ICSP port) is shown in the schematic
you would need to connect to those pins with st-link v2
On the schematic:
there is something else unusual about your board, pin 60 boot0 is apparently pulled up to 3.3v. This is unusual and not normal.
if it is indeed the case, there has to be a jumper or some sort to pull BOOT0 to GND instead.
Otherwise, in this mode, you should be able to program it over the on board ch340.
But that if you cannot put BOOT0 to GND after programming, then it'd "forever" remain in program mode.
BOOT0 should be GND - 0v in normal use.
and you set BOOT0 pull up to 3.3v if you want to program it over uart1 (PA9, PA10) - connected to the ch340
Re: Help with STM32F103
You don't need to flash bootloader for this board. There is no native USB on this board (USB pins are used for IIC EEPROM)
You have USB<->TTL on board (CH340) and you can use built-in serial bootloader. You just need proper BOOT0 and BOOT1 pin setup to enter serial bootloader.
You have USB<->TTL on board (CH340) and you can use built-in serial bootloader. You just need proper BOOT0 and BOOT1 pin setup to enter serial bootloader.
-
- Posts: 1
- Joined: Thu May 23, 2024 12:01 am
Re: Help with STM32F103
Does anyone have any more information on the V4.2.2 board's bootloader and how to burn an Arduino like bootloader such as the stm32duino? I am looking to use the V4.2.2 board as a "general purpose stepper motor control board" with my own firmware, and therefore I would like to develop with it like an Arduino. Out of spite for having to buy a separate programmer (yes I know the ST-LINK V2s are cheap) does anyone know if the bootloader can be burned with a raspberry pi, (it seems like this is possible based on this and if so how I would go about doing that for this board specifically? I also see how the boot pin is configured on the board and am confused as to how the bootloader actually functions the way it does and is able to reprogram when detecting new firmware on the SD, so and guidance on how to make the board compatible with an Arduino like bootloader would be really helpful.
Re: Help with STM32F103
stm32f103 can be programmed either by:
- st-link (SWD)
- uart boot mode (need to set boot0)
what is strange on the original schematic is that boot0 is pulled up to 3v3 i.e. it is set.
which means that the chip will always be in programming mode on reset.
I think there'd be a jumper to pull that boot0 pin to gnd, otherwise the board can never be used normally.
in that uart boot mode, i.e. boot0 set you can program a sketch.bin on stm32f103 using uart pins say using a usb-uart dongle at pins PA9 (tx), PA10 (rx) serial 1 pins.
you can install (e.g. 'roger's boot loader') in that same way, but that after that you need to use an .ld script file that compile your sketch / firmware to install at 0x8003000. The normal start of flash is 0x8000000, this is the normal way if you program via st-link, or a usb-uart dongle at uart1 (PA9, PA10)
- st-link (SWD)
- uart boot mode (need to set boot0)
what is strange on the original schematic is that boot0 is pulled up to 3v3 i.e. it is set.
which means that the chip will always be in programming mode on reset.
I think there'd be a jumper to pull that boot0 pin to gnd, otherwise the board can never be used normally.
in that uart boot mode, i.e. boot0 set you can program a sketch.bin on stm32f103 using uart pins say using a usb-uart dongle at pins PA9 (tx), PA10 (rx) serial 1 pins.
you can install (e.g. 'roger's boot loader') in that same way, but that after that you need to use an .ld script file that compile your sketch / firmware to install at 0x8003000. The normal start of flash is 0x8000000, this is the normal way if you program via st-link, or a usb-uart dongle at uart1 (PA9, PA10)
-
- Posts: 1
- Joined: Thu Jan 23, 2025 4:00 am
Re: Help with STM32F103
Hello:
I was doing a search and I found your post. I am currently trying to use a Creality 4.2.2 motherboard as an automotive pwm radiator fan controller.
Just started a few months ago, and so far I was able to program the Heater port as the pwm signal to fan, Heatbed port for the non-pwm fan control, Fan port as an indicator to show status.
I would suggest you purchase a Nucleo stm32 development board from Ebay, nothing expensive. It's got a build in Stlink on the development board so you can use it to program the Creality board. You will need to power the Creality board when you program it. I've just use a 12 Volt power supply. Connected 4 jumper cables from Stlink to Creality board. You will need to solder 2 pins to Creality board to setup a jumper to start the programming.
Do a search "How to Reuse Creality 32bit 4.2.2 Mainboard" that's how I got the info. I did not used their method to program the Creality board. I've used STM32Cube IDE. It's a work in progress but it is moving along.
Wish you luck and hopefully my info helps you.
I was doing a search and I found your post. I am currently trying to use a Creality 4.2.2 motherboard as an automotive pwm radiator fan controller.
Just started a few months ago, and so far I was able to program the Heater port as the pwm signal to fan, Heatbed port for the non-pwm fan control, Fan port as an indicator to show status.
I would suggest you purchase a Nucleo stm32 development board from Ebay, nothing expensive. It's got a build in Stlink on the development board so you can use it to program the Creality board. You will need to power the Creality board when you program it. I've just use a 12 Volt power supply. Connected 4 jumper cables from Stlink to Creality board. You will need to solder 2 pins to Creality board to setup a jumper to start the programming.
Do a search "How to Reuse Creality 32bit 4.2.2 Mainboard" that's how I got the info. I did not used their method to program the Creality board. I've used STM32Cube IDE. It's a work in progress but it is moving along.
Wish you luck and hopefully my info helps you.