Unable to ISP program ATtiny48 from Atmel studio 6.2 with "Start Without Debugging" with Atmel ICE

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

Hi Guys,

 

I am unable to program an ATtiny48 from within Atmel Studio 6.2 with the "Start Without Debugging" button. The error I get is:

 

Failed to launch program

Error: Failed to start programming session before chip erase with eeprom preserve:Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xcc, expected 0x00 (Unknown status message)

This error I got after creating an empty GccApplication1, choosing the ATtiny48 and choosing the Atmel ICE programmer in ISP mode.

 

I tried reinstalling AS6.2 to no avail. The weird thing is, I can program the ATtiny48 using the "Device Programming" screen, so electrical connections should be OK.

 

When swapping the ATtiny48 (prod: 0850) with an ATmega48P (prod: 0802) in the same circuit, I can program it both with "Start Without Debugging" and also with the "Device Programming" screen.

 

I checked the programming speed. In both AS and the "Device Programming" screen it is 128KHz. I double checked fuses, they are the default.

 

So, why am I unable to program an ATtiny48 with "Start Without Debugging"?

 

This topic has a solution.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried installing driver-atmel-bundle-7.0.666.exe but that did not solve my problem.

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

Swapping the Atmel ICE for an AVR Dragon, then "Start Without Debugging" just works.

 

More symptoms: Atmel ICE is unable to program another board with an Attiny24 using debugWIRE. However, programming with ISP, enable DWen and then using "attach to target" can debug the Attiny24 just fine.

 

I noticed the Dragon has no "attach to target" function.

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

Atmel ICE is unable to program another board with an Attiny24 using debugWIRE.

You are NOT supposed to program a chip with DW, it should however download code into the chip during a debug session.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Back to the attiny48.

 

I found the solution to my problem (and a bug in Atmel Studio?) by chance.

 

I opened the attiny48 project, pressed "Start Without Debugging" and... it worked. Why?

Hmmm. Then I continued and created a new project. Only choosing the Atmel-ICE and the Attiny48. Press "Start Without Debugging" -> error.

Back to the working project, press "Start Without Debugging" -> it worked.

Back again to the new project, press "Start Without Debugging" -> error.

 

OK. So it must be something not hardware related.

I opened the the .cproj files and compared them.

 

In the not working project I found a difference in tool setting section:

 

  <com_atmel_avrdbg_tool_atmelice>
    <ToolOptions>
    <InterfaceProperties>
      <IspClock>125000</IspClock>
    </InterfaceProperties>
    <InterfaceName>ISP</InterfaceName>
    </ToolOptions>
    <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
    <ToolNumber>J41800001597</ToolNumber>
    <ToolName>Atmel-ICE</ToolName>
  </com_atmel_avrdbg_tool_atmelice>
  <avrtoolinterface>ISP</avrtoolinterface>

Versus the working section:

    <com_atmel_avrdbg_tool_atmelice>
      <ToolOptions>
        <InterfaceProperties>
          <DebugWireClockDiv>8000</DebugWireClockDiv>
          <IspClock>125000</IspClock>
        </InterfaceProperties>
        <InterfaceName>ISP</InterfaceName>
      </ToolOptions>
      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
      <ToolNumber>J41800001597</ToolNumber>
      <ToolName>Atmel-ICE</ToolName>
    </com_atmel_avrdbg_tool_atmelice>
    <avrtoolinterface>ISP</avrtoolinterface>

 

The difference: <DebugWireClockDiv>8000</DebugWireClockDiv>

 

Adding that to the not working project solves the error message and let me program the attiny48.

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

Where did you find the .cproj file?

Georgios Karanicolas

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

Where did you find the .cproj file?

Georgios Karanicolas

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

Where did you find the .cproj file?

Georgios Karanicolas

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

and how have you opened it?

Georgios Karanicolas

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

You can find it in your Atmel Studio solution directory.

 

I have opened in Notepad++.