Menu

#52 Allow special STM32 DFU operations without -a setting

0.12
open
nobody
None
2021-09-19
2017-10-24
No

Allow special STM32 DFU operations without upload/download.

Example: I have an STM32 device in DFU mode and just want to get it out of it. When uploading and downloading the option "-s 0x08000000:leave" will do the trick, but the thing is that I don't want to do either, I just want to get the device out of DFU state. Right now I'm forced to do an upload and just discard the data, but doesn't feel right and also I don't know whether that will work when the memory is protected.

Discussion

  • Anonymous

    Anonymous - 2017-11-05

    I agree. The need to specify -U or -D for :leave looks strange

     
  • Stephane

    Stephane - 2018-07-03

    Hi every one,
    Here is a proposal for a patch to trigger leaving the DFU mode with a single command line flag.
    Hope this can help :-)
    I tested it with an STM32F7.

     
  • Tormod Volden

    Tormod Volden - 2020-10-10

    Stephane, thanks for the patch, but I don't want to introduce a new option only for DfuSe devices when we already have the -s modifiers for DfuSe. dfuse.c also already have code for sending the "leave" request.

    The "special commands" like leave, mass erase, etc are like the download process just without the part where the file is actually sent. I suggest this patch, where the -s modifier implies a download (unless upload is specified) and if there is no file (if no -D) it will skip that part. Hence: dfu-util -s :leave -a 0 or dfu-util -s :mass-erase -a 0 should now work. I have some work in the pipeline for another feature which will might eliminate the need for specifying an alternate interface (the current code assumes one and only one alternative interface remains after filtering, which makes sense for all normal DFU actions). Testing is welcome.

     
  • Tormod Volden

    Tormod Volden - 2020-10-25
    • summary: Allow special STM32 DFU operations without upload/download. --> Allow special STM32 DFU operations without -a setting
    • Milestone: none --> 1.1
     
  • Tormod Volden

    Tormod Volden - 2020-10-25

    I have applied my above solution to git. The -a 0 part is still required, this looks confusing to the user and is technically not needed, so I am keeping this ticket open for this.

     
    👍
    1

Anonymous
Anonymous

Add attachments
Cancel