Prog_commands ($5), Data registers, Reset register – Rainbow Electronics ATmega128L User Manual

Page 299: Programming enable register, Atmega128(l)

Advertising
background image

299

ATmega128(L)

2467B–09/01

PROG_COMMANDS ($5)

The AVR specific public JTAG instruction for entering programming commands via the
JTAG port. The 15-bit Programming Command register is selected as data register. The
active states are the following:

Capture-DR: the result of the previous command is loaded into the data register.

Shift-DR: the data register is shifted by the TCK input, shifting out the result of the
previous command and shifting in the new command.

Update-DR: the programming command is applied to the Flash inputs

Run-Test/Idle: one clock cycle is generated, executing the applied command (not
always required, see

Table 132 below).

PROG_PAGELOAD ($6)

The AVR specific public JTAG instruction to directly load the Flash data page via the
JTAG port. The 2048-bit Virtual Flash Page Load register is selected as data register.
This is a virtual scan chain with length equal to the number of bits in one Flash page.
Internally the shift register is 8-bit. Unlike most JTAG instructions, the Update-DR state
is not used to transfer data from the shift register. The data are automatically transferred
to the Flash page buffer byte by byte in the Shift-DR state by an internal state machine.
This is the only active state:

Shift-DR: Flash page data are shifted in from TDI by the TCK input, and
automatically loaded into the Flash page one byte at a time.

PROG_PAGEREAD ($7)

The AVR specific public JTAG instruction to read one full Flash data page via the JTAG
port. The 2056-bit Virtual Flash Page Read register is selected as data register. This is a
virtual scan chain with length equal to the number of bits in one Flash page plus 8. Inter-
nally the shift register is 8-bit. Unlike most JTAG instructions, the Capture-DR state is
not used to transfer data to the shift register. The data are automatically transferred from
the Flash page buffer byte by byte in the Shift-DR state by an internal state machine.
This is the only active state:

Shift-DR: Flash data are automatically read one byte at a time and shifted out on
TDO by the TCK input. The TDI input is ignored.

Data Registers

The data registers are selected by the JTAG instruction registers described in section
“Programming Specific JTAG Instructions” on page 297. The data registers relevant for
programming operations are:

Reset Register

Programming Enable Register

Programming Command Register

Virtual Flash Page Load Register

Virtual Flash Page Read Register

Reset Register

The Reset Register is a Test Data Register used to reset the part during programming. It
is required to reset the part before entering programming mode.

A high value in the Reset Register corresponds to pulling the external Reset low. The
part is reset as long as there is a high value present in the Reset Register. Depending
on the Fuse settings for the clock options, the part will remain reset for a Reset Time-
Out Period (refer to

“Clock Sources” on page 34) after releasing the Reset Register. The

output from this Data Register is not latched, so the reset will take place immediately, as
shown in

Figure 122 on page 246.

Programming Enable Register

The Programming Enable register is a 16-bit register. The contents of this register is
compared to the programming enable signature, binary code 1010_0011_0111_0000.

Advertising