DebugWIRE

Technical Note 83572

Architectures:

AVR

Component:

debugger

Updated:

11/6/2015 10:41 AM

Introduction

Some errors may occur when using Atmel debugWIRE, like:

Failed to enter SPI mode. Check that your squid cable is correctly attached. If the SPIEN fuse is not enabled, the part must be programmed using high-voltage.

.. or ..

No contact with device when using debugWIRE

The DWEN fuse must be enabled to use debugWIRE. Do you want to program this fuse from JTAGICE mkII ? (All SPI lines must be connected before you click YES)

Click NO to just retry making contact. (You might need to power thedevice off and on before clicking NO)

Solution

You need to think about the following when using debugWIRE:

  • The bit SPIEN should be enabled before using the "Fuse Handler" in IAR Embedded Workbench for AVR. You can use Atmel AVR Studio to enable this bit.
  • After setting the fuses, switch off the target board power and then switch it on again. Otherwise the fuses will not be set.
  • After using the "Fuse Handler", power cycle the board even though you have not made any changes in it. The "Fuse Handler" will enable the SPI interface by temporary disabling the DWEN bit.
  • In some Atmel documentation it is stated that high-voltage programming is needed to enable the ISP interface. This can be true for Atmel AVR Studio, but not for IAR Embedded Workbench for AVR, where you only need to disable the DWEN bit.

 

All product names are trademarks or registered trademarks of their respective owners.

We do no longer support Internet Explorer. To get the best experience of iar.com, we recommend upgrading to a modern browser such as Chrome or Edge.