Fujitsu FR81S User Manual

Page of 2342
CHAPTER 19: BASE TIMER 
 
 
5. Operation 
 
FUJITSU SEMICONDUCTOR LIMITED 
CHAPTER
 : BASE TIMER 
FUJITSU SEMICONDUCTOR CONFIDENTIAL 
80 
5.6.6.   Application Notes 
This section explains notes when using the 16-bit PPG timer. 
Note the following when using the 16-bit PPG timer: 
   Notes on Program Setting 
 
Change the following bits of the timer control register (BTxTMCR) only after stopping the 16-bit down 
counter by resetting the CTEN bit to "0"(CTEN=0). 
  CKS2 to CKS0 bits 
  EGS1 and EGS0 bits 
  FMD2 to FMD0 bits 
  MDSE bit 
 
All registers are initialized if the FMD2 to FMD0 bits of timer control register (BTxTMCR) are set to 
"000" to select reset mode. 
 
Before the base timer function can be changed, the base timer must be reset once. Except when rewriting 
the FMD2 to FMD0 bits of timer control register (BTxTMCR) after reset, be sure to clear FMD2 to 
FMD0 bits to "000" to select the reset mode, and then select a base timer function using the FMD2 to 
FMD0 bits again. 
 
Set the 16-bit PPG timer in the following steps. 
1.  Set the 16-bit PPG timer as the base timer function by setting the FMD2 to FMD0 bits of timer control 
register (BTxTMCR) to "010"(FMD2 to FMD0=010). 
2.  Set the L width setting reload register (BTxPRLL). 
3.  Set the H width setting reload register (BTxPRLH). 
 
   Notes on Operations 
 
The value loading precedes if the count timing of the 16-bit down counter and the load timing occur at 
the same time. 
 
If a 16-bit PPG timer reactivation trigger is detected when counting ends in the one-shot mode, the value 
(cycle) of L width setting reload register (BTxPRLL) is loaded to the 16-bit down counter, which starts 
counting. 
 
A different signal (external clock, external activation trigger, wave form) I/O operation can be selected 
using the base timer I/O selection function. 
 
   Notes on Interrupts 
If an instruction to clear the interrupt request flag and an instruction to change the interrupt request flag to "1" 
occur at the same time, the flag clear instruction is ignored. The interrupt request flag is held to "1". 
MB91520 Series
MN705-00010-1v0-E
713