31.2.23.1 CTRLA - NVM Write Control Register
| 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: | CTRLA |
| Offset: | 0x0000 |
| Reset: | 0x00000000 |
| Property: | PAC Write Protection, KEY.KEY[7:0] = WRKEY to unlock when unprotected |
| Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
| Access | |||||||||
| Reset |
| Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
| Access | |||||||||
| Reset |
| Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
| Access | |||||||||
| Reset |
| Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| PREPG | NVMOP[3:0] | ||||||||
| Access | R/W | R/W | R/W | R/W | R/W | ||||
| Reset | 0 | 0 | 0 | 0 | 0 | ||||
Bit 7 – PREPG NVM Pre-Program Configuration Bit
- This field can only be modified when PAC Write protection is disabled, STATUS.BUSY=0, and KEY=<WRKEY Value> - same as NVMOP below.
- It is recommended to either always use or never use PREPG.
| Value | Description |
|---|---|
| 0 | Program Operations exclude Pre-Program step |
| 1 | Program Operations include Pre-Program step |
Bits 3:0 – NVMOP[3:0] NVM Operation
1111-1011 = Reserved
1010= SDAL: Set DAL per SDALCPUn - must be same or lower value than existing DAL value.(1) Operation is reserved if system debug access level is elevated for the CPU.
For all Write/Erase Operations below, the entire target range must not be write protected.
0111 = PFM Erase Operation: Upper & Lower PFM Erase
0110 = Upper PFM Erase Operation:
0101= Lower PFM Erase Operation:
0100= Page Erase Operation: Erases page selected by ADDR
0011 = Row Write Operation: Programs row selected by ADDR
0010= Quad (DWord) Program Operation: Programs flash word selected by ADDR
0001 = Single (DWord) Program Operation: Programs word selected by ADDR (2)
0000= No Operation
- This field can only be updated (and execute the operation) when PAC Write protection is disabled, STATUS.BUSY=0, and KEY=<WRKEY>.
- If FCR.ECCCTRL.ECCCTL[1:0]=2’b00, this operation performs a No-Op but does not affect WRERR or RSTERR.
