
Preliminary W78E365
Publication Release Date: April 2001
- 15 -
Revision A1
In-System Programming Control Register (CHPCON)
CHPCON (BFH)
BIT
NAME
FUNCTION
7
SWRESET
(F04KMODE)
When this bit is set to 1, and both FBOOTSL and FPROGEN are set to 1. It
will enforce microcontroller reset to initial condition just like power on reset.
This action will re-boot the microcontroller and start to normal operation. To
read this bit in logic-1 can determine that the F04KBOOT mode is running.
6
-
Reserve.
5
-
Reserve.
4
ENAUXRAM
1: Enable on-chip AUX-RAM.
0: Disable the on-chip AUX-RAM
3
0
must set to 0.
2
0
must set to 0.
1
FBOOTSL
The Program Location Select.
0: The Loader Program locates at the 64 KB APROM. 4 KB LDROM is
destination for re-programming.
1: The Loader Program locates at the 4 KB memory bank. 64 KB APROM is
destination for re-programming.
0
FPROGEN
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
programming mode, the operation of erase, program and read are acheived
when device enters idle mode.
= 0 0:disable. The on-chip flash memory is read-only. In-system
programmability is disabled.
F04KBOOT Mode (Boot From LDROM )
By default, the W78E365 boots from APROM program after a power on reset. On some occasions,
user can force the W78E365 to boot from the LDROM program via following settings. The possible
situation that you need to enter F04KBOOT mode is when the APROM program can not run properly
and device can not jump back to LDROM to execute in-system programming function. Then you can
use this F04KBOOT mode to force the W78E365 jumps to LDROM and excutes 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 APROM 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 W78E365 to enter the F04KBOOT mode. After power on of personal computer,
you can release both buttons and finish the in-system programming procedure to update the APROM
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 F04KBOOT mode.