Hello All,
So, I've got a little farther down this rabbit hole.
As I had mentioned, this post was with regards to trying to repair some lighting systems which originally contained an ATXMega64D3. The code isn't locked, so I was able to read the flash, EEPROM, and fuses using an Atmel ICE and Studio 7. I have three of these systems that are dead.
As everyone is well aware, there is a severe lack of new parts available to purchase, nearly everywhere for the next year.
I did manage to find a single ATXMega64C3. And, using the code I read from a working system, I was able to swap out the faulty chip, program it, and test it. It runs successfully and I can't seem to find anything that is compromised. The problem was in fact 10 bytes of completely unresponsive memory. I thought it was flash originally, but those 10bytes of dead memory were in the EEPROM, in the same place on all three systems. The original software logs hours, and temperature. And I think the corruptions were involving both of these items. The number of times that the system writes these values during operation, after a few years, probably goes over the spec of the number of flash/EEPROM writes.
Now, as for the other 2 dead units. The only ATXMega chips, with a 64pin TQFP package I could find in the moment that would potentially fix these, were on Atmels Xplained dev boards. These chips are ATXMega256A3BU. I realize there are more peripherals available to use, along with the increased flash and boot size/location. That aside, I was hoping that these processors would be able to run the code as well, with little to no modding on the firmware.
I first did a quick programming, only checking that the fuses were the same settings, as the 256A3 has a few more available to program. But, it doesn't work. And, I suspect it's got to do with code that's in the the boot area.
As I started having a look at the flash hex file, it seems that in the original ATXMega64D3 file, at the beginning of the boot flash location, there is a jump instruction and address.
10000: 0C 94 6D 82 FF FF FF FF...
...
...
...
10040: 0C 94 80 80 FF FF FF FF...
Since these are 16 bit addresses, how would these look if this was correctly compiled for the ATXMega256A3BU, a 256kB flash and 8kB boot?
I have already attempted to manually move the boot section as shown above from 10000, to 40000, to reflect the position as listed in the ATXMega256 datasheet. But, I realize there must be more to this since 16bits doesn't seem enough to address beyond 64kB. Is there a different jump instruction/s that is specifically for the other 3 pages of 64kB flash on the bigger chip?
While I would rather stick to the 64kB variants of this processor to get these things fixed, I'm a little stuck due to the unavailability to them, so if anyone has any ideas on what I could potentially try as experiments with the flash hex file, to make it work for the 256kB variant, please let me know, as crazy as the idea would be, I'm willing to try.
Thanks for all the help thusfar!