English
Language : 

PIC32MX795F512L-80IPT Datasheet, PDF (27/68 Pages) Microchip Technology – PIC32 Flash Programming Specification
12.0 DOWNLOADING A DATA
BLOCK
To program a block of data to the PIC32 device, it must
first be loaded into SRAM.
12.1 Without the PE
To program a block of memory without the use of the
PE, the block of data must first be written to RAM. This
method requires the programmer to transfer the actual
machine instructions with embedded (immediate) data
for writing the block of data to the devices internal RAM
memory.
FIGURE 12-1:
DOWNLOADING DATA
WITHOUT THE PE
bufAddr = RAM Buffer Address
Write 32-bit Immediate
Data to bufAddr
Increment bufAddr
No
Done
PIC32
The following steps are required to download a block of
data:
1. XferInstruction (op code).
2. Repeat Step 1 until the last instruction is
transferred to CPU.
TABLE 12-1: DOWNLOAD DATA OP
CODES
Op code
Instruction
Step 1: Initialize SRAM Base Address to 0xA0000000.
3c10a000
lui
$s0, 0xA000;
Step 2: Write the entire row of data to be programmed
into system SRAM.
3c08<DATA>
3508<DATA>
ae08<OFFSET>
lui
$t0, <DATA(31:16)>;
ori
$t0, <DATA(15:0)>;
sw
$t0, <OFFSET>($s0);
// OFFSET increments by 4
Step 3: Repeat Step 2 until one row of data has been
loaded.
12.2 With the PE
When using the PE the steps in Section 12.0 “Down-
loading a Data Block” and Section 13.0 “Initiating a
Flash Row Write” are handled in two single commands:
ROW_PROGRAM and PROGRAM.
The ROW_PROGRAM command programs a single row of
Flash data, while the PROGRAM command programs
multiple rows of Flash data. Both of these commands
are documented in Section 16.0 “The Programming
Executive”.
 2007-2013 Microchip Technology Inc.
DS61145L-page 27