atfw detects atmel-ice but does not found it

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

Hi,

 

I have trouble finding just bought atmel-ice device.

Atmel Studio 7.0 is installed and I flash code using avrdude, but now I want to go on debugging, therefore I need Atmel Studio 7.0 to detect Atmel-ICE.

 

Here is the problem. Support did not provide help on this.

atfw -t
Please speficy tool type:
atmelice J41800110483 #detected
atmelice J41800110483 #Even twice !
atmelice J41800110483 #Sometimes even three times, but not always.

#So let's select one
atfw -t atmelice
No Tool is found

Thanks

Yvon

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

Just go into Studio and in the VIEW>Available Atmel Tools see if the ICE is there and connected.  If it is then you need to load your project and then go to PROJECT>Properties.Tool, and select a tool for debugging - In this case the Atmel ICE, and save.

 

You're all set

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Hey, unfortunately ICE is not there.

Yvon

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

Maybe things have changed but (because of libusb) it used to be "either/or". Either you could make a tool visible to avrdude or it could be visible to Studio. Maybe that is still the case. 

 

For that there used to be a "libusb filter driver" which allowed the driver of one to see the other.

 

Of course this may all be distant history these days?

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

Yvon wrote:

Hey, unfortunately ICE is not there.

 

DOes it appear in your Device manager?

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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


Yes device is displayed in device manager.

 

 

Looking at this filter driver thing.

Yvon

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

Here is what I have.  Mine is under Microchip Tools

 

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Yvon wrote:
Here is the problem.

[multiple detects of Atmel-ICE]

IIRC, atfw.exe will result in a USB reset to a specific Atmel tool.

Which Windows? (winver)

Reason : WinUSB underwent a major makeover in Windows 10

 

Virtual machine?

Reason : possible lack of USB pass-thru (emulated USB host instead of direct to USB HCI)

 

External USB hub?

Reason : some are wonky (IIRC, Windows 10 DDK has USB hub verification software)

 

External self-powered USB hub?

Reason : Atmel-ICE draws some current on USB Vbus though not a lot

 

USB isolator?

Reason : timing may be out-of-spec and/or USB Vbus current is lacking (Atmel-ICE brownout)

 

Defective USB host?

Reason : USB ports are vectors of PC destruction; try another internal USB hub on the PC, workstation, or server (most have at least two USB HCI)

 


Electrical | USB in a NutShell - Chapter 2 - Hardware (fourth paragraph for USB reset)

Atmel Studio 7 | The Firmware upgrade Process fails or is Unstable on a Virtualized Machine

 

edit :

Defective USB cable?

 

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

Last Edited: Mon. Jan 27, 2020 - 09:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

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

 

Hello, thank you all for you comments.

I am running Windows 10

No virtual machine, no hub

I tried to investigate the driver topic

USB isolator?

Reason : timing may be out-of-spec and/or USB Vbus current is lacking (Atmel-ICE brownout)

 

Defective USB host?

Reason : USB ports are vectors of PC destruction; try another internal USB hub on the PC, workstation, or server (most have at least two USB HCI)

 

Defective USB cable?

Idk for isolator. I tried different ports, same problem. I have only one cable. Anyway, I could program with avrdude.

 

I performed a complete removal and reinstallation of environment.

Now the peripherals are displayed slightly differently :

 

 

There is also bad news. Avrdude does not work anymore... so I am not able to program device at all anymore.

 

avrdude.exe -p x256a3bu -c atmelice -t
jtag3_open_common() : Did not find any device matching VID 0x03eb and PID list : 0x2141

 

 

Yvon

Last Edited: Tue. Jan 28, 2020 - 11:10 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yvon wrote:
There is also bad news. Avrdude does not work anymore...
Like I say, you probably need the libusb "filter driver". avrdude accesses via the libusb interface, the filter driver sits "on top" of some other driver and maps the requests so that avrdude can "see" it.

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

Hi clawson, I don't really understand what is a filter driver and what I should do.

 

However, I am still investigating and maybe this will confirm what you are saying, or maybe not.

 

So.

Good news: I just used Zadig to change driver of Atmel-ICE CMSIS-DAP (Interface 0) : I replaced the WinUSB by the following driver.

 

 

And avrdude is back !!

So avrdude works with this driver, but not with the default WinUSB one.

Yvon

Last Edited: Tue. Jan 28, 2020 - 11:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey clawson,

 

According to libusb-win32 filter installer,

The libusb-win32 filter driver allows access to usb devices using the libusb-win32 api while maintaining compatibility with software which uses the original driver.

 

My problem, for now, is to find a driver compatible with Atmel Studio. I don't find any.

I am not trying to use Atmel Studio and avrdude at the same time.

I am just trying to find a setup for atmelice to be detected by atmel studio.

 

Can someone tell me the name of the driver which is compatible with atmel studio ?

 

Thanks

Yvon

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

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

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

This should happen automatically, but sometimes the Windows driver does not recognize the tool correctly. To correct this, you have to check that the tool is listed under the Atmel node in the device manager in Windows.

What is "the tool" ?

When I plug Atmel-ICE, I can see 3 peripherals popping in Pheripherals manager :

  • USB Composite Peripheral
  • Atmel-ICE CMSIS-DAP
  • Atmel-ICE Data Gateway

 

Atmel-ICE Data Gateway appears under "Microchip Tools". The two others do not.

 

Anyway, I already tried what is advized, for all of them.

 

Thanks

Yvon

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

I had a similar problem with some Xplained Pro boards, which I was able to 'fix' by DISABLING the "ICE Data Gateway" (in the Windows Device Manager.)

On ONE laptop.  Another (believed Identically configured) laptop worked fine.   I had a case open with Microchip, but we failed to make any progress in figuring out what was going on.

But you can give this a try; AFAIK, the Data Gateway is a thing that allowed PC-side stuff to access i2C/SPI and such; you don't need it for basic programming or debugging.

 

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

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

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

westfw and gchapman, thank you for your help.

 

I tried to disable the DGI, no joy.

Yvon

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

If you are out of ideas, try atprogram.exe (included with Atmel Studio) which is used to program atmel chips.

See  AN2466 (Link).

 

This won't solve your debugging problem, but you can see if you can talk to the Atmel ICE unit.

 

 

 

 

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

I have new elements.

I installed MPLAB X.

I can flash, but I can't debug.

When I started debugger I got :

Data transmission failed. Error code -109 returned while trying to send USB datat.
A communication error with the debug tool has occurred. The tool will be reset and should re-enumerate shortly.
Connection Failed.

Then I set the driver as WinUSB.

 

I tried again to start debug and I got :

Launching
Programming target
An error occurred in the debugger. Terminating the debug session.
com.microchip.mplab.mdbcore.debugger.DebugException
INFO: Generic setting "Maintain active connection to hardware tool" is enabled and is not supported for the current device.
User program finished

Thanks

Yvon

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

Did not find solution to the problem but I found a workaround.

I have switched on another machine running windows 8.

It is working now.

Yvon

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

What antivirus program are you using on teh Win10 machine?  I am using Bitdefender on mine and I have to 'tell' the program to unblock Atmel tools(meaning various programs in the Studio IDE).

 

Check your antivirus/malware......

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user