欢迎访问ic37.com |
会员登录 免费注册
发布采购

MC68331CFC16 参数 Datasheet PDF下载

MC68331CFC16图片预览
型号: MC68331CFC16
PDF下载: 下载PDF文件 查看货源
内容描述: 用户手册 [User’s Manual]
分类和应用: 微控制器和处理器外围集成电路时钟
文件页数/大小: 254 页 / 1319 K
品牌: MOTOROLA [ MOTOROLA ]
 浏览型号MC68331CFC16的Datasheet PDF文件第158页浏览型号MC68331CFC16的Datasheet PDF文件第159页浏览型号MC68331CFC16的Datasheet PDF文件第160页浏览型号MC68331CFC16的Datasheet PDF文件第161页浏览型号MC68331CFC16的Datasheet PDF文件第163页浏览型号MC68331CFC16的Datasheet PDF文件第164页浏览型号MC68331CFC16的Datasheet PDF文件第165页浏览型号MC68331CFC16的Datasheet PDF文件第166页  
7.3.4 Test Mode  
Test mode is used during Motorola factory testing. The GPT has no dedicated test-  
mode control register; all GPT testing is done under control of the system integration  
module.  
7.4 Polled and Interrupt-Driven Operation  
Normal GPT function can be polled or interrupt-driven. All GPT functions have an as-  
sociated status flag and an associated interrupt. The timer interrupt flag registers  
(TFLG1 and TFLG2) contain status flags used for polled and interrupt-driven opera-  
tion. The timer mask registers (TMSK1 and TMSK2) contain interrupt control bits. Con-  
trol routines can monitor GPT operation by polling the status registers. When an event  
occurs, the control routine transfers control to a service routine that handles that event.  
If interrupts are enabled for an event, the GPT requests interrupt service when the  
event occurs. Using interrupts does not require continuously polling the status flags to  
see if an event has taken place. However, status flags must be cleared after an inter-  
rupt is serviced, in order to disable the interrupt request.  
7.4.1 Polled Operation  
7
When an event occurs in the GPT, that event sets a status flag in TFLG1 or TFLG2.  
The GPT sets the flags; they cannot be set by the CPU. TFLG1 and TFLG2 are 8-bit  
registers that can be accessed individually or as one 16-bit register. The registers are  
initialized to zero at reset. Table 7-1 shows status flag assignment.  
Table 7-1 GPT Status Flags  
Flag  
Mnemonic  
Register  
Assignment  
Source  
IC1F  
IC2F  
TFLG1  
TFLG1  
TFLG1  
TFLG1  
TFLG1  
TFLG1  
TFLG1  
TFLG1  
TFLG2  
TFLG2  
TFLG2  
Input Capture 1  
Input Capture 2  
IC3F  
Input Capture 3  
OC1F  
OC2F  
OC3F  
OC4F  
I4/O5F  
TOF  
Output Compare 1  
Output Compare 2  
Output Compare 3  
Output Compare 4  
Input Capture 4/Output Compare 5  
Timer Overflow  
PAOVF  
PAIF  
Pulse Accumulator Overflow  
Pulse Accumulator Input  
For each bit in TFLG1 and TFLG2 there is a corresponding bit in TMSK1 and TMSK2  
in the same bit position. If a mask bit is set and an associated event occurs, a hardware  
interrupt request is generated.  
To re-enable a status flag after an event occurs, the status flags must be cleared. Sta-  
tus registers are cleared in a particular sequence. The register must first be read for  
set flags, then zeros must be written to the flags that are to be cleared. If a new event  
occurs between the time that the register is read and the time that it is written, the as-  
sociated flag is not cleared.  
MOTOROLA  
7-4  
GENERAL-PURPOSE TIMER  
MC68331  
USER’S MANUAL