
ML66517 Family User’s Manual
Notes on Programming
A – 1
Notes on Programming
(1)
Setting of external interrupt control register 1 (EXI1CON)
When reset (
RES signal input, execution of the BRK instruction, overflow of the watchdog timer, opcode
trap), EXI1CON becomes 55H.
However, in the case of ICE, EXI1CON becomes 00H. When the Capture/Compare Timer or 3-phase
PWM function is to be used, be sure to write 55H to EXI1CON.
(2)
Wait cycle insertion, during SFR area access
According to the requirements for each application, one or more wait cycles need to be inserted during an
SFR area access. The number of the wait cycles is set with bits 4 to 6 in the ROMRDY.
For details on the number of wait cycles to be inserted, refer to the development tool manual for the
ML66517 family.
(3)
Capture compare register (CPCMR0, CPCMR1) value
When the capture input function is used with the number of wait cycles during an SFR access set to “1 to
7” (a wait cycle of 1 to 7 is specified by the SRDY bits of the ROMRDY register), if a capture event is
generated while CPCMR0 or CPCMR1 is being read, the value of the CPCMR0 or CPCMR1 register being
read will be changed.
However, in the case of ICE, such a change does not occur.
In cases where a capture event is generated while CPCMR0 or CPCMR1 is read, specify “capture input
disabled” (CP0E0 = CP0E1 = 0, or CP1E0 = CP1E1 = 0), then read CPCMR0 or CPCMR1.
When the capture input function is used with SRDY = 0, the value of the CPCMR0 or CPCMR1 register
being read is not changed even if a capture event is generated during reading of CPCMR0 or cPCMR1.
When the compare output function is used, if a compare match takes place while CPCMR0 or CPCMR1 is
being read, the value of the CPCMR0 or CPCMR1 register being read will be changed.
However, in the
case of ICE, such a change does not occur.
In cases where a compare match takes place while CPCMR0 or CPCMR1 is read, make the free running
counter (FRC) stop (FRRUN = 0), then read CPCMR0 or CPCMR1.
(4)
Capture register (CAPR0, CAPR1) value
When the capture input function is used with the number of wait cycles during an SFR access set to “1 to
7” (a wait cycle of 1 to 7 is specified by the SRDY bits of the ROMRDY register), if a capture event is
generated while CAPR0 or CAPR1 is being read, the value of the CAPR0 or CAPR1 register being read
will be changed.
However, in the case of ICE, such a change does not occur.
In cases where a capture event is generated while CAPR0 or CAPR1 is read, specify “capture input
disabled” (CAP0E0 = CAP0E1 = 0, or CAP1E0 = CAP1E1 = 0), then read CAPR0 or CAPR1.
When the capture input function is used with SRDY = 0, the value of the CAPR0 or CAPR1 register being
read is not changed even if a capture event is generated during reading of CAPR0 or CAPR1.