Renesas H8S/2378F Informacje Techniczne Strona 104

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 109
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 103
8.3 Using the Libraries
This section describes how to use the libraries.
8.3.1 Transfer
Perform transfer operation using the procedure below:
(1) Select the programming library or erasing library to be transferred. For the programming library, set the PPVS bit
(bit 0) of the FPCS register to 1. For the erasing library, set the EPVB bit (bit 0) of the FECS register to 1.
(2) Specify the transfer destination in RAM in the FTDAR register.
(3) Set the FKEY register to H'A5 to place the chip in the transfer enable state.
(4) Set the first byte of the transfer destination in RAM to H'FF so that the transfer result can be checked.
(5) Set the SCO bit (bit 0 of the FCCS register) to 1. Insert four NOP instructions after the bit set instruction.
(6) The return value is set in the first byte in RAM. Check that the value is H'00.
8.3.2 Erasing
Perform erasing operation using the procedure below:
(1) Call the erase initial setting entry (transfer destination + 32 bytes) and set the operating frequency (ER0).
The processing result is set in the R0L register.
(2) Set the FKEY register to H'5A to place the chip in the erasing/programming enable state.
(3) Select the user boot area or user area using the FMATS register. Set H'AA for the user boot area or a value other
than H'AA, such as H'00, for the user area. Insert two NOP instructions after FMATS setting.
(4) Set the erase block number in the ER0 register and call the erasing entry (transfer destination + 16 bytes).
(5) The processing result is set in the R0L register.
8.3.3 Programming
Perform programming operation using the procedure below:
(1) Call the programming initial setting entry (transfer destination + 32 bytes) and set the operating frequency (ER0).
The processing result is set in the R0L register.
(2) Set the FKEY register to H'5A to place the chip in the erasing/programming enabled state.
(3) Select the user boot area or user area using the FMATS register. Set H'AA for the user boot area or a value other
than H'AA, such as H'00, for the user area. Insert two NOP instructions after FMATS setting.
(4) Set the address of data to be programmed in the ER0 register and the programming destination address in the ER1
register, and call the programming entry (transfer destination + 16 bytes).
(5) The processing result is set in the R0L register.
(6) At the end of programming, set H'F0F0F0F0 as the programming data storage address in the ER0 register and
H'0F0F0F0F as the programming destination address in the ER1 register, and calls the programming entry.
96
Przeglądanie stron 103
1 2 ... 99 100 101 102 103 104 105 106 107 108 109

Komentarze do niniejszej Instrukcji

Brak uwag