Unlock Secured ATXMEGA128A1-AU Microcontroller Flash Firmware

When a customer brings us a board built around the ATXMEGA128A1-AU and asks us to unlock secured ATXMEGA128A1-AU microcontroller flash firmware, the first thing we explain is what actually stands in the way. Atmel built the XMEGA A1 family around an enhanced AVR core that reaches 32 MIPS at 32 MHz, and the 128A1 variant carries 128 KB of self-programmable flash, a separate 8 KB boot section, 2 KB of EEPROM and 8 KB of SRAM. None of that memory is exotic. What makes the device difficult is a small lock register deep inside the non-volatile memory controller, and understanding that register is the whole game.

Where the code lives on the 128A1

The A1 flash is not one flat region. Atmel divides it into an application section, an application table and a boot loader section, each with its own protection pair, and the 128 KB part sizes its boot section at 8 KB. Beside the flash sit 2 KB of EEPROM, a user signature row for customer data, and a production signature row holding the device identifier and oscillator calibration bytes. On the board, the smaller A1 siblings behave the same way, so any technique validated on a 64 KB part transfers directly to this one. The 100-lead TQFP package also gives an engineer generous probe access, which matters once you plan physical work.

A secured 100-lead TQFP microcontroller on a production board, the package used by the ATXMEGA128A1-AU
The ATXMEGA128A1-AU ships in a 100-lead TQFP; every A1 flash size shares the same die layout and the same PDI access path.

The lock register and what it blocks

Protection is concentrated in one byte of lock bits maintained by the NVM controller. Four two-bit groups divide the duties: BLBB guards the boot loader section, BLBA the application section, BLBAT the application table, and LB controls the external programming interface itself. Setting LB to the read-and-write mode disables both programming and verification of flash and EEPROM from the outside, and it locks the fuse bytes away from the programmer as well. Nothing except a full chip erase restores these bits, and a chip erase takes the application image with it. Software running on the chip is not restricted by LB, only by the section groups, which is why the distinction between the two layers matters when you plan an attack against a specific security level.

Two interfaces reach the NVM controller from outside. The PDI is a two-wire physical layer that borrows the RESET pin as its clock and a dedicated pin for data, and it exposes every memory space including fuses and lock bits. The JTAG port is enabled by its fuse at the factory and can be switched off from running firmware through a single control-register bit. A board with a reset capacitor or an aggressive pull-up on RESET often cannot clock PDI reliably, so we ask customers to describe their reset circuit before shipping a sample. Reading the production signature row tells us the die revision first, because early A1 silicon had an on-chip debug limitation in several sleep modes that changed which approach worked.

A realistic recovery path

Our procedure starts with a non-destructive probe: connect PDI at 3.3 V, request the device ID, and read the lock byte to learn which mode the factory or a previous programmer left behind. If the chip is in write-lock rather than the full read-and-write lock, verification paths sometimes remain open and a plain dump follows. Otherwise the honest routes are a controlled chip erase combined with a preserved-EEPROM fuse setting, or semi-invasive work on the die itself. Either way we verify the recovered image on a blank device before delivery, and we cross-check it against the protection design of the original board so nothing is silently truncated. For teams facing a whole fleet of locked controllers, the AVR service overview lists the evidence we need before any work begins.

Cost and turnaround depend almost entirely on the lock mode and the silicon revision, not on the 128 KB image size, which reads out in minutes once access exists. Engineers comparing notes across the family will find the same protection story on the 384 KB flagship of this line, documented dump by dump. Send us the part marking, the board revision and a short description of how the firmware was originally deployed, and we will confirm feasibility before you commit to shipping hardware.