Renesas Renasas Single-Chip Microcomputer SH7086 Información técnica Pagina 103

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 108
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 102
Flash Development Toolkit
Method for Using the User Program Mode (SH7086 Application)
REJ06J0071-0100 /Rev.1.00 2009.2 Page 101 of 106
7.3 Using the Libraries
This section explains how to use the libraries.
(1) Transfer
Follow the procedure below to perform a transfer.
1. Select the write library or erase library to transfer. For the write library, set the PPVS bit (bit 0) of the
FPCS register to 1.
For the erase library, set the EPVB bit (bit 1) of the FPCS register to 1.
2. In the FTDAR register, specify the transfer destination address in the RAM.
3. Set the FKEY register to H’A5 to enable a transfer.
4. To allow for the transfer result to be checked, set the first byte of the transfer destination address in
the RAM to H’FF.
5. Set the VBR register to H’84000000.
6. Set the SCO bit (bit 0) of the FCCS register to 1. Insert 4 NOP instructions after the bit manipulation
instruction.
7. A return value will have been set in the first byte of RAM, so check that the value is H’00.
(2) Erase
Follow the procedure below to perform an erase.
1. Call the erase initialization entry (transfer destination + 32 bytes) and set the operating clock
frequency (R4).
The processing result is set in the R0 register.
2. Set the FKEY register to H’5A to enable an erase/write.
3. Select the user boot area or the user area using the FMATS register. For the user boot area, set H’AA
in this register; for the user area, set any value other than H’AA, e.g., H’00. Insert 2 NOP instructions
after the FMATS setting.
4. Set an erase block number in the R4 register and call the erase entry (transfer destination + 16 bytes).
5. The processing result is set in the R4 register.
(3) Write
Follow the procedure below to perform a write.
1. Call the write initialization entry (transfer destination + 32 bytes) and set the operating clock frequency
(R4).
The processing result is set in the R0 register.
2. Set the FKEY register to H’5A to enable an erase/write.
3. Select the user boot area or the user area using the FMATS register. For the user boot area, set H’AA
in this register; for the user area, set any value other than H’AA, e.g., H’00. Insert 2 NOP instructions
after the FMATS setting.
4. Set the address of the write data in the R4 register and the write destination address in the R5 register,
and then call the write entry (transfer destination + 16 bytes).
5. The processing result is set in the R4 register.
6. Call the write entry.
Vista de pagina 102
1 2 ... 98 99 100 101 102 103 104 105 106 107 108

Comentarios a estos manuales

Sin comentarios