Close

First STM32 repurposing update

A project log for Lazy CNC

Making CNC controllers in the laziest way possible.

SteveSteve 08/19/2019 at 23:240 Comments

Success, part 1. Was able to use an ST-Link debug probe and ST-Link utility to wipe the MCU on this board: 

SainSmart 5-Axis Mach3 USB Controller STB5100 https://www.amazon.com/gp/product/B07L3DYVJ1

This board appears to use an STM32F103 with the serial numbers filed off.

Used the leads shown in the main photo: https://www.amazon.com/gp/product/B07P5BSWFH

Used the ST-Link Utility to disable read protection(which wipes the chip) then wiped the chip and disabled flash protection, then installed DAPBoot https://github.com/devanlai/dapboot using the ST-Link and set the bootloader to use PB5 which is broken out on the HD15 connector. Pull it high and the bootloader runs, leave it low and it lets blinky LED run(after sending it to the board with dfu-util)

Only problem was I left the board connected to the debugger, which pulled NRST down when I unplugged it from USB power so the first couple attempts to flash the bootloader didn't seem to work(flashed fine then USB didn't enumerate) because the chip was held in reset.

Next to write a quick program to show the state of all GPIO pins so they can be probed. Will set them all to inputs then inject signals to each(the output pins by injecting to the buffer that drives them so I can see which output is which STM32 pin)

Discussions