====== Graw DFM-17 Radiosonde ====== ===== UART Bootloader & Programming ===== ==== Prerequisites ==== - Custom USB Mini-B Cable - [[https://www.st.com/en/development-tools/stm32cubeprog.html|STM32CubeProgrammer]] === Custom USB Mini-B Cable === ^ USB Mini-B ^ Color Code (USB) ^ Signal ^ | +5V | Red | +5V | | USBD- | White | TXD | | USBD+ | Green | RXD | | GND | Black | GND | ==== Steps ==== - Prepare the custom cable (refer to section below) - Connect the custom cable to a USB-TTL serial UART adapter (do not power the adapter up yet) - Short these 2 pins (I used a pair of tweezers), this sets BOOT0 pin high\\ {{:projects:amateur_radio:radiosondes:dfm-17_boot0.png?200}} - Connect the USB-TTL serial UART adapter to your computer - Launch STM32CubeProgrammer - Select UART connection and the correct serial port for your USB-TTL adapter\\ {{:projects:amateur_radio:radiosondes:stm32cubeprogrammer_uart.png?200}} - If this is your first time programming the DFM-17, Read Unprotect (MCU) must also be checked (:!: factory firmware will be erased :!:)\\ {{:projects:amateur_radio:radiosondes:stm32cubeprogrammer_unprotect.png?200}} - Click Connect - If connection succeeds, you can disconnect the shorted BOOT0 pins - You can now program the DFM-17 as you like (Read Unprotect (MCU) does not need to be checked for future re-connection attempts) {{:projects:amateur_radio:radiosondes:img_3063.png?400}} ===== SWD Programming ===== :!: Requires soldering to PCB Refer to [[https://wiki.recessim.com/view/DFM-17_Radiosonde#SWD_Header|DFM-17 Radiosonde - SWD Header]] ===== Others ===== ==== Useful CLI Commands ==== * Initial unlock (disable Readout Protection) * STM32CubeProg: ''%%STM32_Programmer_CLI -c port=YOUR_COM_PORT_OR_TTY br=115200 -rdu%%'' * [[https://sourceforge.net/p/stm32flash/wiki/Home/|stm32flash]]: ''%%stm32flash -k YOUR_COM_PORT_OR_TTY%%'' * [[https://openocd.org/|OpenOCD]]: ''%%openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c "init" -c "reset init" -c "stm32f1x unlock 0" -c "reset halt" -c "exit"%%''