82
32099I–01/2012
AT32UC3L016/32/64
Figure 8-3.
Mapping from Page Buffer to Flash
Internally, the flash memory stores data in 64-bit doublewords. Therefore, the native data size of
the Page Buffer is also a 64-bit doubleword. All locations shown in
Figure 8-3 are therefore dou-
bleword locations. Since the HSB bus only has a 32-bit data width, two 32-bit HSB transfers
must be performed to write a 64-bit doubleword into the Page Buffer. The FLASHCDW has logic
to combine two 32-bit HSB transfers into a 64-bit data before writing this 64-bit data into the
Page Buffer. This logic requires the word with the low address to be written to the HSB bus
before the word with the high address. To exemplify, to write a 64-bit value to doubleword X0
residing in page X, first write a 32-bit word to the byte address pointing to address X0, thereafter
write a word to the byte address pointing to address (X0+4).
The page buffer is word-addressable and should only be written with aligned word transfers,
never with byte or halfword transfers. The page buffer can not be read.
The page buffer is also used for writes to the User page.
Page buffer write operations are performed with 4 wait states. Any accesses attempted to the
FLASHCDW on the HSB bus during these cycles will be automatically stalled.
Writing to the page buffer can only change page buffer bits from one to zero, i.e. writing
0xAAAAAAAA to a page buffer location that has the value 0x00000000 will not change the page
buffer value. The only way to change a bit from zero to one is to erase the entire page buffer with
the Clear Page Buffer command.
Z3
Z2
Z1
Z0
Z7
Z6
Z5
Z4
Z11
Z10
Z9
Z8
Z15
Z14
Z13
Z12
Z19
Z18
Z17
Z16
Z23
Z22
Z21
Z20
Z27
Z26
Z25
Z24
Z31
Z30
Z29
Z28
Y3
Y2
Y1
Y0
Y7
Y6
Y5
Y4
Y11
Y10
Y9
Y8
Y15
Y14
Y13
Y12
Y19
Y18
Y17
Y16
Y23
Y22
Y21
Y20
Y27
Y26
Y25
Y24
Y31
Y30
Y29
Y28
X3
X2
X1
X0
X7
X6
X5
X4
X11
X10
X9
X8
X15
X14
X13
X12
X19
X18
X17
X16
X23
X22
X21
X20
X27
X26
X25
X24
X31
X30
X29
X28
3
2
1
0
7
6
5
4
11
10
9
8
15
14
13
12
19
18
17
16
23
22
21
20
27
26
25
24
31
30
29
28
Page X
Page Y
Page Z
Page Buffer
64-bit data
Flash
All locations are doubleword locations