33.5.8 Feature Unlock Key REGISTER
- KEY can only be written when STATUS.BUSY=0.
- KEY resets to 0 (a valid lock code) on a successful write to CTRLA, SWAP or an unsuccessful write to any register (any write that sets KEYERR).
- KEY allows for multiple writes to configuration registers when using CFGKEY. To lock, write a Valid Lock Code to KEY.
- Byte and Half-Word writes are ignored but result in a bus error.
| Symbol | Description | Symbol | Description | Symbol | Description |
|---|---|---|---|---|---|
| R | Readable bit | HC | Cleared by Hardware | (Grey cell) | Unimplemented |
| W | Writable bit | HS | Set by Hardware | X | Bit is unknown at Reset |
| K | Write to clear | S | Software settable bit | — | — |
| Name: | KEY |
| Offset: | 0x20 |
| Reset: | 0x00000000 |
| Property: | R/W |
| Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
| CODE[23:16] | |||||||||
| Access | W | W | W | W | W | W | W | W | |
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
| CODE[15:8] | |||||||||
| Access | W | W | W | W | W | W | W | W | |
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
| CODE[7:0] | |||||||||
| Access | W | W | W | W | W | W | W | W | |
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| FEATURE[7:0] | |||||||||
| Access | R/W/HC | R/W/HC | R/W/HC | R/W/HC | R/W/HC | R/W/HC | R/W/HC | R/W/HC | |
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
Bits 31:8 – CODE[23:0] Lock Code
This register is used to lock and unlock write access to other FCW SFR bits.
The KEY state remains active until it is written to a Valid Lock Code or CTRLOP is written.
0x91C32C= Valid Unlock code - Unlocks selected SFR(s)
All Others = Valid Lock Code - Locks all SFR protected by KEY register
Bits 7:0 – FEATURE[7:0]
This register is used to lock and unlock write access to other FCW SFR bits.
0x00= no selection, invalid selection, or invalid Key - Locks all SFR protected by KEY register
0x01= WRKEY Value: Unlock SFR bits associated with Write/Erase
0x04= CFGKEY Value: Unlock SFR bits associated with general Flash configuration
all other values: Invalid selection - Key Value set to 00 - Locks all SFR protected by KEY register
