31.10.10 Programming Command Register

The Programming Command Register is a 15-bit register. This register is used to serially shift in programming commands, and to serially shift out the result of the previous command, if any. The JTAG Programming Instruction Set is shown in the following table. The state sequence when shifting in the programming commands is illustrated in State Machine Sequence for Changing/Reading the Data Word further down in this section.

Figure 31-11. Programming Command Register
Table 31-19. JTAG Programming Instruction Set a = address high bits, b = address low bits, H = 0 - Low byte, 1 - High Byte, o = data out, i = data in, x = don’t care
InstructionTDI sequenceTDO sequenceNotes
1a. Chip erase0100011_10000000

0110001_10000000

0110011_10000000

0110011_10000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

1b. Poll for chip erase complete0110011_10000000xxxxxox_xxxxxxxx(2)
2a. Enter Flash Write0100011_00010000xxxxxxx_xxxxxxxx
2b. Load Address High Byte0000111_aaaaaaaaxxxxxxx_xxxxxxxx(9)
2c. Load Address Low Byte0000011_bbbbbbbbxxxxxxx_xxxxxxxx
2d. Load Data Low Byte0010011_iiiiiiiixxxxxxx_xxxxxxxx
2e. Load Data High Byte0010111_iiiiiiiixxxxxxx_xxxxxxxx
2f. Latch Data0110111_00000000

1110111_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
2g. Write Flash Page0110111_00000000

0110101_00000000

0110111_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
2h. Poll for Page Write complete0110111_00000000xxxxxox_xxxxxxxx(2)
3a. Enter Flash Read0100011_00000010xxxxxxx_xxxxxxxx
3b. Load Address High Byte0000111_aaaaaaaaxxxxxxx_xxxxxxxx(9)
3c. Load Address Low Byte0000011_bbbbbbbbxxxxxxx_xxxxxxxx
3d. Read Data Low and High Byte0110010_00000000

0110110_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

xxxxxxx_oooooooo

low byte

high byte

4a. Enter EEPROM Write0100011_00010001xxxxxxx_xxxxxxxx
4b. Load Address High Byte0000111_aaaaaaaaxxxxxxx_xxxxxxxx(9)
4c. Load Address Low Byte0000011_bbbbbbbbxxxxxxx_xxxxxxxx
4d. Load Data Byte0010011_iiiiiiiixxxxxxx_xxxxxxxx
4e. Latch Data0110111_00000000

1110111_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
4f. Write EEPROM Page0110011_00000000

0110001_00000000

0110011_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
4g. Poll for Page Write complete0110011_00000000xxxxxox_xxxxxxxx(2)
5a. Enter EEPROM Read0100011_00000011xxxxxxx_xxxxxxxx
5b. Load Address High Byte0000111_aaaaaaaaxxxxxxx_xxxxxxxx(9)
5c. Load Address Low Byte0000011_bbbbbbbbxxxxxxx_xxxxxxxx
5d. Read Data Byte0110011_bbbbbbbb

0110010_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

6a. Enter Fuse Write0100011_01000000xxxxxxx_xxxxxxxx
6b. Load Data Low Byte(6)0010011_iiiiiiiixxxxxxx_xxxxxxxx(3)
6c. Write Fuse Extended byte0111011_00000000

0111001_00000000

0111011_00000000

0111011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
6d. Poll for Fuse Write complete0110111_00000000xxxxxox_xxxxxxxx(2)
6e. Load Data Low Byte(7)0010011_iiiiiiiixxxxxxx_xxxxxxxx(3)
6f. Write Fuse High byte0110111_00000000

0110101_00000000

0110111_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
6g. Poll for Fuse Write complete0110111_00000000xxxxxox_xxxxxxxx(2)
6h. Load Data Low Byte(7)0010011_iiiiiiiixxxxxxx_xxxxxxxx(3)
6i. Write Fuse Low byte0110011_00000000

0110001_00000000

0110011_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
6j. Poll for Fuse Write complete0110011_00000000xxxxxox_xxxxxxxx(2)
7a. Enter Lock bit Write0100011_00100000xxxxxxx_xxxxxxxx
7b. Load Data Byte(9)0010011_11iiiiiixxxxxxx_xxxxxxxx(4)
7c. Write Lock bits0110011_00000000

0110001_00000000

0110011_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
7d. Poll for Lock bit Write complete0110011_00000000xxxxxox_xxxxxxxx(2)
8a. Enter Fuse/Lock bit Read0100011_00000100xxxxxxx_xxxxxxxx
8b. Read Extended Fuse Byte(6)0111010_00000000

0111011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

8c. Read Fuse High Byte(7)0111110_00000000

0111111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

8d. Read Fuse Low Byte(8)0110010_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

8e. Read Lock bits(9)0110110_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxoooooo

(5)
8f. Read Fuses and Lock bits0111010_00000000

0111110_00000000

0110010_00000000

0110110_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

xxxxxxx_oooooooo

xxxxxxx_oooooooo

xxxxxxx_oooooooo

(5)

fuse ext. byte

fuse high byte

fuse low byte

lock bits

9a. Enter Signature Byte Read0100011_00001000xxxxxxx_xxxxxxxx
9b. Load Address Byte0000011_bbbbbbbbxxxxxxx_xxxxxxxx
9c. Read Signature Byte0110010_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

10a. Enter Calibration Byte Read0100011_00001000xxxxxxx_xxxxxxxx
10b. Load Address Byte0000011_bbbbbbbbxxxxxxx_xxxxxxxx
10c. Read Calibration Byte0110110_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

11a. Load No Operation Command0100011_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

Note:
  1. This command sequence is not required if the seven MSB are correctly set by the previous command sequence (which is normally the case).
  2. Repeat until o = “1”.
  3. Set bits to “0” to program the corresponding fuse, “1” to unprogram the Fuse.
  4. Set bits to “0” to program the corresponding lock bit, “1” to leave the Lock bit unchanged.
  5. “0” = programmed, “1” = unprogrammed.
  6. The bit mapping for Fuses Extended byte is listed in Extended Fuse Byte table of Fuse Bits section.
  7. The bit mapping for Fuses High byte is listed in Fuse High Byte table of Fuse Bits section.
  8. The bit mapping for Fuses Low byte is listed in Fuse Low Byte table of Fuse Bits section.
  9. The bit mapping for Lock bits byte is listed in Lock Bit Byte table of Program and Data Memory Lock Bits section.
  10. Address bits exceeding PCMSB and EEAMSB (Command Byte Bit Coding in Signal Names section and Page Size section) are don’t care
Figure 31-12. State Machine Sequence for Changing/Reading the Data Word