dfu-programmer/alternates xmega

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I am working on USB DFU using internal firmware reset. I am able to halt at the breakpoint where the watchdog reset is being issued. The reset register is being read correctly and the next step is to stop the USB and jump to bootloader. The firmware is doing this correctly. I am using the xmegaa1uxplainedpro eval board.

 

I don't know how to use dfu-programmer. Can you provide a syntax of how to use the commands? I tried

dfu-programmer atxmega128a1u dump

It says no device present. Why is this?

 

I need examples on how to use all the commands with dfu-programmer-- erase, flash.

Is there a reset option?

 

Is there any other tool I can use for this? I have docklight scripting tool and I can issue commands from there instead of using dfu-programmer though I don't know what script to write. I used docklight to issue the WDT reset.

 

 

Thanks

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
$ dfu-programmer --help
Usage: dfu-programmer target[:usb-bus,usb-addr] command [options] [global-options] [file|data]

global-options:
        --quiet
        --debug level    (level is an integer specifying level of detail)
        Global options can be used with any command and must come
        after the command and before any file or data value

commands:
        configure {BSB|SBV|SSB|EB|HSB} [--suppress-validation] data
        dump
        dump-eeprom
        dump-user
        erase [--suppress-validation]
        flash [--suppress-validation] [--suppress-bootloader-mem]
                     [--serial=hexdigits:offset] {file|STDIN}
        flash-eeprom [--suppress-validation]
                     [--serial=hexdigits:offset] {file|STDIN}
        flash-user   [--suppress-validation]
                     [--serial=hexdigits:offset] {file|STDIN}
        get     {bootloader-version|ID1|ID2|BSB|SBV|SSB|EB|
                 manufacturer|family|product-name|
                 product-revision|HSB}
        getfuse {LOCK|EPFL|BOOTPROT|BODLEVEL|BODHYST|
                 BODEN|ISP_BOD_EN|ISP_IO_COND_EN|
                 ISP_FORCE}
        setfuse {LOCK|EPFL|BOOTPROT|BODLEVEL|BODHYST|
                 BODEN|ISP_BOD_EN|ISP_IO_COND_EN|
                 ISP_FORCE} data
        setsecure
        reset
        start

 

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you give an example of how to use these commands? 

dfu-programmer atxmega12a1u dump

says no device is present. What is the correct command to show the device?

 

I really need an example of how to use the flash command.

 

Thanks

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

fwe wrote:
Is there any other tool I can use for this?
atprogram.exe in Microchip Studio

USB reset of a USB device is in Windows (WinUSB and, IIRC, libusb)

 


Docklight - Test & Simulate Serial Protocols (RS232, TCP, UDP, HID...)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I put a different xmega128a1uxplainedpro eval board in DFU mode using the flip programmer. Then I can communicate with the eval board using dfu-programmer. Now I will try the internal reset to see if I have better luck.