2
\$\begingroup\$

I'm having a strange problem with AtmelStudio. I took a few screenshots:

Here, atmel studio is open and I check the project settings. ISP Clock is set to 125kHz. This is good.

I also check the setting in device programming (Tools -> Device Programming). 250kHz is fine. Reading out the signature is no problem and I can even program the device here under Production File.

So all looks good, I hit F5 to compile and run the program, and this happens. Ouch, unexpected device signature 0x00000000.

At this stage I'm confused. Communication with the device worked perfectly just before. Going into Tools -> Device Programming reveals what happened. The ISP clock is set to 1MHz! Too high for the chip. Obviously reading the signature here fails.

What exactly is happening? Why is AtmelStudio changing the ISP Clock of the programmer? Or where is the 1MHz coming from, is there some config I've overlooked?

\$\endgroup\$
4
  • \$\begingroup\$ You can use [Alt] in conjunction with [PrtScr] to only copy the current window. That would save a lot of pixels/bytes and keep things more clear. \$\endgroup\$
    – jippie
    Aug 16, 2014 at 16:21
  • 2
    \$\begingroup\$ Have exactly the same problem. The same project was working fine couple of weeks ago, but now still the 1MHz ISP clock disables me to flash the 1MHz MCU core clock chip. \$\endgroup\$
    – user52506
    Sep 3, 2014 at 12:48
  • \$\begingroup\$ Have you reported this bug to Atmel? I recently stumbled on this bug myself when I clocked the AVR at 1MHz instead of 8MHz. This happens even with the latest (6.2 sp1). \$\endgroup\$ Nov 27, 2014 at 20:58
  • \$\begingroup\$ Bug report at Atmel: asf.atmel.com/bugzilla/show_bug.cgi?id=3504 \$\endgroup\$
    – raimue
    Apr 15, 2015 at 14:38

1 Answer 1

2
\$\begingroup\$

I think I figured out the solution.

In the .proj file, ATMEL stores the setting as ISPClock, but they don't read it back as IspClock. They try to read it back as DebugWireClockDiv, but that never exists.

So just open the .cppproj file and search for the following, and add the element to match your IspClock.

<com_atmel_avrdbg_tool_atmelice>
  <ToolOptions>
    <InterfaceProperties>
      <IspClock>50000</IspClock>
      <DebugWireClockDiv>50000</DebugWireClockDiv>
    </InterfaceProperties>
    <InterfaceName>ISP</InterfaceName>
  </ToolOptions>
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.