Author Topic: Help! ATMega1280 memory/programming issue  (Read 636 times)

0 Members and 1 Guest are viewing this topic.

Offline Rjc987Topic starter

  • Contributor
  • Posts: 22
  • Country: us
Help! ATMega1280 memory/programming issue
« on: December 14, 2023, 06:31:49 pm »
Hey guys! I’m pretty new to AVR/ATmega but I’m having an issue with an embedded system. It’s a Biotek Eon Spectrophotometer which is based around an atmega1280. The 1280 has an ISSI 128kx8 SRAM connected to all of ports A&C, and all of Port D from the 1280 is connected through to all of Port E on an ATMega1281 (the 1281 is handling motor control, with UI, Sensors, etc running on the 1280). I pulled the ROM through the 1281 JTAG header at the start of the project but along the way, somehow a big block of memory got corrupted. The checksum changed and the comparison between the old hex and the post corruption read has a huge chunk missing. I tried reprogramming from the hex with a Snap in ipe and ide on both windows and Mac but every time it comes up with error “[Dataflash] at 0x0, expected 0x00000099, got 0x000000ff, programming did not complete”. I searched around the AVR forums and read that this was almost certainly due to a failed block of flash memory on the micro.

So I ordered a replacement 1280, soldered it to the board, tried to program it and no luck, still the same error. Could it actually be the 1281 that has the bad memory somehow, even though I’m programming through the 1280’s JTAG (both Jtags are separate btw, not daisy chained). Is the error and the missing block of memory caused by something else entirely? I’m so confused here and don’t know what to do. Any ideas?
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1613
  • Country: gb
Re: Help! ATMega1280 memory/programming issue
« Reply #1 on: December 15, 2023, 06:26:17 pm »
I think we need a basic block diagram of how these things are connected.  You said the JTAG lines are not daisy chained - but do they share any common lines line TCK? TMS?

That sort of error isn't always helpful as it could be from poor clock, data connections (0xFF is the default value) or as you suggested, failed memory.  The fact it failed at adress 0x0 indicates it cant' read any memory, so I'm going with a hardware problem - poor programming connections and/or shorts. Also, can you read the fuses? What are they set at?

And when you said "tried reprogramming from the hex" what hex file was this? the original firmware? or the one you read from the original chip?

I'm sure you've already debugged, but as a sanity check, do a continuity check on all the programming lines, and check for shorts to GND/VDD.

Also, a "bigger picture" question: Why are you doing this? Did this unit fail? Are you reparing it? or modifying it?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf