SPRS042E
SPRS042E
DSP CONTROLLER
                                                                                                               SPRS042E – OCTOBER 1996 – REVISED NOVEMBER 2002
description
         The TMS320F240 (F240) device is a member of a family of DSP controllers based on the TMS320C2xx
         generation of 16-bit fixed-point digital signal processors (DSPs). This family is optimized for digital motor/motion
         control applications. The DSP controllers combine the enhanced TMS320 architectural design of the C2xLP
         core CPU for low-cost, high-performance processing capabilities and several advanced peripherals optimized
         for motor/motion control applications. These peripherals include the event manager module, which provides
         general-purpose timers and compare registers to generate up to 12 PWM outputs, and a dual10-bit
         analog-to-digital converter (ADC), which can perform two simultaneous conversions within 6.1 µs. See the
         functional block diagram.
                    Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of
                    Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
Table of Contents
    Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1      Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
    PQ Package (Top View) . . . . . . . . . . . . . . . . . . . . . . . . . . 4                   External Memory Interface . . . . . . . . . . . . . . . . . . . . . 38
    Terminal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5              Event-Manager (EV) Module . . . . . . . . . . . . . . . . . . . . 39
    Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . 11                     Analog-to-Digital Converter (ADC) Module . . . . . . . . 42
                                                                                                  Serial Peripheral Interface (SPI) Module . . . . . . . . . . 44
    Architectural Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 12                 Serial Communications Interface (SCI) Module . . . . 46
    System-Level Functions . . . . . . . . . . . . . . . . . . . . . . . . . 12                   Watchdog (WD) and Real-Time
      Device Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . 12                       Interrupt (RTI) Module . . . . . . . . . . . . . . . . . . . . . 48
      Peripheral Memory Map . . . . . . . . . . . . . . . . . . . . . . . . 14                   Scan-Based Emulation . . . . . . . . . . . . . . . . . . . . . . . . . . 50
      Digital I/O and Shared Pin Functions . . . . . . . . . . . . . 15                          TMS320F240 Instruction Set . . . . . . . . . . . . . . . . . . . . . 50
      Digital I/O Control Registers . . . . . . . . . . . . . . . . . . . . 17                   Development Support . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
      Device Reset and Interrupts . . . . . . . . . . . . . . . . . . . . 17                     Device and Development-Support Tool Nomenclature 58
                                                                                                 Documentation Support . . . . . . . . . . . . . . . . . . . . . . . . . 59
      Clock Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
                                                                                                 Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . 60
      Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28                 Recommended Operating Conditions . . . . . . . . . . . . . 60
    Functional Block Diagram of the                                                              Electrical Characteristics Over Recommended
         TMS320F240 DSP CPU . . . . . . . . . . . . . . . . . . . . . 29                             Operating Free-Air Temperature Range . . . . . . . . 61
    F240 DSP Core CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . 32                   Register File Compilation . . . . . . . . . . . . . . . . . . . . . . . . 96
    Internal Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36           Mechanical Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
REVISION HISTORY
                                                                                              PQ PACKAGE
                                                                                               ( TOP VIEW )
CV SS
                                                                                              DVDD
                                              DVDD
                                                                                                                                                                    DVDD
                                              CVDD
                                                                       STRB
                                      V SS
V SS
                                                                                                                                                                    V SS
                                                                       R/W
W/R
                                                                                                                    A15
                                                                                                                    A14
                                                                                                                                                        A13
                                                                                                                                                        A12
                                                                                                                                                              A10
                                                                                                                                                        A11
                                                                                              WE
                                                                       BR
                                                                                                                    DS
                                                                                              PS
                        D6
                        D5
                                      D4
                                              D3
                                              D2
                                              D1
                                              D0
A9
                                                                                                                                                                           A8
                                                                                                                                                                                A7
                                                                                                                                                                                A6
                                                                                              IS
                       17
                                   16
                                   15
                                   14
                                              13
                                              12
                                              11
                                              10
                                                         9
                                                              8
                                                              7
                                                                       6
                                                                       5
                                                                                     4
                                                                                     3
                                                                                     2
                                                                                     1
                                                                                                       132
                                                                                                       131
                                                                                                       130
                                                                                                                    129
                                                                                                                    128
                                                                                                                                         127
                                                                                                                                                        126
                                                                                                                                                        125
                                                                                                                                                        124
                                                                                                                                                              123
                                                                                                                                                              122
                                                                                                                                                              121
                                                                                                                                                                      120
                                                                                                                                                                      119
                                                                                                                                                                      118
                                                                                                                                                                                 117
        D7        18                                                                                                                                                                       116   A5
        D8        19                                                                                                                                                                       115   A4
       VSS        20                                                                                                                                                                       114   A3
      DVDD        21                                                                                                                                                                       113   VSS
         D9       22                                                                                                                                                                       112   A2
       D10        23                                                                                                                                                                       111   A1
        D11       24                                                                                                                                                                       110   A0
       D12        25                                                                                                                                                                       109   TMRCLK/IOPB7
       D13        26                                                                                                                                                                       108   TMRDIR/IOPB6
       D14        27                                                                                                                                                                       107   T3PWM/T3CMP/IOPB5
       D15        28                                                                                                                                                                       106   T2PWM/T2CMP/IOPB4
       VSS        29                                                                                                                                                                       105   T1PWM/T1CMP/IOPB3
       TCK        30                                                                                                                                                                       104   VSS
        TDI       31                                                                                                                                                                       103   DVDD
      TRST        32                                                                                                                                                                       102   PWM9/CMP9/IOPB2
       TMS        33                                                                                                                                                                       101   PWM8/CMP8/IOPB1
       TDO        34                                                                                                                                                                       100   PWM7/CMP7/IOPB0
         RS       35                                                                                                                                                                        99   PWM6/CMP6
     READY        36                                                                                                                                                                        98   PWM5/CMP5
     MP/MC        37                                                                                                                                                                        97   PWM4/CMP4
      EMU0        38                                                                                                                                                                        96   PWM3/CMP3
  EMU1/OFF        39                                                                                                                                                                        95   PWM2/CMP2
       NMI        40                                                                                                                                                                        94   PWM1/CMP1
  PORESET         41                                                                                                                                                                        93   DVDD
 RESERVED         42                                                                                                                                                                        92   VSS
  SCIRXD/IO       43                                                                                                                                                                        91   ADCIN8/IOPA3
  SCITXD/IO       44                                                                                                                                                                        90   ADCIN9/IOPA2
 SPISIMO/IO       45                                                                                                                                                                        89   ADCIN10
       VSS        46                                                                                                                                                                        88   ADCIN11
      DVDD        47                                                                                                                                                                        87   VSSA
 SPISOMI/IO       48                                                                                                                                                                        86   VREFLO
  SPICLK/IO       49                                                                                                                                                                        85   VREFHI
VCCP/WDDIS        50                                                                                                                                                                        84   VCCA
                        51
                        52
                                      53
                                      54
                                              55
                                              56
                                              57
                                                    58
                                                         59
                                                              60
                                                              61
                                                                       62
                                                                       63
                                                                       64
                                                                                         65
                                                                                              66
                                                                                              67
                                                                                              68
                                                                                              69
                                                                                              70
                                                                                                                    71
                                                                                                                    72
                                                                                                                    73
                                                                                                                                                        74
                                                                                                                                                        75
                                                                                                                                                        76
                                                                                                                                                              77
                                                                                                                                                              78
                                                                                                                                                                    79
                                                                                                                                                                    80
                                                                                                                                                                    81
                                                                                                                                                                                82
                                                                                                                                                                                83
                                                              CVDD
                                                                              DVDD
                                                    XTAL2
V SS
V SS
                                                                                                                   V SS
                                      XINT1
                       SPISTE/IO
XTAL1/CLKIN
                                                                                                            CAP3/IOPC6
                                                                                                            CAP4/IOPC7
                                                                                                                          ADCIN0/IOPA0
                                                                                                                                         ADCIN1/IOPA1
                                   XINT2/IO
                                                 XINT3/IO
                                                 OSCBYP
                                                                                            XF/IOPC2
                                                                                           BIO/IOPC3
                                                                                                                                                        ADCIN2
                                                                                                                                                        ADCIN3
                                                                                                                                                        ADCIN4
                                                                                                                                                        ADCIN5
                                                                                                                                                                  ADCIN6
                                                                                                                                                                  ADCIN7
                                                                      ADCSOC/IOPC0
                                                                                                                                                                 ADCIN15
                                                                                                                                                                 ADCIN14
                                                                                                                                                                 ADCIN13
                                                                                                                                                                                 ADCIN12
                                                                                       CLKOUT/IOPC1
                                                                                     CAP1/QEP1/IOPC4
                                                                                                       CAP2/QEP2/IOPC5
                                    PDPINT
Terminal Functions
        TERMINAL
      NAME       NO.            TYPE†                                                  DESCRIPTION
          TERMINAL
        NAME                NO.       TYPE†                                                DESCRIPTION
          TERMINAL
        NAME                NO.       TYPE†                                               DESCRIPTION
             TERMINAL
                                      TYPE†                                                DESCRIPTION
         NAME               NO.
                                        SERIAL PERIPHERAL INTERFACE (SPI) AND BIT I/O PINS
                                                 SPI slave in, master out , or general-purpose bidirectional I/O. This pin is configured as a digital
 SPISIMO/IO                 45          I/O
                                                 input by all device resets.
                                                 SPI slave out, master in, or general-purpose bidirectional I/O. This pin is configured as a digital
 SPISOMI/IO                 48          I/O
                                                 input by all device resets.
                                                 SPI clock, or general-purpose bidirectional I/O. This pin is configured as a digital input by all
 SPICLK/IO                  49          I/O
                                                 device resets.
                                                 SPI slave transmit enable (optional), or general-purpose bidirectional I/O. This pin is configured
 SPISTE/IO                  51          I/O
                                                 as a digital input by all device resets.
                                                             COMPARE SIGNALS
 PWM1/CMP1                  94
                                                 Compare or PWM outputs. The state of these pins is determined by the compare/PWM and
 PWM2/CMP2                  95
                                                 the full action control register (ACTR). CMP1–CMP6 go to the high-impedance state when un-
 PWM3/CMP3                  96
                                        O/Z      masked PDPINT goes active low.
 PWM4/CMP4                  97
                                                 After power up and PORESET is high, the PWM/CMP pins are high-impedance once the
 PWM5/CMP5                  98
                                                 internal clock is stable (see Figure 31 and Figure 32).
 PWM6/CMP6                  99
                                               INTERRUPT AND MISCELLANEOUS SIGNALS
                                                 Reset input. RS causes the TMS320F240 to terminate execution and sets PC = 0. When RS
 RS                         35          I/O      is brought to a high level, execution begins at location zero of program memory. RS affects (or
                                                 sets to zero) various registers and status bits.
                                                 MP/MC (microprocessor/microcomputer) select. If MP/MC is low, internal program memory is
 MP/MC                      37            I
                                                 selected. If it is high, external program memory is selected.
                                                 Nonmaskable interrupt. When NMI is activated, the device is interrupted regardless of the state
 NMI                        40            I
                                                 of the INTM bit of the status register. NMI has programmable polarity.
                                                 Power-on reset. PORESET causes the TMS320F240 to terminate execution and sets PC = 0.
                                                 When PORESET is brought to a high level, execution begins at location zero of program
 PORESET                    41            I
                                                 memory. PORESET affects (or sets to zero) the same registers and status bits as RS. In addi-
                                                 tion, PORESET initializes the PLL control registers.
 XINT1                      53            I      External user interrupt no. 1
                                                 External user interrupt no. 2. General-purpose bidirectional I/O. This pin is configured as a
 XINT2/IO                   54          I/O
                                                 digital input by all device resets.
                                                 External user interrupt no. 3. General-purpose bidirectional I/O. This pin is configured as a
 XINT3/IO                   55          I/O
                                                 digital input by all device resets.
                                                 Maskable power-drive protection interrupt. If PDPINT is unmasked and it goes active low, the
 PDPINT                     52            I
                                                 timer compare outputs immediately go to the high-impedance state.
                                                              CLOCK SIGNALS
                                                 PLL oscillator output. XTAL2 is tied to one side of a reference crystal when the device is in PLL
                                                 mode (CLKMD[1:0] = 1x, CKCR0.7 – 6). This pin can be left unconnected in oscillator bypass
 XTAL2                      57           O
                                                 mode (OSCBYP ≤ VIL). This pin goes in the high-impedance state when EMU1/OFF is active
                                                 low.
                                                 PLL oscillator input. XTAL1/CLKIN is tied to one side of a reference crystal in PLL mode
 XTAL1/CLKIN                58           I/Z     (CLKMD[1:0] = 1x, CKCR0.7 – 6), or is connected to an external clock source in oscillator
                                                 bypass mode (OSCBYP ≤ VIL).
 OSCBYP                        56         I      Bypass on-chip oscillator if low
† I = input, O = output, Z = high impedance
         TERMINAL
       NAME       NO.           TYPE†                                                 DESCRIPTION
                                                              SUPPLY SIGNALS
 CVSS                 8            I      Digital core logic ground reference
                      3
                      14
                      20
                      29
                      46
                      59
 VSS                               I      Digital logic ground reference
                      61
                      71
                      92
                     104
                     113
                     120
         TERMINAL
                               TYPE†                                                   DESCRIPTION
     NAME            NO.
                                                        TEST SIGNALS (CONTINUED)
                                          JTAG test reset with internal pulldown. TRST, when driven high, gives the scan system control of the
 TRST                 32           I      operations of the device. If this signal is not connected or driven low, the device operates in its function-
                                          al mode, and the test reset signals are ignored.
                                          Emulator pin 0. When TRST is driven low, EMU0 must be high for activation of the /OFF condition.
 EMU0                 38         I/O/Z    When TRST is driven high, EMU0 is used as an interrupt to or from the emulator system and is defined
                                          as input/output through the scan.
                                          Emulator pin 1/disable all outputs. When TRST is driven high, EMU1/OFF is used as an interrupt to
                                          or from the emulator system and is defined as input/output through JTAG scan. When TRST is driven
                                          low, this pin is configured as OFF. When EMU1/OFF is active low, it puts all output drivers in the
 EMU1/OFF             39         I/O/Z
                                          high-impedance state. OFF is used exclusively for testing and emulation purposes (not for
                                          multiprocessing applications); therefore, for OFF condition, the following conditions apply:
                                          TRST = low, EMU0 = high, EMU1/OFF = low
 RESERVED               42           I     Reserved for test. This pin has an internal pulldown and must be left unconnected.
† I = input, O = output, Z = high impedance
Á Á ÁÁ Á Á Test/ 7
                    ÁÁÁÁÁÁ    Á ÁÁÁÁÁ
                            ÁÁÁÁÁ Á
                                                                                                           Emulation
                    ÁÁÁÁÁÁ
                       ÁÁ ÁÁÁÁÁ
                              Á ÁÁÁÁÁ
                                  Á     ÁÁ        ÁÁ
                                    EEPROM                B0                  B1/B2
                                                                                                            External         41
                       ÁÁ     Á   Á
                                                                                                             Memory
                    Program Bus                                                                             Interface
                 Á       Á
                ÁÁÁÁ
                 Á    ÁÁÁÁÁ             Á Á
  Á           ÁÁÁÁÁ   ÁÁÁÁÁ             Á Á
       Memory                                                                                               Software
                                                                                   C2xx
       Control                                                                                             Wait-State
  Á           ÁÁÁÁÁÁ  ÁÁÁÁÁ   Á   Á
                                    Instruction                                    CPU                     Generation
                                      Register
  Á             ÁÁÁÁÁÁÁÁÁ Á       Á         ÁÁÁÁÁ
      Interrupts      Program
                ÁÁÁÁ
                 Á ÁÁÁÁÁ                    ÁÁÁÁÁ
                                      ARAU             Shifter            Multiplier
                      ÁÁÁÁÁ                 ÁÁÁÁÁ Á Á
                                      Status/                                                               General-
                                                                                                                             4
                      ÁÁÁÁÁ             Á Á ÁÁÁÁÁ
                                      Control           ALU                 TREG                            Purpose
                                     Registers                                                               Timers
                   ÁÁÁÁÁÁÁ
                      ÁÁÁÁÁ             Á Á ÁÁÁÁÁ
                                            ÁÁÁÁÁ Á Á
                                     Auxiliary
                                     Registers      Accumulator             PREG                                             9
                      ÁÁÁÁÁ                 ÁÁÁÁÁ
                                                                                                           Compare
                                     Memory-                                                                Units
                      ÁÁÁÁÁ
                      ÁÁÁÁÁ
                                      Mapped
                                            ÁÁÁÁÁ      Output              Product
                         Á    Á   Á         ÁÁÁÁÁ Á Á
                                     Registers         Shifter             Shifter
                                                                                                            Capture/
                                                                                                                             4
                         Á    Á   Á         ÁÁÁÁÁ
                                                                                                           Quadrature
                                                                                                            Encoder
                                            ÁÁÁÁÁ
                                              Á                                                            Pulse (QEP)
Á Á PDPINT
                    Á           Á     ÁÁ
                         ÁÁÁÁ         ÁÁ
                                                                                              4
                                                                                                   Interrupts
                 ÁÁÁ                  Á
                                   Clock                   System-Interface                   20
                                                                                                   Digital Input/Output
                               3   Module                      Module
                       Á        Á
                                                                                                   Reset
Á Á Peripheral Bus
                       ÁÁ     Á     Á       Á
                       ÁÁ ÁÁÁÁÁ
                              Á ÁÁÁÁÁÁÁ
                            ÁÁÁÁÁ   Á ÁÁÁÁÁ
                                ÁÁÁÁÁÁÁ     Á
                                        ÁÁÁÁÁ
                                   Dual 10-Bit
                            ÁÁÁÁÁ
                                ÁÁÁÁÁÁÁ ÁÁÁÁÁ
                                                        Serial-                Serial-
                                     Analog-          Peripheral           Communications          Watchdog
                       ÁÁ   ÁÁÁÁÁ
                              Á ÁÁÁÁÁÁÁ
                                    Á   ÁÁÁÁÁ
                                    to-Digital         Interface              Interface             Timer
                                   Converter
                       ÁÁ     Á     Á
                       ÁÁ     Á     Á
                                            16                  4                      2
description (continued)
architectural overview
     The functional block diagram provides a high-level description of each component in the F240 DSP controller.
     The TMS320F240 device is composed of three main functional units: a C2xx DSP core, internal memory, and
     peripherals. In addition to these three functional units, there are several system-level features of the F240 that
     are distributed. These system features include the memory map, device reset, interrupts, digital input / output
     (I / O), clock generation, and low-power operation.
system-level functions
device memory map
     The TMS320F240 implements three separate address spaces for program memory, data memory, and I / O.
     Each space accommodates a total of 64K 16-bit words. Within the 64K words of data space, the 256 to
     32K words at the top of the address range can be defined to be external global memory in increments of powers
     of two, as specified by the contents of the global memory allocation register (GREG). Access to global memory
     is arbitrated using the global memory bus request (BR) signal.
     On the F240, the first 96 (0 – 5Fh) data memory locations are either allocated for memory-mapped registers or
     are reserved. This memory-mapped register space contains various control and status registers including those
     for the CPU.
     All the on-chip peripherals of the F240 device are mapped into data memory space. Access to these registers
     is made by the CPU instructions addressing their data-memory locations. Figure 1 shows the memory map.
External Reserved
In Out
                                                   Primary
                                                  Function         Pin
                                                  or I/O Pin
reset (continued)
     The occurrence of a reset condition causes the TMS320F240 to terminate program execution and affects
     various registers and status bits. During a reset, RAM contents remain unchanged, and all control bits that are
     affected by a reset are initialized to their reset state. In the case of a power-on reset, the PLL control registers
     are initialized to zero. The program needs to recognize power-on resets and configure the PLL for correct
     operation.
     After a reset, the program can check the power-on reset flag (PORST flag, SYSSR.15), the illegal address flag
     (ILLADR flag, SYSSR.12), the software reset flag (SWRST flag, SYSSR.10), and the watchdog reset flag
     (WDRST flag, SYSSR.9) to determine the source of the reset. A reset does not clear these flags.
     RS and PORESET must be held low until the clock signal is valid and VCC is within the operating range. In
     addition, PORESET must be driven low when VCC drops below the minimum operating voltage.
hardware-generated interrupts
     All the hardware interrupt lines of the DSP core are given a priority rank from 1 to 10 (1 being highest). When
     more than one of these hardware interrupts is pending acknowledgment, the interrupt of highest rank gets
     acknowledged first. The others are acknowledged in order after that. Of those ten lines, six are for maskable
     interrupt lines (INT1–INT6) and one is for the nonmaskable interrupt (NMI) line. INT1–INT6 and NMI have the
     priorities shown in Table 5.
     The inputs to these lines are controlled by the system module and the event manager as summarized in Table 6
     and shown in Figure 5.
               Table 6. Interrupt Lines Controlled by the System Module and Event Manager
                                       PERIPHERAL                    INTERRUPT LINES
                                                                  INT1
                                      System Module               INT5             NMI
                                                                  INT6
                                                                  INT2
                                       Event Manager              INT3
                                                                  INT4
DSP Core
              Address
              Lines 5–1          IACK        INT6 INT5 INT4 INT3 INT2 INT1 NMI
NC NC NC
              Address            IACK         INT6 INT5 INT4 INT3 INT2 INT1 NMI              INTC INTB INTA
              Lines 5–1
     At the level of the system module and the event manager, each of the maskable interrupt lines (INT1–INT6) is
     connected to multiple maskable interrupt sources. Sources connected to interrupt line INT1 are called Level 1
     interrupts; sources connected to interrupt line INT2 are called Level 2 interrupts; and so on. For each interrupt
     line, the multiple sources also have a set priority ranking. The source with the highest priority has its interrupt
     request responded to by the DSP core first.
     Figure 6 shows the sources and priority ranking for the interrupts controlled by the system module. For each
     interrupt chain, the interrupt source of highest priority is at the top. Priority decreases from the top of the chain
     to the bottom. Figure 7 shows the interrupt sources and priority ranking for the event manager interrupts.
System Module
IRQ6 IACK6 IRQ5 IACK5 IRQ4 IACK4 IRQ3 IACK3 IRQ2 IACK2 IRQ1 IACK1 IRQ_NMI IACK_NMI
                                                                NC        NC        NC          NC    NC          NC
                                                                                                                                   System-Module
                                                SPI                                                                                                               System-Module
             Dual ADC                                                                                                             External Interrupt
                                             Interrupt                                                                                                           External Interrupt
             Interrupt                                                                                                                  XINT1
                                          (low priority)                                                                                                               NMI
                                                                                                                                    (high priority)
           System-Module                                                                                                                  SCI
          External Interrupt                                                                                                         Transmitter
               XINT3                                                                                                                   Interrupt
            (low priority)                                                                                                          (high priority)
                                                                                                                                          SPI
                                                                                                                                       Interrupt
                                                                                                                                    (high priority)
                                                                                                                                          SCI
                                                                                                                                       Receiver
                                                                                                                                       Interrupt
                                                                                                                                    (high priority)
                                                                                                                                     Watchdog
                                                                                                                                       Timer
                                                                                                                                     Interrupt
                                                                          Legend:
                                                                                         NC = No connection
                                                                                         IACK = interrupt acknowledge
                                                                                         IRQ = interrupt request
                                                                                     Timer 2                       Power-Drive
                                    Capture 1
                                                                                     Period                         Protection
                                    Interrupt
                                                                                    Interrupt                        Interrupt
                                                                                     Timer 2
                                    Capture 2                                                                         Compare1
                                                                                    Compare
                                    Interrupt                                                                          Interrupt
                                                                                    Interrupt
                                                                                      Timer 2                         Compare 2
                                    Capture 3
                                                                                    Underflow                          Interrupt
                                    Interrupt
                                                                                     Interrupt
                                                                                     Timer 2
                                    Capture 4                                                                         Compare 3
                                                                                    Overflow
                                    Interrupt                                                                          Interrupt
                                                                                    Interrupt
                                                                                     Timer 3                            Simple-
                                                                                     Period                           Compare 1
                                                                                    Interrupt                          Interrupt
                                                                                      Timer 3                           Simple-
                                                                                    Underflow                         Compare 3
                                                                                     Interrupt                         Interrupt
                                                                                     Timer 3                            Timer 1
                                                                                    Overflow                            Period
                                                                                    Interrupt                          Interrupt
                                                                                                                       Timer 1
                                                                                                                      Compare
                                                                                                                      Interrupt
                                                                                                                        Timer 1
                                                                                                                      Underflow
                                                                                                                       Interrupt
                                                                                                                       Timer 1
                                                                                                                      Overflow
                                                                                                                      Interrupt
external interrupts
     The F240 has five external interrupts. These interrupts include:
     D XINT1. Type A interrupt. The XINT1 control register (at 7070h) provides control and status for this interrupt.
         XINT1 can be used as a high-priority (Level 1) or low-priority (Level 6) maskable interrupt or as a
         general-purpose input pin. XINT1 can also be programmed to trigger an interrupt on either the rising or the
         falling edge.
     D NMI. Type A interrupt. The NMI control register (at 7072h) provides control and status for this interrupt. NMI
         is a nonmaskable external interrupt or a general-purpose input pin. NMI can also be programmed to trigger
         an interrupt on either the rising or the falling edge.
     D XINT2. Type C interrupt. The XINT2 control register (at 7078h) provides control and status for this interrupt.
         XINT2 can be used as a high-priority (Level 1) or low-priority (Level 6) maskable interrupt or a
         general-purpose I/O pin. XINT2 can also be programmed to trigger an interrupt on either the rising or the
         falling edge.
     D XINT3. Type C interrupt. The XINT3 control register (at 707Ah) provides control and status for this interrupt.
         XINT3 can be used as a high-priority (Level 1) or low-priority (Level 6) maskable interrupt or as a
         general-purpose I/O pin. XINT3 can also be programmed to trigger an interrupt on either the rising or the
         falling edge.
     D PDPINT. This interrupt is provided for safe operation of the power converter and motor drive. This maskable
         interrupt can put the timers and PWM output pins in the high-impedance state and inform the CPU in case
         of motor drive abnormalities such as overvoltage, overcurrent, and excessive temperature rise. PDPINT is
         a Level 2 interrupt.
clock generation
       The TMS320F240 has an on-chip, PLL-based clock module. This module provides all the necessary clocking
       signals for the device, as well as control for low-power mode entry. The only external component necessary for
       this module is an external fundamental crystal, or oscillator.
       The PLL-based clock module provides two basic modes of operation: oscillator mode and clock-in mode.
       D oscillator mode
              This mode allows the use of a 4-, 6-, or 8-MHz external reference crystal to provide the time base to the
              device. The internal oscillator circuitry is initialized by software to select the desired CPUCLK frequency,
              which can be the input clock frequency, the input clock frequency divided by 2 (default), or a clock frequency
              determined by the PLL.
       D Clock-in mode
              This mode allows the internal crystal oscillator circuitry to be bypassed. The device clocks are generated
              from an external clock source input on the XTAL1/CLKIN pin. The device can be configured by software
              to operate on the input clock frequency, the input clock frequency divided by 2, or a clock frequency
              determined by the PLL.
       The F240 runs on two clock frequencies: the CPU clock (CPUCLK) frequency, and the system clock (SYSCLK)
       frequency. The CPU, memories, external memory interface, and event manager run at the CPUCLK frequency.
       All other peripherals run at the SYSCLK frequency. The CPUCLK runs at 2x or 4x the frequency of the SYSCLK;
       for example, for 2x, CPUCLK = 20 MHz and SYSCLK = 10 MHz. There is also a clock for the watchdog timer,
       WDCLK. This clock has a nominal frequency of 16384 Hz (214 Hz) when XTAL1/CLKIN is a power of two or
       a sum of two powers of two; for example, 4194304 Hz (222 Hz), 6291456 (222 + 221 Hz), or 8388608 Hz
       (223 Hz).
       The clock module includes three external pins:
       1. XTAL1/CLKIN             clock source/crystal input
       2. XTAL2                   output to crystal
       3. OSCBYP                  oscillator bypass
       For the external pins, if OSCBYP ≥ VIH, then the oscillator is enabled and if OSCBYP ≤ VIL, then the oscillator
       is bypassed and the device is in clock-in mode. In clock-in mode, an external TTL clock must be applied to the
       XTAL1/CLKIN pin. The XTAL2 pin can be left unconnected.
                                                                  ÁÁÁÁÁ
                                                   ÁÁ             ÁÁÁÁÁ
    OSCBYP
              ÁÁÁÁ                                 ÁÁ             ÁÁÁÁÁ
                                                    Div 2
                                                         ÁÁÁÁÁÁÁ
                                                                                                         (CKCR0.7–6)
                                                         ÁÁÁÁÁÁÁ
                                                                                Feedback
                                                                                  Divider
                                                         ÁÁÁÁÁÁÁ
                                                                              Div 1, 2, 3, 4, 5,          PLL multiply ratio
                                                                                    or 9                    (CKCR1.2–0)
                                                  PLL
              ÁÁÁÁÁÁÁÁÁ
                                 Clock Frequency and PLL Multiply Bits (CKCR1.7–4)
              ÁÁÁÁÁÁÁÁÁ
                      1-MHz Clock Prescaler
                                                                       ÁÁÁÁÁÁÁÁÁ                                    ACLK
                                                                       ÁÁÁÁÁÁÁÁÁ
                                                                           Watchdog Clock Prescaler                 WDCLK
              ÁÁÁÁÁÁÁÁÁÁ
              ÁÁÁÁÁÁÁÁÁÁ
                         Prescale Bit (CKCR0.0)
low-power modes
      The TMS320F240 has four low-power modes (IDLE 1, IDLE 2, PLL power down, and oscillator power down).
      The low-power modes reduce the operating power by reducing or stopping the activity of various modules (by
      stopping their clocks). The two PLLPM bits of the clock module control register, CKCR0, select which of the
      low-power modes the device enters when executing an IDLE instruction. Reset or an unmasked interrupt from
      any source causes the device to exit from IDLE 1 low-power mode. A real-time interrupt from the watchdog timer
      module causes the device to exit from all low-power modes except oscillator power down. This is a wake-up
      interrupt. When enabled, reset or any of the four external interrupts (NMI, XINT1, XINT2, or XINT3) causes the
      device to exit from any of the low-power modes (IDLE 1, IDLE 2, PLL power down, and oscillator power down).
      The external interrupts are all wake-up interrupts. The maskable external interrupts (XINT1, XINT2, and XINT3)
      must be enabled individually and globally to bring the device out of a low-power mode properly. It is, therefore,
      important to ensure that the desired low-power-mode exit path is enabled before entering a low-power mode.
      Figure 9 shows the wake-up sequence from a power down. Table 9 summarizes the low-power modes.
                                     Wake-up
                                                                                                             Wake-up Signal
                                      Signal
               Watchdog Timer                                                                                   to CPU
                     and
              Real-Time Interrupt
                    Module
NMI
XINT1
XINT2
                                                    XINT3
                                                    External-Interrupt Logic
                                                                                     Reset
                                                                                     Signal
Reset Logic
System Module
                                            IS
                                           DS
                                           PS
                                                                                                                     MUX
                                      R/W                                          X1
                                     STRB                                          CLKOUT1
                                                                                                                                                                                                                     Program Bus
                                    READY                                          CLKIN/X2                          NPAR
                                                                                                                                                                                                    Data Bus
                                       BR
                                       XF
                                                               Control
                                                                                         16               PC         PAR        MSTACK                     MUX
                                                                                   W/R
                                           RS                                      WE
                                                                                   NMI                                                                  Stack 8 × 16
                                     MP/MC
                                  XINT[1–3]
                                                     3
                                                                                                       FLASH EEPROM
                                                                                                                                                                 Program Control
                                                                                                                                                                    (PCTRL)
                                                                                   16
                                                                         MUX
                 A15–A0
                                                    16                                                                                                                  16
                                                                                   16
                                                                                                                16
                                                                                                                                                                                  16
                                                                         MUX
                 D15–D0
                                                    16
                                                                                                     16                                                                                Data Bus
                                                                                   16           16
                                       Data Bus
                                                                                                               16
                                                                                                                                                           16
                                                                               3                                                        9        7                       16
                                                                                                                                                 LSB                                            16              16
                                                                                                          AR0(16)                                from
                                                                                                          AR1(16)                DP(9)           IR                          16
                                                                                                                                                                                                MUX
                                                                                                          AR2(16)
                                                                                                                                                           MUX                                                 16
                                                                   ARP(3)                                 AR3(16)
                                                                                    3                                                   9
                                                                               3                          AR4(16)
                                                                                                          AR5(16)                                                                  TREG0(16)
                                                                   ARB(3)                                 AR6(16)
                                                                                                                                                                                       Multiplier
                                                                                                          AR7(16)
PSCALE (–6,ā0,ā1,ā4)
32 32
                                                                                                                     16
                                                                                                                                                                                        MUX
                                                                                                          ARAU(16)           MUX
                                                                                                                                                                                              32
                                                                                                                                                                         CALU(32)
                                                                                                                                                      32
                                      16          Memory Map
                                                   Register
                                                                                                  MUX                        MUX                                                       32
                                                   IMR (16)
                                                   IFR (16)
                                                                                               Data/Prog                     Data
                                                                                                                                                                                                                     Program Bus
                                                                                                                                                        C ACCH(16)           ACCL(16)
                                                  GREG (16)                                     DARAM                      DARAM
                                                                                              B0 (256 × 16)               B2 (32 × 16)                                                 32
                                                                                                                       B1 (256 × 16)
                                                                                                                                                                       OSCALE (0–7)
                                                                                                  MUX                              16
                                                                                                                                                  16                                   16
                                                                                                  16
                    Table 10. Legend for the F240 Internal Hardware Functional Block Diagram
 SYMBOL             NAME                                                          DESCRIPTION
                                  32-bit register that stores the results and provides input for subsequent CALU operations. Also includes shift
 ACC        Accumulator
                                  and rotate capabilities
            Auxiliary Register    An unsigned, 16-bit arithmetic unit used to calculate indirect addresses using the auxiliary registers as inputs
 ARAU
            Arithmetic Unit       and outputs
                                  These 16-bit registers are used as pointers to anywhere within the data space address range. They are
 AUX        Auxiliary Registers
                                  operated upon by the ARAU and are selected by the auxiliary register pointer (ARP). AR0 can also be used
 REGS       0–7
                                  as an index value for AR updates of more than one and as a compare value to AR.
                                  BR is asserted during access of the external global data memory space. READY is asserted to the device
            Bus Request
 BR                               when the global data memory is available for the bus transaction. BR can be used to extend the data memory
            Signal
                                  address space by up to 32K words.
                                  Register carry output from CALU. C is fed back into the CALU for extended arithmetic operation. The C bit
 C          Carry                 resides in status register 1 (ST1), and can be tested in conditional instructions. C is also used in accumulator
                                  shifts and rotates.
                                  32-bit-wide main arithmetic logic unit for the TMS320C2xx core. The CALU executes 32-bit operations in a
            Central Arithmetic
 CALU                             single machine cycle. CALU operates on data coming from ISCALE or PSCALE with data from ACC, and
            Logic Unit
                                  provides status results to PCTRL.
                                  If the on-chip RAM configuration control bit (CNF) is set to 0, the reconfigurable data dual-access RAM
                                  (DARAM) block B0 is mapped to data space; otherwise, B0 is mapped to program space. Blocks B1 and B2
 DARAM      Dual Access RAM
                                  are mapped to data memory space only, at addresses 0300–03FF and 0060–007F, respectively. Blocks 0
                                  and 1 contain 256 words, while Block 2 contains 32 words.
            Data Memory           The 9-bit DP register is concatenated with the seven LSBs of an instruction word to form a direct memory
 DP
            Page Pointer          address of 16 bits. DP can be modified by the LST and LDP instructions.
            Global Memory
 GREG       Allocation            GREG specifies the size of the global data memory space.
            Register
            Interrupt Mask
 IMR                              IMR individually masks or enables the seven interrupts.
            Register
            Interrupt Flag        The 7-bit IFR indicates that the TMS320C2xx has latched an interrupt from one of the seven maskable
 IFR
            Register              interrupts.
 INT#       Interrupt Traps       A total of 32 interrupts by way of hardware and/or software are available.
            Input Data-Scaling    16 to 32-bit barrel left-shifter. ISCALE shifts incoming 16-bit data 0 to16 positions left, relative to the 32-bit
 ISCALE
            Shifter               output within the fetch cycle; therefore, no cycle overhead is required for input scaling operations.
                                  16 × 16-bit multiplier to a 32-bit product. MPY executes multiplication in a single cycle. MPY operates either
 MPY        Multiplier
                                  signed or unsigned 2s-complement arithmetic multiply.
                                  MSTACK provides temporary storage for the address of the next instruction to be fetched when program
 MSTACK     Micro Stack
                                  address-generation logic is used to generate sequential addresses in data space.
 MUX        Multiplexer           Multiplexes buses to a common input
            Next Program
 NPAR                             NPAR holds the program address to be driven out on the PAB on the next cycle.
            Address Register
            Output                16 to 32-bit barrel left-shifter. OSCALE shifts the 32-bit accumulator output 0 to 7 bits left for quantization
 OSCALE     Data-Scaling          management and outputs either the 16-bit high- or low-half of the shifted 32-bit data to the Data-Write Data
            Shifter               Bus (DWEB).
            Program Address       PAR holds the address currently being driven on PAB for as many cycles as it takes to complete all memory
 PAR
            Register              operations scheduled for the current bus cycle.
                                  PC increments the value from NPAR to provide sequential addresses for instruction-fetching and sequential
 PC         Program Counter
                                  data-transfer operations.
            Program
 PCTRL                            PCTRL decodes instruction, manages the pipeline, stores status, and decodes conditional operations.
            Controller
         Table 10. Legend for the F240 Internal Hardware Functional Block Diagram (Continued)
SYMBOL            NAME                                                        DESCRIPTION
PREG      Product Register   32-bit register holds results of 16 × 16 multiply.
                             0-, 1- or 4-bit left shift, or 6-bit right shift of multiplier product. The left-shift options are used to manage the
                             additional sign bits resulting from the 2s-complement multiply. The right-shift option is used to scale down
          Product-Scaling
PSCALE                       the number to manage overflow of product accumulation in the CALU. PSCALE resides in the path from the
          Shifter
                             32-bit product shifter and from either the CALU or the Data-Write Data Bus (DWEB), and requires no cycle
                             overhead.
                             STACK is a block of memory used for storing return addresses for subroutines and interrupt-service
STACK     Stack
                             routines, or for storing data. The C20x stack is 16-bit wide and eight-level deep.
          Temporary          16-bit register holds one of the operands for the multiply operations. TREG holds the dynamic shift count
TREG
          Register           for the LACT, ADDT, and SUBT instructions. TREG holds the dynamic bit position for the BITT instruction.
             15                    13     12       11      10        9         8       7        6        5       4        3        2         1        0
     ST0               ARP               OV      OVM        1      INTM                                         DP
             15                    13     12       11      10        9         8       7        6        5       4        3        2     1                0
     ST1               ARB               CNF      TC      SXM        C         1       1        1        1      XF        1        1             PM
multiplier (continued)
     The product can be shifted one bit to compensate for the extra sign bit gained in multiplying two 16-bit
     2s-complement numbers (MPY instruction). A four-bit shift is used in conjunction with the MPY instruction with
     a short immediate value (13 bits or less) to eliminate the four extra sign bits gained in multiplying a 16-bit number
     by a 13-bit number. Finally, the output of PREG can be right-shifted 6 bits to enable the execution of up to
     128 consecutive multiply/accumulates without the possibility of overflow.
     The LT (load TREG) instruction normally loads TREG to provide one operand (from the data bus), and the MPY
     (multiply) instruction provides the second operand (also from the data bus). A multiplication also can be
     performed with a 13-bit immediate operand when using the MPY instruction. Then a product is obtained every
     two cycles. When the code is executing multiple multiplies and product sums, the CPU supports the pipelining
     of the TREG load operations with CALU operations using the previous product. The pipeline operations that
     run in parallel with loading the TREG include: load ACC with PREG (LTP); add PREG to ACC (LTA); add PREG
     to ACC and shift TREG input data (DMOV) to next address in data memory (LTD); and subtract PREG from ACC
     (LTS).
     Two multiply/accumulate instructions (MAC and MACD) fully utilize the computational bandwidth of the
     multiplier, allowing both operands to be processed simultaneously. The data for these operations can be
     transferred to the multiplier each cycle by way of the program and data buses. This facilitates single-cycle
     multiply/accumulates when used with the repeat (RPT) instruction. In these instructions, the coefficient
     addresses are generated by program address generation (PAGEN) logic, while the data addresses are
     generated by data address generation (DAGEN) logic. This allows the repeated instruction to access the values
     from the coefficient table sequentially and step through the data in any of the indirect addressing modes.
     The MACD instruction, when repeated, supports filter constructs (weighted running averages) so that as the
     sum-of-products is executed, the sample data is shifted in memory to make room for the next sample and to
     throw away the oldest sample.
     The MPYU instruction performs an unsigned multiplication, which greatly facilitates extended-precision
     arithmetic operations. The unsigned contents of TREG are multiplied by the unsigned contents of the addressed
     data memory location, with the result placed in PREG. This process allows the operands of greater than 16 bits
     to be broken down into 16-bit words and processed separately to generate products of greater than 32 bits. The
     SQRA (square/add) and SQRS (square/subtract) instructions pass the same value to both inputs of the
     multiplier for squaring a data memory value.
     After the multiplication of two 16-bit numbers, the 32-bit product is loaded into the 32-bit product register
     (PREG). The product from PREG can be transferred to the CALU or to data memory by way of the SPH (store
     product high) and SPL (store product low). Note: the transfer of PREG to either the CALU or data bus passes
     through the PSCALE shifter, and therefore is affected by the product shift mode defined by PM. This is important
     when saving PREG in an interrupt-service-routine context save as the PSCALE shift effects cannot be modeled
     in the restore operation. PREG can be cleared by executing the MPY #0 instruction. The product register can
     be restored by loading the saved low half into TREG and executing a MPY #1 instruction. The high half, then,
     is loaded using the LPH instruction.
peripherals
     The integrated peripherals of the TMS320F240 are described in the following subsections:
     D    External memory interface
     D    Event manager (EV)
     D    Dual analog-to-digital converter (ADC)
     D    Serial peripheral interface (SPI)
     D    Serial communications interface (SCI)
     D    Watchdog timer (WD)
external memory interface
     The TMS320F240 can address up to 64K words × 16 bits of memory or registers in each of the program, data,
     and I/O spaces. On-chip memory, when enabled, removes some of this off-chip range. In data space, the high
     32K words can be mapped dynamically as either local or global using the GREG register. A data-memory
     access mapped as global asserts BR low (with timing similar to the address bus).
     The CPU of the TMS320F240 schedules a program fetch, data read, and data write on the same machine cycle.
     This is because, from on-chip memory, the CPU can execute all three of these operations in the same cycle.
     However, the external interface multiplexes the internal buses to one address and one data bus. The external
     interface sequences these operations to complete the data write first, then the data read, and finally the program
     read.
     The F240 supports a wide range of system interfacing requirements. Program, data, and I/O address spaces
     provide interface to memory and I/O, maximizing system throughput. The full 16-bit address and data bus, along
     with the PS, DS, and IS space-select signals allow addressing of 64K 16-bit words in program and I/O space.
     Due to the on-chip peripherals, external data space is addressable to 32K 16-bit words.
     I/O design is simplified by having I/O treated the same way as memory. I/O devices are mapped into the I/O
     address space using the processor’s external address and data buses in the same manner as memory-mapped
     devices.
     The F240 external parallel interface provides control signals to facilitate interfacing to the device. The R/W
     output signal is provided to indicate whether the current cycle is a read or a write. The STRB output signal
     provides a timing reference for all external cycles.
     Interface to memory and I/O devices of varying speeds is accomplished by using the READY input. When
     transactions are made with slower devices, the F240 processor waits until the other device completes its
     function and signals the processor by way of the READY input. Once a ready indication is provided from the
     external device, execution continues. On the F240 device, the READY input must be driven (active high) to
     complete reads or writes to internal data I/O-memory-mapped registers and all external addresses.
     The bus request (BR) signal is used in conjunction with the other F240 interface signals to arbitrate external
     global-memory accesses. Global memory is external data-memory space in which the BR signal is asserted
     at the beginning of the access. When an external global-memory device receives the bus request, it responds
     by asserting the ready signal after the global-memory access is arbitrated and the global access is completed.
     The TMS320F240 supports zero-wait-state reads on the external interface. However, to avoid bus conflicts,
     writes take two cycles. This allows the F240 to buffer the transition of the data bus from input to output (or output
     to input) by a half cycle. In most systems, TMS320F240 ratio of reads to writes is significantly large to minimize
     the overhead of the extra cycle on writes.
     Wait states can be generated when accessing slower external resources. The wait states operate on
     machine-cycle boundaries and are initiated either by using the ready signal or using the software wait-state
     generator. Ready can be used to generate any number of wait states.
                       DSP core
            Data bus       ADDR bus       RESET        INT2, 3, 4
                 16                 16                     3
                           16                                           2             TMRCLK
                                   EV control registers                               TMRDIR
                                    and control logic                                 ADC start
                Internal clock
                           16                                               Output           T1PWM / T1CMP
                                  GP timer 1 compare
                                                                             logic
                                          16
                           16
                                      GP timer 1
16 16
                                          16                                                                                       PWM1 / CMP1
                           16                                       3       SVPWM        3         Dead           3       Output
                                   Full compare units                        state                 band                    logic
                                                                            machine                units                           PWM6 / CMP6
                           16
                                      GP timer 2
                                                     16
                                                               16
16 16
MUX
                                          16
                                                                                                             PWM7 / CMP7
                           16                                       3        Output                          PWM8 / CMP8
                                  Simple compare units                        logic                          PWM9 / CMP9
                           16                                                                     To Control logic
                                      GP timer 3
                                                                                                  Dir             Clock
                                                           16
                                         16
                                                                                                         QEP
                                                                                                        circuit
                                              MUX
                                          16                                                                                          CAP1 / QEP1
                                                                                                              2             2         CAP2 / QEP2
                           16
                                      Capture units                                                                         2         CAP3, 4
16
                  ÁÁÁÁÁ
                  ÁÁÁÁÁ  ÁÁÁÁ
                         ÁÁÁÁ  ÁÁÁÁÁ
                               ÁÁÁÁÁ
                  ÁÁÁÁÁ
            ADC0/IO
                  ÁÁÁÁÁ        ÁÁÁÁÁ
             ADC2
                                                                                          10-Bit
                  ÁÁÁÁÁ        ÁÁÁÁÁ
             ADC3                       8/1
                                                                                                                                  Internal Bus
                                       MUX                                                 A/D
                  ÁÁÁÁÁ        ÁÁÁÁÁ
             ADC4
                                                                                        Converter
                  ÁÁÁÁÁ        ÁÁÁÁÁ
             ADC5
                                                                                            (1)
                  ÁÁÁÁÁ        ÁÁÁÁÁ
             ADC6
                  ÁÁÁÁÁ        ÁÁÁÁÁ
             ADC7
                  ÁÁÁÁÁ        ÁÁÁÁÁ
           ADC10
                                                                                          10-Bit
                  ÁÁÁÁÁ        ÁÁÁÁÁ
            ADC11                       8/1
                                       MUX                                                 A/D
                  ÁÁÁÁÁ        ÁÁÁÁÁ
           ADC12
                                                                                        Converter
                  ÁÁÁÁÁ        ÁÁÁÁÁ
           ADC13
                                                                                            (2)
                  ÁÁÁÁÁ        ÁÁÁÁÁ
           ADC14
                  ÁÁÁÁÁ        ÁÁÁÁÁ
           ADC15
                     ÁÁÁÁÁÁÁÁÁÁÁÁÁ
                     ÁÁÁÁÁÁÁÁÁÁÁÁÁ
        External (I/O) Start Pin                             Control Logic
                     ÁÁÁÁÁÁÁÁÁÁÁÁÁ
 Internal (EV Module) Start Signal
                     ÁÁÁÁÁÁÁÁÁÁÁÁÁ
                             VREF
                                                  Single/Continues/Event Operations
                                                        Interrupts Sleep Mode
              ÁÁÁÁÁÁ
              ÁÁÁÁÁÁ ÁÁÁÁÁÁ
                       ÁÁÁÁÁÁÁÁÁÁÁÁ
                              ÁÁÁÁÁÁÁÁÁÁÁÁÁ
                                     ÁÁÁÁÁÁÁ
              ÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
                         VREF                           Supply Voltage               Program Clock         Control Register
                                                                                       Prescaler
          SPIBUF.7 – 0
                                         RECEIVER           OVERRUN
                                         OVERRUN             INT ENA
           SPIBUF                                                                            SPI Priority
        Buffer Register                      SPISTS.7                                                                  0 Level 1
                                                                                 To CPU        SPIPRI.6
                                                            SPICTL.4                                                     INT
                                                                                                                       1 Level 6
         8                                                                                                               INT
                                                               SPI INT
                                         SPI INT FLAG           ENA
                                                                                                                                     External
                                             SPISTS.6
                                                                                                                                   Connections
                                                            SPICTL.0
M M
               SPIDAT                                                                                                              SPIPC2.7 – 4
                                                                                        S
             Data Register                          S        SW1                                                                     SPISIMO
                                                                                        M
          SPIDAT.7 – 0                              M
                                                                                        S                                          SPIPC2.3 – 0
                                                    S        SW2                                                                     SPISOMI
                 TALK                                                                                            SPISTE
                                                                                               SPIPC1.5
              SPICTL.1                                                                                         FUNCTION‡           SPIPC1.7 – 4
                                                                                                                                     SPISTE
                     State Control
                                                                                            MASTER/SLAVE†
                                                                                  SCI TX Interrupt
                                  TXWAKE       SCITXBUF.7–0
                                                                               TXRDY         TX INT ENA
   Frame Format and Mode         SCICTL1.3     Transmitter-Data                                               TXINT
                                                                             SCICTL2.7                                   External
                                               Buffer Register                                                         Connections
                                   1                                                            SCICTL2.0
          PARITY                                                             TX EMPTY
     EVEN/ODD ENABLE                                 8
                                                                             SCICTL2.6
    SCICCR.6 SCICCR.5              WUT
                                                                                                                       SCIPC2.7–4
                                                  TXSHF                         TXENA
                                                                                                    SCITXD
                                                  Register                                                               SCITXD
                                                                              SCICTL1.1
                SCIHBAUD. 15 – 8
                                                                                    SCI PRIORITY LEVEL
                   Baud Rate                                                                      1
                    Register                                                         Level 2 Int.
                    (MSbyte)                                                                      0
                                                                                     Level 1 Int.
                                       CLOCK ENA                                              SCI TX
 SYSCLK
                SCILBAUD. 7 – 0                                                             PRIORITY
                                                                                                                       SCIPC2.3–0
                                                   RXSHF                                            SCIRXD
                                                  Register                                                               SCIRXD
                RXWAKE
               SCIRXST.1
            SCICTL1.6                    SCICTL1.0
                                                         8                       SCI RX Interrupt
                                                                              RXRDY           RX/BK INT ENA
                                             Receiver-Data
                                                                             SCIRXST.6
                                                Buffer
                                                                                                               RXINT
            RX ERROR                           Register
                                                                               BRKDT             SCICTL2.1
RX ERROR FE OE PE
RTICNTR.7 – 0
     Any            CLR
    Write
                      8-Bit
                    Real-Time
                              /16384
                     Counter
                                 /2048
                                 /512                            111
                                                                                                                     RTICR.6
                    CLR                                    110
                                 /256                    101                                                         RTI ENA
                                                                                                                                  INT Request
                                                                                                       D         Q
                                                         100                                                                      (Level 1 Only)
                                                                                 RTICR.2 – 0               CLR
                                                         011
                                  /128                                            2 1 0                                    INT Acknowledge
                     7-Bit                                010                      RTIPS
                     Free-        /64                                                                                          RTICR.7
                                                             001                                                                             Clear
                    Running       /32                                                                                                        RTI Flag
                                                                                                                               RTI FLAG
  16-kHz            Counter       /16                            000
 WDCLK                            /8
                                                                                                           D         Q     RTICR.7        Read
 System                           /4
                    CLR                                                                                        CLR        RTI FLAG        RTI Flag
  Reset                           /2
                                                                                                                          RTICR.7        Clear
                                                                                                                          RTI FLAG       RTI Flag
                          000
                            001
                                010
                                011
    WDCR.2 – 0                  100
     2 1 0                      101
     WDPS                     110
                          111
                                                     WDCNTR.7 – 0
                                                                                                                     WD FLAG
                                                    8-Bit Watchdog
     WDCR.6                                                                                                          WDCR.7      Reset Flag
                                                       Counter                      One-Cycle
      WDDIS                                                                           Delay        PS/257
                                                          CLR
  WDKEY.7 – 0
                                        Bad Key                                                                                  System
   Watchdog            55 + AA                                                                                                   Reset
   Reset Key                          Good Key                   WDCHK2–0                                                        Request
                       Detector
    Register
                                                                 WDCR.5 – 3†
                                                                                                               Bad WDCR Key
                                                                                      3
                                                                                      3
                        System Reset
                                                                    1 0 1
                                                                   (Constant
                                                                     Value)
† Writing to bits WDCR.5 – 3 with anything but the correct pattern (101) generates a system reset.
scan-based emulation
     TMS320F240 device uses scan-based emulation for code- and hardware-development support. Serial scan
     interface is provided by the test-access port. Scan-based emulation allows the emulator to control the processor
     in the system without the use of intrusive cables to the full pinout of the device.
repeat feature
     The repeat function can be used with instructions (as defined in Table 14) such as multiply/accumulates (MAC
     and MACD), block moves (BLDD and BLPD), I/O transfers (IN/OUT ), and table read/writes (TBLR/TBLW).
     These instructions, although normally multicycle, are pipelined when the repeat feature is used, and they
     effectively become single-cycle instructions. For example, the table-read instruction can take three or more
     cycles to execute, but when the instruction is repeated, a table location can be read every cycle.
     The repeat counter (RPTC) is loaded with the addressed data-memory location if direct or indirect addressing
     is used, and with an 8-bit immediate value if short-immediate addressing is used. The RPTC register is loaded
     by the RPT instruction. This results in a maximum of N + 1 executions of a given instruction. RPTC is cleared
     by reset. Once a repeat instruction (RPT ) is decoded, all interrupts, including NMI (but excluding reset), are
     masked until the completion of the repeat loop.
instruction set summary
     This section summarizes the operation codes (opcodes) of the instruction set for the F240 digital signal
     processors. This instruction set is a superset of the C1x and C2x instruction sets. The instructions are arranged
     according to function and are alphabetized by mnemonic within each category. The symbols in Table 13 are
     used in the instruction set summary table (Table 14). T he TI C2xx assembler accepts C2x instructions.
     The number of words that an instruction occupies in program memory is specified in column 3 of Table 14.
     Several instructions specify two values separated by a slash mark ( / ) for the number of words. In these cases,
     different forms of the instruction occupy a different number of words. For example, the ADD instruction occupies
     one word when the operand is a short-immediate value or two words if the operand is a long-immediate value.
     The number of cycles that an instruction requires to execute is also in column 3 of Table 14. All instructions are
     assumed to be executed from internal program memory (RAM) and internal data dual-access memory. The
     cycle timings are for single-instruction execution, not for repeat mode.
     TP                  00      BIO low
                         01      TC = 1
                         10      TC = 0
                         11      None of the above conditions
     TREGn        Temporary register n (n = 0, 1, or 2)
                  4-bit field representing the following conditions:
                           Z:     ACC = 0
                           L:     ACC < 0
                           V:     Overflow
                           C:     Carry
                  A conditional instruction contains two of these 4-bit fields. The 4-LSB field of the instruction is a 4-bit mask field. A 1 in the
     ZLVC
                  corresponding mask bit indicates that the condition is being tested. The second 4-bit field (bits 4 – 7) indicates the state of
                  the conditions designated by the mask bits as being tested. For example, to test for ACC ≥ 0, the Z and L fields are set while
                  the V and C fields are not set. The next 4-bit field contains the state of the conditions to test. The Z field is set to indicate
                  testing of the condition ACC = 0, and the L field is reset to indicate testing of the condition ACC ≥ 0. The conditions possible
                  with these 8 bits are shown in the BCND and CC instructions. To determine if the conditions are met, the 4-LSB bit mask
                  is ANDed with the conditions. If any bits are set, the conditions are met.
development support
    Texas Instruments offers an extensive line of development tools for the x240 generation of DSPs, including tools
    to evaluate the performance of the processors, generate code, develop algorithm implementations, and fully
    integrate and debug software and hardware modules.
    The following products support development of x240-based applications:
    Software Development Tools:
    Assembler/Linker
    Simulator
    Optimizing ANSI C compiler
    Application algorithms
    C/Assembly debugger and code profiler
    Hardware Development Tools:
    Emulator XDS510 (supports x240 multiprocessor system debug)
    See Table 15 and Table 16 for complete listings of development-support tools for the F240. For information on
    pricing and availability, contact the nearest TI field sales office or authorized distributor.
                                                                         DEVICE
                                                                          C2xx DSP
                                                                                   209
              TECHNOLOGY                                                           203
                                                                                   241
              C = ROM                                                              242
              F = Flash EEPROM                                            F2xx DSP
                                                                                   206
                                                                                   240
                                                                                   241
                                                                                   243
    † TQFP = Thin Quad Flat Package
documentation support
    Extensive documentation supports all of the TMS320 family generations of devices from product announcement
    through applications development. The types of documentation available include: data sheets, such as this
    document, with design specifications; complete user’s guides for all devices and development-support tools;
    and hardware and software applications. To receive copies of TMS320 literature, contact the Literature
    Response Center at 800/477-8924.
    A series of DSP textbooks is published by Prentice-Hall and John Wiley & Sons to support DSP research and
    education. The TMS320 newsletter, Details on Signal Processing, is published quarterly and distributed to
    update TMS320 customers on product information. The TMS320 DSP bulletinboard service (BBS) provides
    access to a wealth of information pertaining to the TMS320 family, including documentation, source code, and
    object code for many DSP algorithms and utilities. The BBS can be reached at 281/274-2323.
    Updated information on the TMS320 DSP controllers can be found on the worldwide web at: http://www.ti.com.
absolute maximum ratings over operating free-air temperature range (unless otherwise noted)†
       Supply voltage range, VDD‡ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . – 0.3 V to 7 V
       Input voltage range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . – 0.3 V to 7 V
       Output voltage range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . – 0.3 V to 7 V
       Operating free-air temperature range, TA: L version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0°C to 70°C
                                                                   A version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . – 40°C to 85°C
                                                                   S, Q versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . – 40°C to125°C
       Storage temperature range, Tstg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . – 55°C to 150°C
† Stresses beyond those listed under “absolute maximum ratings” may cause permanent damage to the device. These are stress ratings only, and
  functional operation of the device at these or any other conditions beyond those indicated under “recommended operating conditions” is not
  implied. Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability.
‡ All voltage values are with respect to VSS.
                           Table 17. Typical Output Source Current vs. Output Voltage High
                                                   24V
                                                   2.4                         30V
                                                                               3.0                    35V
                                                                                                      3.5                      40V
                                                                                                                               4.0
RS                                                –19 mA                     –16 mA                  –12 mA                   –6 mA
See complete listing of pin names†                –16 mA                     –13.5 mA               –9.5 mA                  –5.0 mA
 All other inputs                             –23 mA              –18.5 mA            –13 mA             –6.5 mA
† IOPA[0:3], SCIRXD/IO, SCITXD/IO, XINT2/IO, XINT3/IO, ADCSOC/IOPC0, TMRDIR/IOPB6, TMRCLK/IOPB7 EMU0, EMU1/OFF
                            Table 18. Typical Output Sink Current vs. Output Voltage Low
                                                       06V
                                                       0.6                                 04V
                                                                                           0.4                              02V
                                                                                                                            0.2
RS                                                     8 mA                                6 mA                             3 mA
See complete listing of pin names†                    7.5 mA                               5 mA                         2.5 mA
 All other inputs                                14.5 mA                      10 mA                    5.0 mA
† IOPA[0:3], SCIRXD/IO, SCITXD/IO, XINT2/IO, XINT3/IO, ADCSOC/IOPC0, TMRDIR/IOPB6, TMRCLK/IOPB7 EMU0, EMU1/OFF
IOL
                                  Tester Pin
                                  Electronics
                                                                         50 Ω                 Output
                             VLOAD                                                            Under
                                                                                              Test
                                                                          CT
IOH
                                                                                            20%
                                                                                            0.7 V
                                            Figure 18. TTL-Level Outputs
                                                                                   10%
                                                                                   0.7 V
       Lowercase subscripts and their meanings:                              Letters and symbols and their meanings:
       a            access time                                              H             High
       c            cycle time (period)                                      L             Low
       d            delay time                                               V             Valid
       f            fall time                                                X             Unknown, changing, or don’t care level
       h            hold time                                                Z             High impedance
       r            rise time
       su           setup time
       t            transition time
       v            valid time
       w            pulse duration (width)
See Note B
                 C1                                       C2                           External
                                                                                                                    NC
        (see Note A)              Crystal                 (see Note A)               Clock Signal
                                                                                   (toggling 0 – 5 V)
NOTES: A. For the values of C1 and C2, see the crystal manufacturer’s specification.
       B. Use this configuration in conjunction with OSCBYP pin pulled low.
       C. Texas Instruments recommends that customers have the resonator/crystal vendor characterize the operation of their device with
          the DSP chip. The resonator/crystal vendor has the equipment and expertise to tune the tank circuit. The vendor can also advise
          the customer regarding the proper tank component values that will ensure start-up and stability over the entire operating range.
CLOCK OPTIONS
clock options
                              PARAMETER                                                               CLKMD[1:0]
 Clock-in mode, divide-by-2                                                                                00
 Clock-in mode, divide-by-1                                                                                01
 PLL enabled, divide-by-2 before PLL lock                                                                  10
 PLL enabled, divide-by-1 before PLL lock                                                                  11
CLKOUT/IOPC1
switching characteristics over recommended operating conditions [H = 0.5 tc(CO)] (see Figure 22)
                       PARAMETER                                         CLOCK MODE                  MIN            TYP             MAX          UNIT
                                                               before PLL lock,
                                                                                                                  2tc(Cl)                 †
                                                               CLKIN divide by 2
 tc(CPU)           Cycle time, CPUCLK                          before PLL lock,                                                                   ns
                                                                                                                   tc(Cl)
                                                               CLKIN divide by 1
                                                               after PLL lock                                         50
                                                               CPUCLK divide by 2                               2tc(CPU)                  †
 tc(SYS)           Cycle time,
                         time SYSCLK                                                                                                              ns
                                                               CPUCLK divide by 4‡                              4tc(CPU)
 tc(CO)            Cycle time, CLKOUT                                                                   50                                †       ns
 tf(CO)            Fall time, CLKOUT                                                                                   5                          ns
 tr(CO)            Rise time, CLKOUT                                                                                   5                          ns
 tw(COL)           Pulse duration, CLKOUT low                                                        H – 10         H–6                H–1        ns
 tw(COH)           Pulse duration, CLKOUT high                                                        H+0           H +4               H+8        ns
                                                               before PLL lock,
                                                                                                                                  2000tc(Cl)
                   Transition time, PLL synchronized after     CLKIN divide by 2
 tp                                                                                                                                               ns
                   PLL enabled                                 before PLL lock,
                                                                                                                                  1000tc(Cl)
                                                               CLKIN divide by 1
† This device utilizes a fully static design and, therefore, can operate with input clock cycle time [tc(CI)] approaching infinity. The device is
  characterized at frequencies approaching 0 Hz.
‡ SYSCLK is initialized to divide-by-4 mode by any device reset.
timing requirements over recommended operating conditions (see Note 1 and Figure 22)
                                                                                      EXTERNAL REFERENCE
                                                                                                                            MIN       MAX        UNIT
                                                                                           CRYSTAL
                                                                                                4 MHz                       250           †
 tc(Cl)            Cycle time, XTAL1/CLKIN                                                      6 MHz                       167                   ns
                                                                                                8 MHz                       125
 tf(Cl)            Fall time, XTAL1/CLKIN                                                                                                 5       ns
 tr(Cl)            Rise time, XTAL1/CLKIN                                                                                                 5       ns
 tw(CIL)            Pulse duration, XTAL1/CLKIN low as a percentage of tc(CI)                                        40             60    %
 tw(CIH)            Pulse duration, XTAL1/CLKIN high as a percentage of tc(CI)                                       40             60    %
† This device utilizes a fully static design and, therefore, can operate with input clock cycle time [tc(CI)] approaching infinity. The device is
  characterized at frequencies approaching 0 Hz.
NOTE 1: Timings assume CLKOUT is set to output CPUCLK. CLKOUT is initialized to CPUCLK by power-on reset.
                                                                                      tc(CI)
                                                tw(CIH)
                                                                                       tf(Cl)                           tr(Cl)
                                                                                                      tw(CIL)
      XTAL1/CLKIN
                                                              tw(COH)
                                                                                                     tr(CO)                             tf(CO)
                                       tc(CO)                               tw(COL)
CLKOUT
Figure 22. CLKIN-to-CLKOUT Timings for PLL Oscillator Mode, Multiply-by-5 Option With 4-MHz Crystal
switching characteristics over recommended operating conditions (see Figure 23, Figure 24,
Figure 25, and Figure 26)
                     PARAMETER                                      LOW-POWER MODES              MIN      TYP         MAX   UNIT
td(WAKE–A)
A0–A15
CLKOUT/IOPC1
WAKE INT
td(IDLE–COH)
A0–A15
CLKOUT/IOPC1
     WAKE INT
                                                                                         td(WAKE–A)
td(WAKE–A)
A0–A15
td(IDLE–COH) td(WAKE–LOCK)
CLKOUT/IOPC1
WAKE INT
td(WAKE–A)
A0–A15
td(IDLE–OSC)
                                                                                              ÁÁ
                                                                              td(WAKE–LOCK)
                          td(IDLE–COH)                                  td(WAKE–OSC)
CLKOUT/IOPC1
                                                                                              ÁÁ
    WAKE INT
td(CO-ACTL)RD Delay time, CLKOUT/IOPC1 low to PS, DS, IS, and BR low 10 ns
td(CO-ACTH)RD Delay time, CLKOUT/IOPC1 low to PS, DS, IS, and BR high 10 ns
CLKOUT/IOPC1
                                                                                           td(CO–ACTH)RD
                               td(CO–ACTL)RD
A0–A15
W/R
                                                             tsu(D-COL)RD
           WE
                                    ta(A)
                                                                 th(COL-D)RD
D0–D15
td(CO–SL)RD td(CO–SH)RD
STRB
READY
CLKOUT/IOPC1
                                                                                                        td(CO–ACTH)W
                                      td(CO–ACTL)W
     PS, DS, IS,
          or BR
                                                td(CO–A)W
                                                                         th(WH-A)
A0–A15
td(CO–RWL) td(CO–RWH)
                                                                            td(CO–WH)
           R/W
W/R
                                                 td(CO–WL)
                                                                   tw(WH)
WE
                          td(CO–D)
                                                                                                  thz(WH-D)
                                                               tsu(D-WH)
        D0–D15
td(CO–SL)W td(CO–SH)W
STRB
READY
2.2 V
0.8 V
             Table 19. Timing Variation With Load Capacitance: [VCC = 5 V, VOH = 2.2 V, VOL = 0.8 V]
                                – 40°C                                      27°C                          150°C
                        RISE              FALL                    RISE                FALL       RISE             FALL
      5 pF             2.5 ns             3.6 ns                 3.1 ns               4.5 ns    4.3 ns            6.2 ns
      25 pF            3.1 ns             4.6 ns                 4.0 ns               5.7 ns    5.6 ns            7.8 ns
      50 pF            3.9 ns             5.9 ns                 5.0 ns               7.3 ns    7.2 ns            9.9 ns
      75 pF            4.7 ns             7.3 ns                 6.1 ns               8.9 ns    8.8 ns            11.7 ns
     100 pF            5.4 ns             8.9 ns                 7.2 ns               10.6 ns   10.5 ns           13.8 ns
     125 pF            6.2 ns             10.4 ns                8.3 ns               12.2 ns   12.1 ns           15.8 ns
READY timings
timing requirements over recommended operating conditions [H = 0.5tc(CO)]† (see Figure 30)
                                                                                                                   MIN      MAX       UNIT
 tsu(R-CO)         Setup time, READY low before CLKOUT/IOPC1 high                                                   14                 ns
 th(CO-R)          Hold time, READY low after CLKOUT/IOPC1 high                                                      0                 ns
 tv(R)ARD          Valid time, READY after address valid on read                                                          3H – 31      ns
 tv(R)AW         Valid time, READY after address valid on write                                                           4H – 31      ns
† The READY timings are based on one software wait state. At full speed operation, the F240 does not allow for single READY-based wait states.
CLKOUT/IOPC1
PS, DS, or IS
A0–A15
W/R
WE
D0–D15
STRB
                                                           tsu(R–CO)
                                                                                           tv(R)AW
                                                             th(CO–R)
                        tv(R)ARD
READY
timing requirements over recommended operating conditions for a reset (see Figure 31, Figure 32,
and Figure 33)
                                                                                                                         MIN      MAX      UNIT
 tw(RSL)          Pulse duration, RS or PORESET low‡                                                                       5                 ns
‡ The parameter tw(RSL) refers to the time RS is an input.
VDD
PORESET†
RS‡
                                                                        txtal§
                                                                                         tp
tHi-Z¶
† PORESET is required to be driven low during power up to ensure all clock/PLL registers are reset to a known state.
‡ RS is a bidirectional (open-drain output) pin and can be optionally pulled low through an open-drain or open-collector drive circuit, or through
  a 2.7-kΩ resistor in series with a totem pole drive circuit. If RS is left undriven, then a 20-kΩ pullup resistor should be used.
§ The start-up time of the on-chip oscillator depends on the crystal parameters, bypass capacitors, and board layout. Typical start-up time is
  about 10 ms.
¶ After PORESET is high and oscillator starts up, it takes few clock edges (typically 4–8 oscillator cycles) for the I/Os to assume high-impedance
  state.
# CLKOUT using on-chip oscillator.
VDD
PORESET†
RS‡
tlock
tHi-Z§
† PORESET is required to be driven low during power up to ensure all clock/PLL registers are reset to a known state.
‡ RS is a bidirectional (open-drain output) pin and can be optionally pulled low through an open-drain or open-collector drive circuit, or through
  a 2.7-kΩ resistor in series with a totem pole drive circuit. If RS is left undriven, then a 20-kΩ pullup resistor should be used.
§ If external clock is used, after PORESET is high, it takes few valid clock edges (typically 4–8 clock-in cycles) for the I/Os to assume
  high-impedance state.
¶ CLKOUT using external oscillator.
tw(RSL)
PORESET
tw(RSL1)
RS†
td(RS) td(EX)
† RS is driven low by any device reset, which includes asserting PORESET, RS, access to an illegal address, execution of a software
  reset, or a watchdog timer reset.
timing requirements over recommended operating conditions [H = 0.5tc(CO)] (see Figure 34)
                                                                                                                       MIN        MAX     UNIT
 tw(BIOL)               Pulse duration, BIO low                                                                       2H + 16              ns
 tw(MPMCV)              Pulse duration, MP/MC valid†                                                               2H + 24                ns
† This is the minimum time the MP/MC pin needs to be stable in order to be recognized by internal logic; however, for proper operation, the user
  must maintain a valid level for the duration of the entire memory access (or accesses) on- or off-chip.
CLKOUT/IOPC1
td(XF)
XF
tw(MPMCV)†
MP/MC Valid
tw(BIOL)
BIO
          † This is the minimum time the MP/MC pin needs to be stable in order to be recognized by internal logic; however, for proper
            operation, the user must maintain a valid level for the duration of the entire memory access (or accesses) on- or off-chip.
PWM/CMP timings
    PWM refers to PWM1/CMP1, PWM2/CMP2, PWM3/CMP3, PWM4/CMP4, PWM5/CMP5, PWM6/CMP6,
    T1PWM/T1CMP, T2PWM/T2CMP, T3PWM/T3CMP, PWM7/CMP7, PWM8/CMP8, and PWM9/CMP9.
switching characteristics over recommended operating conditions for PWM timing (see Figure 35)
                                            PARAMETER                                                         MIN     MAX    UNIT
td(PWM)CO      Delay time, CLKOUT high to PWM output switching                                                          12    ns
timing requirements over recommended operating conditions for PWM timing [H = 0.5tc(CO)]
(see Figure 36 and Figure 37)
                                                                                                             MIN      MAX    UNIT
tw(TMRDIR)         Pulse duration, TMRDIR low/high                                                        4H + 12             ns
tw(TMRCLKL)        Pulse duration, TMRCLK low as a percentage of TMRCLK cycle time                            40        60    %
tw(TMRCLKH)        Pulse duration, TMRCLK high as a percentage of TMRCLK cycle time                           40        60    %
tc(TMRCLK)         Cycle time, TMRCLK                                                                   4  tc(CPU)           ns
CLKOUT/IOPC1
td(PWM)CO
PWM
                                                         tw(TMRCLKL)                                   tw(TMRCLKH)
                                                                    tc(TMRCLK)
TMRCLK
tw(TMRDIR)
TMRDIR
tw(CAP)
CAP
interrupt timings
     PWM refers to PWM1/CMP1, PWM2/CMP2, PWM3/CMP3, PWM4/CMP4, PWM5/CMP5, PWM6/CMP6,
     T1PWM/T1CMP, T2PWM/T2CMP, T3PWM/T3CMP, PWM7/CMP7, PWM8/CMP8, and PWM9/CMP9.
     INT refers to NMI, XINT1, XINT2/IO, and XINT3/IO. PDP refers to PDPINT.
switching characteristics over recommended operating conditions for interrupts (see Figure 40)
                                                 PARAMETER                                                           MIN      MAX   UNIT
td(PWM)PDP       Delay time, PDPINT low to PWM to high-impedance state                                                    0    15    ns
tw(INT)
INT
tw(PDP)
PDPINT
td(PWM)PDP
PWM
switching characteristics over recommended operating conditions for a GPI/O (see Figure 41)
                                                  PARAMETER                                                            MIN   MAX   UNIT
                                                                                    XINT2/IO, XINT3/IO, IOPB6,
                                                                                                                              33
 td(GPO)CO         Delay time, CLKOUT low to GPO low/high                           IOPB7, and IOPC0                                ns
                                                                                    All other GPOs                            25
timing requirements over recommended operating conditions for a GPI/O (see Figure 42)
                                                                                                                 MIN         MAX   UNIT
 tw(GPI)           Pulse duration, GPI high/low                                                          tc(SYS) + 12               ns
CLKOUT/IOPC1
td(GPO)CO
GPO
tw(GPI)
GPI
tv(TXD)
tv(RXD)
                                                   SPI master mode external timing parameters (clock phase = 0)† (see Figure 44)
                                                                                                                                                                                                                                                                            TMS320F240
                                                                                                                                                                                                                    ns
                                                                          Delay time, SPICLK low (clock polarity = 1) to
                                                    td(SPCL-SIMO)M§                                                                   – 10                 10                – 10                    10
                                                                          SPISIMO valid
                                                                          Valid time, SPISIMO data valid after SPICLK low
                                                    tv(SPCL-SIMO)M§                                                             0.5tc(SPC)M – 70                  0.5tc(SPC)M + 0.5tc – 70
                                                                          (clock polarity =0)
                                                                                                                                                                                                                    ns
                                                                          Valid time, SPISIMO data valid after SPICLK high
                                                    tv(SPCH-SIMO)M§                                                             0.5tc(SPC)M – 70                  0.5tc(SPC)M + 0.5tc – 70
                                                                          (clock polarity =1)
                                                                          Setup time, SPISOMI before SPICLK low
                                                    tsu(SOMI-SPCL)M§                                                                     0                                       0
                                                                          (clock polarity = 0)
                                                                                                                                                                                                                    ns
                                                                          Setup time, SPISOMI before SPICLK high
                                                    tsu(SOMI-SPCH)M§                                                                     0                                       0
                                                                          (clock polarity = 1)
                                                                          Valid time, SPISOMI data valid after SPICLK low
                                                    tv(SPCL-SOMI)M§                                                             0.25tc(SPC)M – 70                 0.5tc(SPC)M – 0.5tc – 70
                                                                          (clock polarity = 0)
tc(SPC)M
                                      tw(SPCH)M                 tw(SPCL)M
          SPICLK
(clock polarity = 0)
tw(SPCL)M tw(SPCH)M
          SPICLK
(clock polarity = 1)
                                            td(SPCH-SIMO)M
                                            td(SPCL-SIMO)M
                                                                                tv(SPCH-SIMO)M
                                                                                tv(SPCL-SIMO)M
                       tsu(SOMI-SPCL)M
                       tsu(SOMI-SPCH)M                                 tv(SPCL-SOMI)M
                                                                       tv(SPCH-SOMI)M
                                                Master In Data
          SPISOMI
                                                Must Be Valid
SPISTE†
† The SPISTE signal must be active before the SPI communication stream starts; the SPISTE signal must remain active
  until the SPI communication stream is complete.
                                                    tw(SPCL)M§            Pulse duration, SPICLK low (clock polarity = 0)       0.5tc(SPC)M – 70    0.5tc(SPC)M   0.5tc(SPC)M + 0.5tc – 70   0.5tc(SPC)M + 0.5tc
                                                                          Pulse duration, SPICLK high                                                                                                               ns
                                                    tw(SPCH)M§                                                                  0.5tc(SPC)M – 70    0.5tc(SPC)M   0.5tc(SPC)M + 0.5tc – 70   0.5tc(SPC)M + 0.5tc
                                                                          (clock polarity = 1)
                                                                          Setup time, SPISIMO data valid before SPICLK high
                                                    tsu(SIMO-SPCH)M§                                                            0.5tc(SPC)M – 70                    0.5tc(SPC)M – 70
                                                                          (clock polarity = 0)
                                                                                                                                                                                                                    ns
                                                                          Setup time, SPISIMO data valid before SPICLK low
                                                    tsu(SIMO-SPCL)M§                                                            0.5tc(SPC)M – 70                    0.5tc(SPC)M – 70
                                                                          (clock polarity = 1)
                                                                                                                                                                                                                          SPRS042E – OCTOBER 1996 – REVISED NOVEMBER 2002
tc(SPC)M
tw(SPCH)M tw(SPCL)M
           SPICLK
(clock polarity = 0)
tw(SPCL)M tw(SPCH)M
           SPICLK
(clock polarity = 1)
                         tsu(SIMO-SPCH)M
                         tsu(SIMO-SPCL)M                                           tv(SPCH-SIMO)M
                                                                                   tv(SPCL-SIMO)M
                           tsu(SOMI-SPCH)M
                           tsu(SOMI-SPCL)M                                      tv(SPCH-SOMI)M
                                                                                tv(SPCL-SOMI)M
                                                       Master In Data
          SPISOMI
                                                       Must Be Valid
SPISTE†
   † The SPISTE signal must be active before the SPI communication stream starts; the SPISTE signal must remain active until
     the SPI communication stream is complete.
SPI slave mode external timing parameters (clock phase = 0)† (see Figure 46)
                                                                                                         MIN             MAX        UNIT
 tc(SPC)S              Cycle time, SPICLK                                                            8tc‡                            ns
 tw(SPCH)S§            Pulse duration, SPICLK high (clock polarity = 0)                           0.5tc(SPC)S – 70    0.5tc(SPC)S
                                                                                                                                     ns
 tw(SPCL)S§            Pulse duration, SPICLK low (clock polarity = 1)                            0.5tc(SPC)S – 70    0.5tc(SPC)S
 tw(SPCL)S§            Pulse duration, SPICLK low (clock polarity = 0)                            0.5tc(SPC)S – 70    0.5tc(SPC)S
                                                                                                                                     ns
 tw(SPCH)S§            Pulse duration, SPICLK high (clock polarity = 1)                           0.5tc(SPC)S – 70    0.5tc(SPC)S
 td(SPCH-SOMI)S§       Delay time, SPICLK high (clock polarity = 0) to SPISOMI valid             0.375tc(SPC)S – 70
                                                                                                                                     ns
 td(SPCL-SOMI)S§       Delay time, SPICLK low (clock polarity = 1) to SPISOMI valid              0.375tc(SPC)S – 70
 tv(SPCL-SOMI)S§       Valid time, SPISOMI data valid after SPICLK low (clock polarity =0)         0.75tc(SPC)S
                                                                                                                                     ns
 tv(SPCH-SOMI)S§       Valid time, SPISOMI data valid after SPICLK high (clock polarity =1)        0.75tc(SPC)S
 tsu(SIMO-SPCL)S§      Setup time, SPISIMO before SPICLK low (clock polarity = 0)                     0
                                                                                                                                     ns
 tsu(SIMO-SPCH)S§      Setup time, SPISIMO before SPICLK high (clock polarity = 1)                   0
 tv(SPCL-SIMO)S§         Valid time, SPISIMO data valid after SPICLK low (clock polarity = 0)   0.5tc(SPC)S
                                                                                                                                     ns
 tv(SPCH-SIMO)S    §     Valid time, SPISIMO data valid after SPICLK high (clock polarity = 1)  0.5tc(SPC)S
† The MASTER / SLAVE bit (SPICTL.2) is cleared and the CLOCK PHASE bit (SPICTL.3) is cleared.
‡ tc = system clock cycle time = 1 / SYSCLK = tc(SYS)
§ The active edge of the SPICLK signal referenced is controlled by the CLOCK POLARITY bit (SPICCR.6).
tc(SPC)S
tw(SPCH)S tw(SPCL)S
           SPICLK
(clock polarity = 0)
tw(SPCL)S tw(SPCH)S
           SPICLK
(clock polarity = 1)
                                                td(SPCH-SOMI)S
                                                td(SPCL-SOMI)S
                                                                                      tv(SPCL-SOMI)S
                                                                                      tv(SPCH-SOMI)S
                            tsu(SIMO-SPCL)S
                            tsu(SIMO-SPCH)S                                tv(SPCL-SIMO)S
                                                                           tv(SPCH-SIMO)S
                                                      SPISIMO Data
          SPISIMO
                                                      Must Be Valid
SPISTE†
   † The SPISTE signal must be active before the SPI communication stream starts; the SPISTE signal must remain active until
     the SPI communication stream is complete.
SPI slave mode external timing parameters (clock phase = 1)† (see Figure 47)
                                                                                                       MIN             MAX        UNIT
 tc(SPC)S              Cycle time, SPICLK                                                           8tc‡                           ns
 tw(SPCH)S§            Pulse duration, SPICLK high (clock polarity = 0)                          0.5tc(SPC)S – 70   0.5tc(SPC)S
                                                                                                                                   ns
 tw(SPCL)S§            Pulse duration, SPICLK low (clock polarity = 1)                           0.5tc(SPC)S – 70   0.5tc(SPC)S
 tw(SPCL)S§            Pulse duration, SPICLK low (clock polarity = 0)                           0.5tc(SPC)S – 70   0.5tc(SPC)S
                                                                                                                                   ns
 tw(SPCH)S§            Pulse duration, SPICLK high (clock polarity = 1)                          0.5tc(SPC)S – 70   0.5tc(SPC)S
 tsu(SOMI-SPCH)S§      Setup time, SPISOMI before SPICLK high (clock polarity = 0)               0.125tc(SPC)S
                                                                                                                                   ns
 tsu(SOMI-SPCL)S§      Setup time, SPISOMI before SPICLK low (clock polarity = 1)                0.125tc(SPC)S
 tv(SPCH-SOMI)S§       Valid time, SPISOMI data valid after SPICLK high (clock polarity =0)       0.75tc(SPC)S
                                                                                                                                   ns
 tv(SPCL-SOMI)S§       Valid time, SPISOMI data valid after SPICLK low (clock polarity =1)        0.75tc(SPC)S
 tsu(SIMO-SPCH)S§      Setup time, SPISIMO before SPICLK high (clock polarity = 0)                   0
                                                                                                                                   ns
 tsu(SIMO-SPCL)S§      Setup time, SPISIMO before SPICLK low (clock polarity = 1)                    0
 tv(SPCH-SIMO)S§       Valid time, SPISIMO data valid after SPICLK high (clock polarity = 0)      0.5tc(SPC)S
                                                                                                                                   ns
 tv(SPCL-SIMO)S§       Valid time, SPISIMO data valid after SPICLK low (clock polarity = 1)       0.5tc(SPC)S
† The MASTER / SLAVE bit (SPICTL.2) is cleared and the CLOCK PHASE bit (SPICTL.3) is set.
‡ tc = system clock cycle time = 1 / SYSCLK = tc(SYS)
§ The active edge of the SPICLK signal referenced is controlled by the CLOCK POLARITY bit (SPICCR.6).
tc(SPC)S
tw(SPCH)S tw(SPCL)S
           SPICLK
(clock polarity = 0)
                                                                     tw(SPCL)S
                                                                                           tw(SPCH)S
           SPICLK
(clock polarity = 1)
                         tsu(SOMI-SPCH)S
                         tsu(SOMI-SPCL)S
                                                                                 tv(SPCH-SOMI)S
                                                                                 tv(SPCL-SOMI)S
                       tsu(SIMO-SPCH)S
                       tsu(SIMO-SPCL)S                                       tv(SPCH-SIMO)S
                                                                             tv(SPCL-SIMO)S
                                                  SPISIMO Data
          SPISIMO
                                                  Must Be Valid
SPISTE†
† The SPISTE signal must be active before the SPI communication stream starts; the SPISTE signal must remain active until
  the SPI communication stream is complete.
        The ADC module allows complete freedom in the design of the sources for the analog inputs. The period of the
        sample time is independent of the source impedance. The sample-and-hold period occurs in the first ADC clock
        after the ADCIMSTART bit or the ADCSOC bit of the ADC control register 1 (ADCTRL1, bits 13 and 0,
        respectively) is set to 1. The conversion then occurs during the next six ADC clock cycles. The digital result
        registers are updated on the next ADC clock cycle once the conversion is completed.
                                                                                      Requiv
                                                   R1
               VIN                                                                                               VAI       (to ADCINx input)
R1 = 9 kΩ typical
Bit Converted 9 8 7 6 5 4 3 2 1 0
ADC Clock
      Analog InputÁÁÁÁÁ
                      ÁÁÁÁÁÁ
                           ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
                                          tsu(SH)                 th(SH)
                  ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
                                                        tw(SH)
                  ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
      Sample/Hold
tw(C)
Convert
                  ÁÁÁÁÁ
                  ÁÁÁÁÁ
     Internal Start    ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
                       ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
 Start of Convert
                  ÁÁ
                  ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
                                           td(SOC–SH)
                    ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
                  ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
                                                                                                       td(EOC–FIFO)
                                                                           tw(SHC)
      XFR to FIFO
                  ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Figure 49. Analog-to-Digital Timing
flash EEPROM
programming operation
                                            PARAMETER                                                     MIN        NOM    MAX    UNIT
 tw(PGM)            Pulse duration, programming algorithm†                                                    95       100   105     µs
 td(PGM-MODE)       Delay time, program mode select to stabilization†                                         10                     µs
† These parameters are used in the flash programming algorithms. For a detailed description of the algorithms, see the TMS320F20x/F24x DSP
  Embedded Flash Memory Technical Reference (literature number SPRU282).
erase operation
                                            PARAMETER                                                      MIN      NOM     MAX     UNIT
 tw(ERASE)           Pulse duration, erase algorithm†                                                       6.65        7    7.35    ms
 td(ERASE-MODE)      Delay time, erase mode select to stabilization †                                         10                     µs
† These parameters are used in the flash programming algorithms. For a detailed description of the algorithms, see the TMS320F20x/F24x DSP
  Embedded Flash Memory Technical Reference (literature number SPRU282).
flash-write operation
                                            PARAMETER                                                      MIN      NOM     MAX     UNIT
 tw(FLW)             Pulse duration, flash-write algorithm†‡                                                13.3        14   14.7    ms
 td(FLW-MODE)        Delay time, flash-write mode select to stabilization †‡                                  10                     µs
† These parameters are used in the flash programming algorithms. For a detailed description of the algorithms, see the TMS320F20x/F24x DSP
  Embedded Flash Memory Technical Reference (literature number SPRU282).
‡ Refer to the recommended operating conditions section for the flash programming operating temperature range when programming flash.
     ADDR    BIT 15     BIT 14      BIT 13         BIT 12          BIT 11        BIT 10          BIT 9            BIT 8     REG
             BIT 7      BIT 6       BIT 5          BIT 4            BIT 3         BIT 2          BIT 1            BIT 0
 ADDR      BIT 15        BIT 14         BIT 13         BIT 12            BIT 11         BIT 10       BIT 9        BIT 8      REG
            BIT 7            BIT 6      BIT 5           BIT 4            BIT 3          BIT 2        BIT 1        BIT 0
                                          PLL CLOCK CONTROL REGISTERS (CONTINUED)
0702Dh    CKINF(3)      CKINF(2)       CKINF(1)       CKINF(0)         PLLDIV(2)      PLLFB(2)      PLLFB(1)     PLLFB(0)    CKCR1
0702Eh
  to                                                             Reserved
07031h
                                                  A-to-D MODULE CONTROL REGISTERS
          SUSPEND-     SUSPEND-        ADCIM-                                         ADCCON-
                                                      ADC2EN            ADC1EN                     ADCINTEN    ADCINTFLAG
 07032h     SOFT         FREE          START                                            RUN                                  ADCTRL1
          ADCEOC                     ADC2CHSEL                                       ADC1CHSEL                   ADCSOC
 07033h                                                          Reserved
             —                —           —              —                  —        ADCEVSOC      ADCEXTSOC        —
 07034h                                                                                                                      ADCTRL2
                  ADCFIFO2                —                   ADCFIFO1                             ADCPSCALE
 07035h                                                          Reserved
             D9               D8         D7              D6                 D5           D4            D3           D2
 07036h                                                                                                                      ADCFIFO1
             D1               D0          0               0                 0             0            0            0
 07037h                                                          Reserved
             D9               D8         D7              D6                 D5           D4            D3           D2
 07038h                                                                                                                      ADCFIFO2
             D1               D0          0               0                 0             0            0            0
 07039h
   to                                                            Reserved
 0703Fh
                              SERIAL PERIPHERAL INTERFACE (SPI) CONFIGURATION CONTROL REGISTERS
           SPI SW        CLOCK                                                          SPI           SPI          SPI
 07040h                                   —              —                  —                                                SPICCR
           RESET        POLARITY                                                       CHAR2         CHAR1        CHAR0
                                                      OVERRUN           CLOCK         MASTER/                    SPI INT
 07041h      —                —           —                                                          TALK                    SPICTL
                                                       INT ENA          PHASE          SLAVE                      ENA
          RECEIVER       SPI INT
 07042h                                   —              —                  —             —            —            —        SPISTS
          OVERRUN         FLAG
 07043h                                                          Reserved
                         SPI BIT       SPI BIT         SPI BIT          SPI BIT        SPI BIT       SPI BIT      SPI BIT
 07044h      —                                                                                                               SPIBRR
                         RATE 6        RATE 5          RATE 4           RATE 3         RATE 2        RATE 1       RATE 0
 07045h                                                          Reserved
 07046h   ERCVD7        ERCVD6         ERCVD5         ERCVD4            ERCVD3         ERCVD2       ERCVD1       ERCVD0      SPIEMU
 07047h    RCVD7         RCVD6         RCVD5           RCVD4            RCVD3          RCVD2         RCVD1        RCVD0      SPIBUF
 07048h                                                          Reserved
 07049h    SDAT7         SDAT6          SDAT5          SDAT4             SDAT3         SDAT2         SDAT1        SDAT0      SPIDAT
0704Ah
  to                                                             Reserved
0704Ch
           SPISTE        SPISTE        SPISTE          SPISTE           SPICLK         SPICLK       SPICLK        SPICLK
0704Dh                                                                                                                       SPIPC1
           DATA IN      DATA OUT      FUNCTION        DATA DIR          DATA IN       DATA OUT     FUNCTION      DATA DIR
          SPISIMO        SPISIMO       SPISIMO        SPISIMO           SPISOMI        SPISOMI      SPISOMI      SPISOMI
0704Eh                                                                                                                       SPIPC2
          DATA IN       DATA OUT      FUNCTION        DATA DIR          DATA IN       DATA OUT     FUNCTION      DATA DIR
                           SPI          SPI
 0704Fh      —                                           —                  —             —            —            —        SPIPRI
                        PRIORITY       ESPEN
  ADDR     BIT 15      BIT 14      BIT 13         BIT 12          BIT 11        BIT 10          BIT 9     BIT 8     REG
            BIT 7       BIT 6       BIT 5         BIT 4           BIT 3         BIT 2           BIT 1     BIT 0
                     SERIAL COMMUNICATIONS INTERFACE (SCI) CONFIGURATION CONTROL REGISTERS
            STOP     EVEN/ODD     PARITY                        ADDR/IDLE        SCI            SCI       SCI
 07050h                                         SCI ENA                                                             SCICCR
            BITS      PARITY      ENABLE                          MODE          CHAR2          CHAR1     CHAR0
                      RX ERR
 07051h      —                   SW RESET     CLOCK ENA          TXWAKE         SLEEP          TXENA     RXENA      SCICTL1
                      INT ENA
           BAUD15
 07052h               BAUD14      BAUD13        BAUD12           BAUD11        BAUD10          BAUD9      BAUD8     SCIHBAUD
            (MSB)
                                                                                                          BAUD0
 07053h    BAUD7       BAUD6       BAUD5          BAUD4          BAUD3          BAUD2          BAUD1                SCILBAUD
                                                                                                           (LSB)
                                                                                               RX/BK        TX
 07054h    TXRDY     TX EMPTY        —             —                  —           —                                 SCICTL2
                                                                                              INT ENA    INT ENA
 07055h   RX ERROR     RXRDY       BRKDT           FE              OE             PE          RXWAKE        —       SCIRXST
 07056h   ERXDT7      ERXDT6      ERXDT5        ERXDT4           ERXDT3        ERXDT2         ERXDT1     ERXDT0     SCIRXEMU
 07057h    RXDT7       RXDT6       RXDT5          RXDT4          RXDT3          RXDT2          RXDT1      RXDT0     SCIRXBUF
 07058h                                                    Reserved
 07059h    TXDT7       TXDT6       TXDT5          TXDT4           TXDT3         TXDT2          TXDT1      TXDT0     SCITXBUF
 0705Ah
   to                                                      Reserved
 0705Dh
           SCITXD     SCITXD      SCITXD         SCITXD          SCIRXD        SCIRXD          SCIRXD     SCIRXD
 0705Eh                                                                                                             SCIPC2
           DATA IN   DATA OUT    FUNCTION       DATA DIR         DATA IN      DATA OUT        FUNCTION   DATA DIR
                       SCITX       SCIRX           SCI
 0705Fh      —                                                        —           —              —          —       SCIPRI
                      PRIORITY    PRIORITY        ESPEN
 07060h
   to                                                      Reserved
 0706Fh
                                      EXTERNAL INTERRUPT CONTROL REGISTERS
           XINT1
                         —           —             —                  —           —              —          —
           FLAG
 07070h                                                                                                             XINT1CR
                       XINT1                                                   XINT1           XINT1      XINT1
             —                       0             —                  —
                      PIN DATA                                                POLARITY        PRIORITY     ENA
 07071h                                                    Reserved
             NMI
                         —           —             —                  —           —              —          —
            FLAG
 07072h                                                                                                             NMICR
                        NMI                                                     NMI
             —                       1             —                  —                          —          —
                      PIN DATA                                                POLARITY
 07073h
   to                                                      Reserved
 07077h
           XINT2
                         —           —             —                  —           —              —          —
           FLAG
 07078h                                                                                                             XINT2CR
                       XINT2                     XINT2            XINT2        XINT2           XINT2      XINT2
             —                       —
                      PIN DATA                  DATA DIR        DATA OUT      POLARITY        PRIORITY     ENA
 07079h                                                    Reserved
 ADDR       BIT 15      BIT 14        BIT 13           BIT 12         BIT 11             BIT 10           BIT 9           BIT 8   REG
            BIT 7       BIT 6         BIT 5             BIT 4          BIT 3             BIT 2            BIT 1           BIT 0
                                  EXTERNAL INTERRUPT CONTROL REGISTERS (CONTINUED)
            XINT3
                          —            —                 —                 —               —               —               —
            FLAG
 0707Ah                                                                                                                           XINT3CR
                        XINT3                       XINT3              XINT3          XINT3           XINT3               XINT3
              —                        —
                       PIN DATA                    DATA DIR          DATA OUT        POLARITY        PRIORITY              ENA
 0707Bh
   to                                                           Reserved
 0708Fh
                                               DIGITAL I/O CONTROL REGISTERS
            CRA.15      CRA.14       CRA.13            CRA.12         CRA.11             CRA.10        CRA.9              CRA.8
 07090h                                                                                                                           OCRA
              —           —            —                 —            CRA.3              CRA.2         CRA.1              CRA.0
 07091h                                                         Reserved
              —           —            —                 —                 —               —               —               —
 07092h                                                                                                                           OCRB
            CRB.7       CRB.6         CRB.5            CRB.4          CRB.3              CRB.2         CRB.1              CRB.0
 07093h
   to                                                           Reserved
 07097h
              —           —            —                 —            A3DIR              A2DIR         A1DIR              A0DIR
 07098h                                                                                                                           PADATDIR
              —           —            —                 —             IOPA3             IOPA2         IOPA1              IOPA0
 07099h                                                         Reserved
            B7DIR       B6DIR         B5DIR            B4DIR          B3DIR              B2DIR         B1DIR              B0DIR
 0709Ah                                                                                                                           PBDATDIR
            IOPB7       IOPB6         IOPB5            IOPB4          IOPB3              IOPB2         IOPB1              IOPB0
 0709Bh                                                         Reserved
            C7DIR       C6DIR         C5DIR            C4DIR          C3DIR              C2DIR         C1DIR              C0DIR
 0709Ch                                                                                                                           PCDATDIR
            IOPC7       IOPC6         IOPC5            IOPC4          IOPC3              IOPC2         IOPC1              IOPC0
 0709Dh
   to                                                           Reserved
 073FFh
                          GENERAL-PURPOSE (GP) TIMER CONFIGURATION CONTROL REGISTERS
           T3STAT      T2STAT        T1STAT                   T3TOADC                           T2TOADC              T1TOADC(1)
 07400h                                                                                                                           GPTCON
          T1TOADC(0)   TCOMPOE                 T3PIN                             T2PIN                            T1PIN
             D15         D14           D13              D12                D11            D10              D9              D8
 07401h                                                                                                                           T1CNT
             D7          D6            D5                D4                D3             D2               D1              D0
             D15         D14           D13              D12                D11            D10              D9              D8
 07402h                                                                                                                           T1CMPR
             D7          D6            D5                D4                D3             D2               D1              D0
             D15         D14           D13              D12                D11            D10              D9              D8
 07403h                                                                                                                           T1PR
             D7          D6            D5                D4                D3             D2               D1              D0
            FREE        SOFT         TMODE2         TMODE1           TMODE0              TPS2             TPS1            TPS0
 07404h                                                                                                                           T1CON
            TSWT1      TENABLE       TCLKS1            TCLKS0         TCLD1              TCLD0        TECMPR          SELT1PR
             D15         D14           D13              D12                D11            D10              D9              D8
 07405h                                                                                                                           T2CNT
             D7          D6            D5                D4                D3             D2               D1              D0
             D15         D14           D13              D12                D11            D10              D9              D8
 07406h                                                                                                                           T2CMPR
             D7          D6            D5                D4                D3             D2               D1              D0
  ADDR     BIT 15      BIT 14      BIT 13         BIT 12           BIT 11        BIT 10          BIT 9      BIT 8    REG
            BIT 7       BIT 6       BIT 5          BIT 4            BIT 3         BIT 2          BIT 1      BIT 0
                     GENERAL-PURPOSE (GP) TIMER CONFIGURATION CONTROL REGISTERS (CONTINUED)
            D15         D14         D13             D12             D11           D10             D9         D8
 07407h                                                                                                              T2PR
             D7          D6          D5             D4               D3            D2             D1         D0
            FREE        SOFT      TMODE2         TMODE1           TMODE0          TPS2           TPS1       TPS0
 07408h                                                                                                              T2CON
           TSWT1      TENABLE      TCLKS1         TCLKS0           TCLD1         TCLD0         TECMPR     SELT1PR
            D15         D14         D13             D12             D11           D10             D9         D8
 07409h                                                                                                              T3CNT
             D7          D6          D5             D4               D3            D2             D1         D0
            D15         D14         D13             D12             D11           D10             D9         D8
 0740Ah                                                                                                              T3CMPR
             D7          D6          D5             D4               D3            D2             D1         D0
            D15         D14         D13             D12             D11           D10             D9         D8
 0740Bh                                                                                                              T3PR
             D7          D6          D5             D4               D3            D2             D1         D0
            FREE        SOFT      TMODE2         TMODE1           TMODE0          TPS2           TPS1       TPS0
 0740Ch                                                                                                              T3CON
           TSWT1      TENABLE      TCLKS1         TCLKS0           TCLD1         TCLD0         TECMPR     SELT1PR
 0740Dh
   to                                                      Reserved
 07410h
                                     FULL AND SIMPLE COMPARE UNIT REGISTERS
          CENABLE       CLD1        CLD0        SVENABLE         ACTRLD1        ACTRLD0        FCOMPOE    SCOMPOE
 07411h                                                                                                              COMCON
           SELTMR      SCLD1       SCLD0        SACTRLD1         SACTRLD0      SELCMP3         SELCMP2    SELCMP1
 07412h                                                    Reserved
           SVRDIR        D2          D1             D0           CMP6ACT1      CMP6ACT0        CMP5ACT1   CMP5ACT0
 07413h                                                                                                              ACTR
          CMP4ACT1   CMP4ACT0    CMP3ACT1       CMP3ACT0         CMP2ACT1      CMP2ACT0        CMP1ACT1   CMP1ACT0
             —           —           —              —                 —            —              —          —
 07414h                            SCMP3-         SCMP3-          SCMP2-        SCMP2-          SCMP1-     SCMP1-    SACTR
             —           —
                                    ACT1           ACT0            ACT1          ACT0            ACT1       ACT0
            DBT7        DBT6        DBT5           DBT4            DBT3          DBT2            DBT1       DBT0
 07415h                                                                                                              DBTCON
           EDBT3       EDBT2       EDBT1          DBTPS1          DBTPS0           —              —          —
 07416h                                                    Reserved
            D15         D14         D13             D12             D11           D10             D9         D8
 07417h                                                                                                              CMPR1
             D7          D6          D5             D4               D3            D2             D1         D0
            D15         D14         D13             D12             D11           D10             D9         D8
 07418h                                                                                                              CMPR2
             D7          D6          D5             D4               D3            D2             D1         D0
            D15         D14         D13             D12             D11           D10             D9         D8
 07419h                                                                                                              CMPR3
             D7          D6          D5             D4               D3            D2             D1         D0
            D15         D14         D13             D12             D11           D10             D9         D8
 0741Ah                                                                                                              SCMPR1
             D7          D6          D5             D4               D3            D2             D1         D0
            D15         D14         D13             D12             D11           D10             D9         D8
 0741Bh                                                                                                              SCMPR2
             D7          D6          D5             D4               D3            D2             D1         D0
            D15         D14         D13             D12             D11           D10             D9         D8
 0741Ch                                                                                                              SCMPR3
             D7          D6          D5             D4               D3            D2             D1         D0
 0741Dh
   to                                                      Reserved
 0741Fh
 ADDR       BIT 15        BIT 14          BIT 13            BIT 12           BIT 11        BIT 10            BIT 9          BIT 8    REG
            BIT 7         BIT 6           BIT 5              BIT 4           BIT 3         BIT 2             BIT 1          BIT 0
                                                          CAPTURE UNIT REGISTERS
           CAPRES                   CAPQEPN                CAP3EN           CAP4EN       CAP34TSEL        CAP12TSEL      CAP4TOADC
 07420h                                                                                                                              CAPCON
                  CAP1EDGE                         CAP2EDGE                         CAP3EDGE                         CAP4EDGE
 07421h                                                              Reserved
                   CAP4FIFO                         CAP3FIFO                        CAP2FIFO                         CAP1FIFO
 07422h                                                                                                                              CAPFIFO
          CAPFIFO15     CAPFIFO14       CAPFIFO13         CAPFIFO12      CAPFIFO11       CAPFIFO10         CAPFIFO9       CAPFIFO8
             D15              D14             D13              D12            D11              D10            D9                D8
 07423h                                                                                                                              CAP1FIFO
             D7               D6              D5               D4             D3               D2             D1                D0
             D15              D14             D13              D12            D11              D10            D9                D8
 07424h                                                                                                                              CAP2FIFO
             D7               D6              D5               D4             D3               D2             D1                D0
             D15              D14             D13              D12            D11              D10            D9                D8
 07425h                                                                                                                              CAP3FIFO
             D7               D6              D5               D4             D3               D2             D1                D0
             D15              D14             D13              D12            D11              D10            D9                D8
 07426h                                                                                                                              CAP4FIFO
             D7               D6              D5               D4             D3               D2             D1                D0
 07427h
   to                                                                Reserved
 0742Bh
                                        EVENT MANAGER (EV) INTERRUPT CONTROL REGISTERS
                                                                                          T1OFINT          T1UFINT         T1CINT
              —               —               —                —                —
                                                                                            ENA              ENA            ENA
 0742Ch                                                                                                                              EVIMRA
           T1PINT       SCMP3INT        SCMP2INT          SCMP1INT          CMP3INT       CMP2INT          CMP1INT         PDPINT
            ENA           ENA             ENA               ENA               ENA           ENA              ENA            ENA
              —               —               —                —                —              —              —                 —
 0742Dh    T3OFINT       T3UFINT         T3CINT             T3PINT          T2OFINT       T2UFINT           T2CINT         T2PINT    EVIMRB
             ENA           ENA            ENA                ENA              ENA           ENA              ENA            ENA
              —               —               —                —                —              —              —                 —
 0742Eh                                                                     CAP4INT       CAP3INT          CAP2INT         CAP1INT   EVIMRC
              —               —               —                —
                                                                              ENA           ENA              ENA             ENA
                                                                                          T1OFINT          T1UFINT         T1CINT
              —               —               —                —                —
                                                                                           FLAG             FLAG            FLAG
 0742Fh                                                                                                                              EVIFRA
           T1PINT       SCMP3INT        SCMP2INT          SCMP1INT          CMP3INT       CMP2INT          CMP1INT         PDPINT
            FLAG          FLAG            FLAG              FLAG             FLAG          FLAG             FLAG            FLAG
              —               —               —                —                —              —              —                 —
 07430h    T3OFINT       T3UFINT         T3CINT             T3PINT          T2OFINT       T2UFINT           T2CINT         T2PINT    EVIFRB
            FLAG          FLAG            FLAG               FLAG            FLAG          FLAG              FLAG           FLAG
              —               —               —                —                —              —              —                 —
 07431h                                                                     CAP4INT       CAP3INT          CAP2INT         CAP1INT   EVIFRC
              —               —               —                —
                                                                             FLAG          FLAG             FLAG            FLAG
              0                0               0                0               0               0             0                 0
 07432h                                                                                                                              EVIVRA
              0                0              D5               D4             D3               D2             D1                D0
              0                0               0                0               0               0             0                 0
 07433h                                                                                                                              EVIVRB
              0                0              D5               D4             D3               D2             D1                D0
              0                0               0                0               0               0             0                 0
 07434h                                                                                                                              EVIVRC
              0                0              D5               D4             D3               D2             D1                D0
 07435h
   to                                                                Reserved
 0743Fh
  ADDR       BIT 15       BIT 14        BIT 13        BIT 12           BIT 11        BIT 10        BIT 9   BIT 8   REG
             BIT 7         BIT 6        BIT 5          BIT 4            BIT 3         BIT 2        BIT 1   BIT 0
                                                     I/O MEMORY SPACE
                                                 FLASH CONTROL MODE REGISTER†
               —            —             —             —                —             —            —       —
 0FF0Fh                                                                                                            FCMR
               —            —             —             —                —             —            —       —
                                          WAIT-STATE GENERATOR CONTROL REGISTER
               —            —             —             —                —             —            —       —
 0FFFFh                                                                                                            WSGR
               —            —             —             —               AVIS          ISWS         DSWS    PSWS
                                                       MECHANICAL DATA
PQ (S-PQFP-G***)                                                                                                PLASTIC QUAD FLATPACK
100 LEAD SHOWN
13 1 100 89
          14
                                                                          88
                                                                                   0.012 (0,30)
                                                                                                            0.006 (0,15)    M
                                                                                   0.008 (0,20)
”D3” SQ
0.025 (0,635)
                                                                                  0.150 (3,81)
                                                                                  0.130 (3,30)
                      39                                    63
                                                                                                                                 Gage Plane
                                     ”D1” SQ
                                      ”D” SQ                                                              0.010 (0,25)
                                                                                0.020 (0,51) MIN
                                     ”D2” SQ
                                                                                                                                         0°–ā8°
                                                                                                      0.046 (1,17)
                                                                                                      0.036 (0,91)
Seating Plane
                                                                                         0.004 (0,10)
        0.180 (4,57) MAX
                                      LEADS ***
                           DIM                                   100                                132