Dremel 3D40 3D Printer and STM32DUINO

Post Reply
kevinallein
Posts: 2
Joined: Sun Jan 08, 2023 5:56 pm

Dremel 3D40 3D Printer and STM32DUINO

Post by kevinallein »

Hi all,
I have a Dremel 3D40 3D Printer, which uses a STM32F103RCT6. I want to install Klipper on that board and wanted to use the STM32DUINO bootloader, as this is one of the recommended boot loaders for Klipper.
I had to rewire the USB pins to the USB connector and used 22 Ohm series Resistors for USBDP and USBDM and a 1.5 KOhm resistor between USBDP and 3.3 V. Unfortunately I currently have no LEDs connected (those were unfortunately connected to the USB pins).
I also checked, that pin PC12 sees "0V" and is not seen as a user button pressed. Therefore I selected "generic_boot20_pc13.bin", although I cannot really see the LED.
I used a Lauterbach debugger to flash the boot loader via SWD.
When I now connect the USB to my PC, the device Manager shows:
libusb_win32 devices
Maple DFU

It does not show up as a serial port. This would be required to continue with the Klipper installation. What am I doing wrong ?

Thanks
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 27
Location: Prudnik, Poland

Re: Dremel 3D40 3D Printer and STM32DUINO

Post by GonzoG »

HID bootloaders do not use COM port.
kevinallein
Posts: 2
Joined: Sun Jan 08, 2023 5:56 pm

Re: Dremel 3D40 3D Printer and STM32DUINO

Post by kevinallein »

But that STM32DUINO bootloader seems to have two modes, one for COM and one for HUD - correct. After some further tries and managed to compile it myself and start debugging. It now reports a COM port again, but when it does the check, whether the PC (or Raspberry for Klipper) wants to do an update, it never takes that branch. What does the host have to do to start that process ?
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Dremel 3D40 3D Printer and STM32DUINO

Post by ag123 »

'roger's' bootloader originates from the original leaflabs maple mini, adapted to work on the 'blue pill' stm32f103c8 boards.
those boards has led on pc13. and that boot loader mainly provide a usb DFU firmware upload.

If you'd go the distance, you could compile the boot loader from source codes, and you can use a different led, and you have your custom version of the same boot loader. Note that most of us have not (yet) done that, so we'd not know what challenges are there.
Note that you'd need to compile your sketch offset away from the bootloader e.g. 0x8002000, for that you would need to look at the ld script of existing libmaple variants.

On another note, stm32f103 can update firm ware from uart1 by setting boot0. Alternately, you can use a SWD dongle e.g. st-link v2 or v3.
With that, you won't need a custom boot loader.
Post Reply

Return to “STM32F1 based boards”