Failed to init device using "-i '-dtr&rts,dtr:-dtr&-rts,dtr'" param
Open source flash program for STM32 using the ST serial bootloader
Brought to you by:
tormod
I am using this command to check STM32 status when booting to bootloader mode followed by user mode:
sudo stm32flash -b 115200 -i '-dtr&rts,dtr:-dtr&-rts,dtr' /dev/ttyUSB0
The error message is:
stm32flash 0.7
http://stm32flash.sourceforge.net/
Interface serial_posix: 115200 8E1
GPIO sequence start
setting port signal dtr to 0... OK
setting port signal rts to 1... OK
delay 100000 us
setting port signal dtr to 1... OK
GPIO sequence end
Failed to init device after retry.
GPIO sequence start
setting port signal dtr to 0... OK
setting port signal rts to 0... OK
delay 100000 us
setting port signal dtr to 1... OK
GPIO sequence end
The BOOT0 pin is connected with GND. So how to solve this problem. Any needed information will be enclosed.
Anonymous
What are DTR and RTS connected to?
Thanks for your reply. I didn't find DTR and RTS pins on the board, but in a blog I found that DTR controls "Reset" and RTS controls "BOOT0". I wonder if I understand them correctly.
No, I don't think you understand this at all :) These are serial port control lines, for instance on a USB-serial adapter you may find DTR and RTS in addition to the mandatory TX and RX lines. In this context they can be used like GPIOs on the host. For controlling the STM32 boot mode from the host, these lines (or GPIOs) can be hooked up to Reset and BOOT0 on the STM32.
If you are setting BOOT0 (and BOOT1) manually, and also reset the STM32 manually, you don't need to think about any "init sequence". Just run
stm32flash -b 115200 /dev/ttyUSB0Thanks for your help. I have searched some materials and solved the problem.