Menu

#167 Failed to init device using "-i '-dtr&rts,dtr:-dtr&-rts,dtr'" param

none
Invalid
nobody
None
Medium
Other
2024-06-17
2024-06-14
Zhifan Ye
No

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.

Discussion

  • Tormod Volden

    Tormod Volden - 2024-06-14

    What are DTR and RTS connected to?

     
    • Zhifan Ye

      Zhifan Ye - 2024-06-14

      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.

       
  • Tormod Volden

    Tormod Volden - 2024-06-14

    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/ttyUSB0

     
    • Anonymous

      Anonymous - 2024-06-17

      Thanks for your help. I have searched some materials and solved the problem.

       
  • Tormod Volden

    Tormod Volden - 2024-06-17
    • status: New --> Invalid
    • Type: Defect --> Other
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB