W78LE516/W78L516A
5.13 In-System Programming Control Register (CHPCON)
CHPCON (BFH)
BIT
NAME
FUNCTION
When this bit is set to 1, and both FBOOTSL and FPROGEN are set to 1. It will
7
SWRESET enforce microcontroller reset to initial condition just like power on reset. This
(F04KMODE) action will re-boot the microcontroller and start to normal operation. To read
this bit in logic-1 can determine that the H/W REBOOT mode is running.
6
-
Reserve.
5
-
Reserve.
1: Enable on-chip AUX-RAM.
4 ENAUXRAM
0: Disable the on-chip AUX-RAM
3
0
Must set to 0.
2
0
Must set to 0.
The Program Location Select.
0: The Loader Program locates at the 64 KB AP FLASH EPROM. 4KB LD
1 FBOOTSL FLASH EPROM is destination for re-programming.
1: The Loader Program locates at the 4 KB memory bank. 64KB AP FLASH
EPROM is destination for re-programming.
FLASH EPROM Programming Enable.
= 1: enable. The microcontroller enter the in-system programming mode after
entering the idle mode and wake-up from interrupt. During in-system
0 FPROGEN
programming mode, the operation of erase, program and read are
achieve when device enters idle mode.
= 0: disable. The on-chip flash memory is read-only. In-system
programmability is disabled.
H/W REBOOT Mode (Boot from LD FLASH EPROM)
By default, the W78L516 boots from AP FLASH EPROM program after a power on reset. On some
occasions, user can force the W78L516 to boot from the LD FLASH EPROM program via following
settings. The possible situation that you need to enter H/W REBOOT mode when the AP FLASH
EPROM program can not run properly and device can not jump back to LD FLASH EPROM to
execute in-system programming function. Then you can use this H/W REBOOT mode to force the
W78L516 jumps to LD FLASH EPROM and executes in-system programming procedure. When you
design your system, you may reserve the pins P2.6, P2.7 to switches or jumpers. For example in a
CD-ROM system, you can connect the P2.6 and P2.7 to PLAY and EJECT buttons on the panel.
When the AP FLASH EPROM program fails to execute the normal application program. User can
press both two buttons at the same time and then turn on the power of the personal computer to force
the W78L516 to enter the H/W REBOOT mode. After power on of personal computer, you can release
both buttons and finish the in-system programming procedure to update the AP FLASH EPROM code.
In application system design, user must take care of the P2, P3, ALE, EA and PSEN pin value at
reset to prevent from accidentally activating the programming mode or H/W REBOOT mode.
- 16 -