Problem with Mega640 and ICE 2

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

I have a strange problem trying to use the JTAG ICE 2 with a Mega640. Both are new to me, so perhaps I'm doing something stupid here.

The ICE will program the chip on the JTAG interface, no problem. Fuses, Flash, EEPROM, everything. It all verifies and I can see the program running correctly (there's a display on it). But it will not EMULATE! The ICE thinks the chip is completely erased, 0xFFFF at every location. It isn't erased - if I disconnect the ICE, the program runs again. But it won't do a damn thing with the ICE connected. Trying to reset kicks the thing into RUN, only it doesn't run, it does nothing. Breaking in always finds the program counter at 0x7FFF, gives me the disassembler view and reports that every address is 0xFFFF.

So I'm asking here if anyone else ever saw this particular problem, and whether you think it's the chip or the ICE at fault. I'm about to change out the CPU, because I can - if the ICE is broken there's not much I can do about it.

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

Ok, I can answer my own question this morning. The ICE mk2 is broken - it does the same thing with a known good Mega128 board that emulates just fine with my old JTAG ICE. Reflashing or using serial instead of USB makes no difference. It's strange that it has no problems at all programming and verifying as a JTAG programmer, but apparently it can't read or write the Flash in emulation mode.