commit 25415dbb763590676cd72a3d557cd61c3eb493a7 Author: sirlilpanda Date: Mon Dec 15 13:13:23 2025 +1300 init diff --git a/README.md b/README.md new file mode 100644 index 0000000..d1a66c4 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# how to program an stm32 + +## programming over USB + +### what youll need +- USB C +- computer with stm32CubeIDE or stm32cubeprogrammer + +1. plug stm32 data logger board in to the computer with a USB c cable +2. switch the boot mode switch to `prog` +3. press the reset button, you should hear a usb connect sound +4. open up STM32CubeProgrammer +5. within STM32CubeProgrammer select this drop down menu, and select usb + +![alt text](res/image.png) +![alt text](res/image-1.png) +![alt text](res/image-2.png) + +6. hit the refresh button on the port line, and something like USB1 will apper + +![alt text](res/image-3.png) +![alt text](res/image-4.png) + +7. after that click the connect, and you will be connected to the stm32 usb bootloader + +![alt text](res/image-5.png) +![alt text](res/image-8.png) + +8. now click the download button on the other side of the window, this will bring you to erasing and programming + +![alt text](res/image-6.png) +![alt text](res/image-7.png) + +9. next you will want to browse for the create `.elf` file that stm32cubeIDE spat out +10. then you hit program and then your new code will be uploaded +![alt text](res/image-9.png) + +11. switch boot mode back to flash +12. hit reset +13. profit? + + +## programming over swd + +### what youll need +- 6 pin plug-o-nails +- stlink +- computer with stm32CubeIDE or stm32cubeprogrammer + +1. plug in the stlink to the computer with the 6 pin plug-o-nails connects +2. plug in a usb c cable (this is only for power as swd techanlly shouldnt be sending power to the board) +3. boot up either STM32cubeIDE or programmer, if you boot up programmer you can follow the same steps as USB but with swd instead +4. if you used STM32CubeIDE, you should just be able to click the build and upload button and it will be done (i have only done this method once, i suggest looking at the stm32g4 documentaion for exact details) \ No newline at end of file diff --git a/res/image-1.png b/res/image-1.png new file mode 100644 index 0000000..64582fc Binary files /dev/null and b/res/image-1.png differ diff --git a/res/image-2.png b/res/image-2.png new file mode 100644 index 0000000..3fc3a9e Binary files /dev/null and b/res/image-2.png differ diff --git a/res/image-3.png b/res/image-3.png new file mode 100644 index 0000000..567af48 Binary files /dev/null and b/res/image-3.png differ diff --git a/res/image-4.png b/res/image-4.png new file mode 100644 index 0000000..15a226c Binary files /dev/null and b/res/image-4.png differ diff --git a/res/image-5.png b/res/image-5.png new file mode 100644 index 0000000..7bbdd66 Binary files /dev/null and b/res/image-5.png differ diff --git a/res/image-6.png b/res/image-6.png new file mode 100644 index 0000000..d72d455 Binary files /dev/null and b/res/image-6.png differ diff --git a/res/image-7.png b/res/image-7.png new file mode 100644 index 0000000..f790d85 Binary files /dev/null and b/res/image-7.png differ diff --git a/res/image-8.png b/res/image-8.png new file mode 100644 index 0000000..a75c134 Binary files /dev/null and b/res/image-8.png differ diff --git a/res/image-9.png b/res/image-9.png new file mode 100644 index 0000000..a3860d3 Binary files /dev/null and b/res/image-9.png differ diff --git a/res/image.png b/res/image.png new file mode 100644 index 0000000..8ac9a43 Binary files /dev/null and b/res/image.png differ