Bricked EDBG

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

Under Windows 10, using Atmel Studio 7.0 with my Arduino M0 Pro, programming port (i.e. EDBG port), a message appeared for an EDBG update, to which I clicked OK (I do not recall what the exact message was). After this, the EDBG stopped working completely. The EDBG chip now has these characteristics:

 

Hardware IDs

USB\VID_03EB&PID_213A&REV_0101

USB\VID_03EB&PID_213A\FFFFFFFFFFFFFFFFFFFF

 

Windows says it is one of the "Human Interface Devices" called "HID-compliant vendor-defined device".

 

The response for atwf -l on the command prompt is:

 

Connected tools:
edbgbootmode    FFFFFFFFFFFFFFFFFFFF

 

and trying to reprogram it with atfw -t edbg -a "C:\Program Files (x86)\Atmel\Studio\7.0\tools\EDBG\edbg_fw.zip" generates:

 

Found edbg:FFFFFFFFFFFFFFFFFFFF
Upgrading edbg:FFFFFFFFFFFFFFFFFFFF

 

and a popup error:

 

 

Does anyone know how to un-brick this?

 

This topic has a solution.
Last Edited: Mon. Jan 15, 2018 - 11:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmh, can you try to run it twice (without re-powering the Kit). Hopefully the first upgrade kicks the kit into bootmode (blinking green/orange lights) and the next one connects to the bootmode and pushes the upgrade.

:: Morten

 

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

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

Hi meolsen,

 

Thank you for the reply. I just tried your suggestion, many times repeatedly, the behavior does not change (and there is no difference with the LEDs).

 

Additionally, I failed to mention previously that double clicking the reset button rapidly (as per a comment posted somewhere) also does not change anything.

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

Ok, then add -v 8 to the command line of atfw to turn on the verbosest of logs. Paste it here...

:: Morten

 

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

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

Hi meolsen,

 

This is what will show up with the -v 8:

 

[39m13:15:29: [init] Initializing logging subsystem                                                                         [0m
[39m13:15:29: [init] Logging to file: c:\users\xxx\AppData\Local\Temp\atfw.973d-9e54-ef0e-1480.log                          [0m
[39m13:15:29: [init] Finished initializing logging subsystem                                                                [0m
[37m13:15:29: [cli] Starting execute stage                                                                                  [0m
[37m13:15:29: [cli] Enumerating connected tools and serial numbers:                                                         [0m
[37m13:15:29: [mplabcomm::factory] Loaded access link: MPLABCOMM_NO_ERROR                                                   [0m
[37m13:15:29: [mplabcomm::factory] Library version=322, session=0                                                           [0m
[37m13:15:30: [mplabcomm::library] Starting library controll: session=0, list=0                                             [0m
[37m13:15:30: [mplabcomm::factory] List handle=0                                                                            [0m
[37m13:15:30: [mplabcomm::library] Unloading access link: list=0, session=0                                                 [0m
[37m13:15:30: [cli] FFFFFFFFFFFFFFFFFFFF                                                                                    [0m
[37m13:15:32: [cli] No serial number given                                                                                  [0m
[37m13:15:32: [cli] Choosing first serial                                                                                   [0m
[39m13:15:32: [cli] Found                                                                                                   [0m
[39m13:15:32: [cli] edbg                                                                                                    [0m
[39m13:15:32: [cli] :                                                                                                       [0m
[39m13:15:32: [cli] FFFFFFFFFFFFFFFFFFFF                                                                                    [0m
[37m13:15:32: [cli] Creating upgrader for edbg(FFFFFFFFFFFFFFFFFFFF)                                                        [0m
[37m13:15:32: [fw] Setting up EDBG Firmware Upgrader based on serial                                                        [0m
[37m13:15:32: [fw] Done setting up                                                                                          [0m
[37m13:15:32: [cli] Have upgrader, continue                                                                                 [0m
[37m13:15:32: [cli] Start reading firmware from archive C:\Program Files (x86)\Atmel\Studio\7.0\tools\EDBG\edbg_fw.zip      [0m
[37m13:15:32: [fw] Temporary firmware directory: 'c:\users\xxx\AppData\Local\Temp\ce30-d27d-849b-8250'                      [0m
[37m13:15:32: [fw] Parsing firmware manifest                                                                                [0m
[37m13:15:32: [cli] Finished reading firmware from archive                                                                  [0m
[39m13:15:32: [cli] Upgrading edbg:FFFFFFFFFFFFFFFFFFFF                                                                     [0m
[37m13:15:32: [cli] Connect; Application                                                                                    [0m
[37m13:15:32: [fw] Try connect to known Application PIDs                                                                    [0m

 

(I had to delete the box-like "invalid characters" from the output)

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

Interesting... So, this crash is actually external to atfw...

 

What windows version are you running? Are there any pending updates for windows? Do you have any pending driver updates for your USB controller? Is you USB cable broken? (in other words, we crash at point where we want to start to talk on the USB bus).

 

Also, could you try to set the kit in bootmode, and run the upgrade? (There's a pad on the board marked BOOT that you can short to ground before you connect USB which will force it into bootmode).

:: Morten

 

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

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

I shorted that pin, nothing happens (also failed to mention previously)

 

I am running Windows 10 latest version, 1709, fully updated.

 

There is nothing wrong with the drivers or physically with the cables, everything is the same as when the EDBG "update" took place.

 

I have a USBasp and a J-Link but these seem to be completely useless.

 

Edit: I have been using this board for a few months, it was working OK until the incident

Last Edited: Mon. Jan 15, 2018 - 12:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need to short it,and then plug in the edbg (while the pad is shorted)

:: Morten

 

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

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

Ok, I think this is internal issue AVRSV-8001. For now, I don't have a workaround that works. Please go to Tools->Options->Tools and set Check Firmware to False  so that Atmel Studio ignored the firmware check...

:: Morten

 

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

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

Hi meolsen

 

I tried the procedure again, shorting the pin etc., but, as before, nothing changed.

 

So, nothing to do? Paperweight?

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

Is it in boot mode? (blinking leds when you connect it?). If it is not, just tell studio to not care about the firmware version...

:: Morten

 

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

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

Hi meolsen,

 

It seems like I did not express myself properly, let me try again:

 

1) Normal Condition

1A) EBDG OK <-> programming using USB interface and Atmel Studio OK (for months, every other day or so)

1B) implicitly, VID and PID are OK

 

2) Atmel Studio Catastrophe

2A) Atmel Studio "updates" the firmware

2B) VID and PID become (bizarrely) VID_03EB&PID_213A (for the USB)

2C) EDBG is bricked because Windows now says it is an HID device, i.e., VID_03EB&PID_213A

 

3) Aftermath

3A) Atmel Studio does not know that the EDBG is present (because Windows says it is an HID)

3B) ATFW sees edbgbootmode, but bombs out

3C) the double-click-reset does nothing

3D) shorting the BOOT thing to ground does nothing

 

Edit: as per JohanEkdahl's clarification, above, instead of "it is an HID device" it should read "it is not the expected HID device"

Last Edited: Mon. Jan 15, 2018 - 10:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bowzee wrote:
EDBG is bricked because Windows now says it is an HID device

bowzee wrote:
Atmel Studio does not know that the EDBG is present (because Windows says it is an HID)

But the EDBG is supposed to expose itself as a HID device, right!?

 

See e.g. http://www.microchip.com/webdoc/...

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Hi JohanEkdahl,

 

Thank you for your reply. Utilizing the information you provided, perhaps instead of "HID device", the proper way to write this would be "the correct HID device". I will append this above.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

0x213A is indeed the EDBG boot pid. So, connecting the EDBG to the PC enumerates as this? (no jumper or nothing). 

 

That basically means that the APP firmware is wrong or non-existent... First way to fix this is, since atfw keeps crashing on your machine, would be to try another machine and see if you can restore the firmware (using atfw). The bug number I mentioned above is the report about atfw crashing 'seemingly from inside Windows' the moment we start to write data on the HID link (yes, EDBG always uses HID, but there's one PID for APP and one for BOOT).

:: Morten

 

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

Last Edited: Mon. Jan 15, 2018 - 10:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi meolsen,

 

I was not aware that the VID and PID were correct, it was my assumption that Windows was detecting it incorrectly, as a different device. This is what shows up here:

 

 

I will try to find some machine with a Windows version previous to 1709 and test what you suggested.

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

Hi meolsen and JohanEkdahl,

 

Switching to a different machine solved the problem! Thanks!

 

For anyone reading this thread, the output says "failed", but it worked:

 

C:\Program Files (x86)\Atmel\Studio\7.0\atbackend>atfw -t edbg -a "c:\Program Files (x86)\Atmel\Studio\7.0\tools\EDBG\edbg_fw.zip"
Found edbg:FFFFFFFFFFFFFFFFFFFF
Upgrading edbg:FFFFFFFFFFFFFFFFFFFF
Waiting for bootloader usb enumeration: [==========]
Upgrading Debugger MCU Firmware: [==========]
Failed to do upgrade

 

 

The Windows 10 version is 1607 and Atmel Studio's is 7.0.1006

 

Excellent! Back to work!

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

That failed message should be caused by the fact that the serial number changed (I'm assuming it's not fffffffff anymore...)

:: Morten

 

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

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

Hi meolsen,

 

This is what I get:

 

C:\Program Files (x86)\Atmel\Studio\7.0\atbackend>atfw -l
Connected tools:
edbg            FFFFFFFFFFFFFFFFFFFF

 

The PID is 2111 (not 213A):

 

 

 

But it is fixed, and in this context this is pretty much all that matters! Again, thanks!