Tms 320 LF 2401 A
Tms 320 LF 2401 A
SPRS161K − MARCH 2001 − REVISED JULY 2007
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
REVISION HISTORY
This data sheet revision history highlights the technical changes made to the SPRS161J device-specific data
sheet to make it an SPRS161K revision.
Scope:
PAGE HIGHLIGHTS
60 Added section on emulator connection without signal buffering for the DSP
description
The TMS320Lx2401A† device, a new member of the TMS320C24x generation of digital signal processor
(DSP) controllers, is part of the TMS320C2000 platform of fixed-point DSPs. The Lx2401A device offers the
enhanced TMS320 DSP architectural design of the C2xx core CPU for low-cost, low-power, and
high-performance processing capabilities. Several advanced peripherals, optimized for digital motor and
motion control applications, have been integrated to provide a true single-chip DSP controller. While
code-compatible with the existing 240x and C24x DSP controller devices, the Lx2401A offers increased
processing performance (40 MIPS) and a higher level of peripheral integration. See the TMS320x240xA Device
Summary section for device-specific features.
The Lx2401A device offers a peripheral suite tailored to meet the specific price/performance points required
by various applications. The Lx2401A also offers a cost-effective reprogrammable solution for volume
production. A password-based “code security” feature on the device is useful in preventing unauthorized
duplication of proprietary code stored in on-chip Flash/ROM. Note that the LF2401A contains a 256-word boot
ROM to facilitate in-circuit programming. The boot ROM on LC2401A is used for test purposes.
The Lx2401A offers an event manager module which has been optimized for digital motor control and power
conversion applications. Capabilities of this module include center- and/or edge-aligned PWM generation,
programmable deadband to prevent shoot-through faults, and synchronized analog-to-digital conversion.
Select EV pins have been provided with an “input-qualifier” circuitry, which minimizes inadvertent pin-triggering
by glitches.
The high-performance, 10-bit analog-to-digital converter (ADC) has a minimum conversion time of 500 ns and
offers up to 5 channels of analog input. The autosequencing capability of the ADC allows a maximum of
16 conversions to take place in a single conversion session without any CPU overhead.
A serial communications interface (SCI) is integrated on all devices to provide asynchronous communication
to other devices in the system. To maximize device flexibility, functional pins are also configurable as
general-purpose inputs/outputs (GPIOs).
To streamline development time, JTAG-compliant scan-based emulation has been integrated into all devices.
This provides non-intrusive real-time capabilities required to debug digital control systems. A complete suite
of code-generation tools from C compilers to the industry-standard Code Composer Studio debugger
supports this family. Numerous third-party developers not only offer device-level development tools, but also
system-level design and development support.
NOTE: The Lx2401A device has reduced peripheral functionality compared to other 24x/240x devices. While
peripherals such as SPI and CAN are absent on the Lx2401A, peripherals such as EV and ADC have reduced
functionality. For example, in the case of EV, there is no QEP unit and the Capture unit has only one capture
pin (as opposed to three or six pins in other devices). The ADC has only five input channels (as opposed to eight
or sixteen channels in other devices). For these reasons, some bits that are valid in other 24x/240x devices are
not applicable in the Lx2401A. The registers and their valid bits are described in Table 16, Lx2401A DSP
Peripheral Register Description. For a description of those registers and bits that are valid, refer to the
TMS320LF/LC240xA DSP Controllers Reference Guide: System and Peripherals (literature number
SPRU357). Any exceptions to SPRU357 have been described in the respective peripheral sections in this data
sheet.
XTAL1/CLKIN
VDD (3.3 V) DARAM (B0)
PLL Clock XTAL2
VSS 256 Words
RS
XF C2xx
DARAM (B1)
DSP ADCIN00−ADCIN04
XINT1† Core
256 Words
10-Bit ADC VCCA
XINT2‡
(With Twin VSSA
CLKOUT‡ Autosequencer)
DARAM (B2) ADCSOC‡
32 Words
SCITXD/IOPB3
SARAM (512 Words) SCI SCIRXD/IOPB4
† T2PWM, XINT1, and IOPB0 functionalities are multiplexed into a single pin, T2PWM/XINT1/IOPB0.
‡ XINT2, ADCSOC, CAP1, IOPA7, and CLKOUT functionalities are multiplexed into a single pin, XINT2/ADCSOC/CAP1/IOPA7/CLKOUT.
XTAL1/CLKIN
VDD (3.3 V) DARAM (B0)
PLL Clock XTAL2
VSS 256 Words
RS
XF C2xx
DARAM (B1)
DSP ADCIN00−ADCIN04
XINT1† Core
256 Words
10-Bit ADC VCCA
XINT2‡
(With Twin VSSA
CLKOUT‡ Autosequencer)
DARAM (B2) ADCSOC‡
32 Words
SCITXD/IOPB3
SARAM (512 Words) SCI SCIRXD/IOPB4
ROM WD
(8K Words)
† T2PWM, XINT1, and IOPB0 functionalities are multiplexed into a single pin, T2PWM/XINT1/IOPB0.
‡ XINT2, ADCSOC, CAP1, IOPA7, and CLKOUT functionalities are multiplexed into a single pin, XINT2/ADCSOC/CAP1/IOPA7/CLKOUT.
32-PIN VF PACKAGE
(TOP VIEW)
XINT2/ADCSOC/CAP1/IOPA7 /CLKOUT
TDO/ IOPB2
TDI/ OPB5
ADCIN00
VCCA
VSSA
TRST
VSS
24 23 22 21 20 19 18 17
VDD 25 16 ADCIN01
VCCP† 26 15 ADCIN02
PWM1/IOPA1 27 14 ADCIN03
PWM2/IOPA2 28 13 ADCIN04
PWM3/IOPA3 29 12 PWM6/IOPA6
VSS 30 11 PWM5/IOPA5
T2PWM/XINT1/IOPB0 31 10 PWM4/IOPA4
PDPINTA/IOPA0 32 9 RS
1 2 3 4 5 6 7 8
XTAL2
XTAL1/CLKIN
VSS
TCK/ IOPB1
TMS/ XF
VDD
SCIRXD/ IOPB4
SCITXD/ IOPB3
terminal functions
Terminal Functions†
TERMINAL
DESCRIPTION
NAME NO.
Device Reset (in) and Watchdog Reset (out).
Device reset. RS causes the device to terminate execution and to set PC = 0. When RS is brought to
a high level, execution begins at location 0x0000 of program memory. This pin is driven low by the DSP
RS 9 when a watchdog reset occurs. During watchdog reset, the RS pin will be driven low for the watchdog
reset duration of 128 CLKIN cycles.
The output buffer of this pin is an open-drain with an internal pullup (20 µA, typical). It is recommended
that this pin be driven by an open-drain device. (↑)
Power drive protection input. When this pin is pulled low by an external event, an interrupt is generated
and all PWM outputs go to high-impedance state. PDPINTA will keep PWM outputs in high-impedance
state even when the DSP is not executing. (↑)
NOTES:
1) Upon reset, the PDPINTA function is active, in addition to the GPIO function. If the IOPA0 function
PDPINTA/IOPA0 32
is desired, the PDPINTA function must be disabled. (This can be done by writing to bit 0 of the
EVAIMRA register.) Otherwise, the PWM outputs could inadvertently be put into a high-impedance
state when the IOPA0 pin is driven low.
2) When PDPINTA is used to “wake up” the DSP from LPM2, the pin should be held low for
(98304 CLKIN + 12 CLKOUT) cycles.
3) This pin must be held high when on-chip boot ROM is invoked.
PWM1/IOPA1 27 Compare/PWM output 1 or GPIO (↑)
PWM2/IOPA2 28 Compare/PWM output 2 or GPIO (↑)
PWM3/IOPA3 29 Compare/PWM output 3 or GPIO (↑)
PWM4/IOPA4 10 Compare/PWM output 4 or GPIO (↑)
PWM5/IOPA5 11 Compare/PWM output 5 or GPIO (↑)
PWM6/IOPA6 12 Compare/PWM output 6 or GPIO (↑)
Upon reset, this pin comes up as XINT1/IOPB0 pin. To enable the XINT1 function, the appropriate bit
in the XINT1CR register must be set. No special configuration sequence is needed to use this pin as
a GPIO. However, a write to the PADATDIR register is necessary to configure this pin as a
T2PWM/XINT1/IOPB0 31 general-purpose output. Configuration of this pin as T2PWM is achieved by writing a one to bit 8 of the
MCRA register. Note that the value of bit 8 in the MCRA register does not affect the XINT1 functionality
of this pin. The XINT1 function is enabled/disabled by the value written into the XINT1CR register and
is independent of the value written in bit 8 in the MCRA register. (↑)
Upon reset, this pin can be configured as any one of the following: XINT2, ADCSOC, CAP1, or IOPA7.
To configure this pin for XINT2 function, the appropriate bit in the XINT2CR register must be set. To
configure this pin for ADCSOC function, the appropriate bit in the ADCTRL2 register must be set. To
configure this pin for CAP1 function, the appropriate bits in the CAPCONA register must be configured.
XINT2/ADCSOC/CAP1/
22 To summarize, the XINT2, ADCSOC, and CAP1 functions are enabled at the respective peripheral level.
IOPA7/CLKOUT
No special configuration sequence is needed to use this pin as a GPIO. However, a write to the
PADATDIR register is necessary to configure this pin as a general-purpose output. This pin can also
function as the CPU clock output. This is achieved by writing a one to bit 7 of the MCRA register. When
CLKOUT is chosen, the internal logic for the XINT2, ADCSOC, and CAP1 sees the pin as a “1”. (↑)
† Bold face type indicates function of the device pin after reset.
‡ It is highly recommended that VCCA be isolated from the digital supply voltage (and VSSA from digital ground) to maintain the specified accuracy
and improve the noise immunity of the ADC.
§ TDI is MUXed with digital output, not digital I/O.
¶ Pin 26 is VCCP on LF2401A and is a No Connect (NC) on LC2401A.
LEGEND: ↑ − Internal pullup ↓ − Internal pulldown (Typical active pullup/pulldown value is ±20 µA.)
NOTE: On the target hardware, pins 13 and 14 (EMU0/EMU1) of the JTAG header must be pulled high.
NOTE: The enabling/disabling of the XF pin is controlled by Bit 0 of the SCSR4 register at address
0x701B (in addition to the TRST pin). Upon reset, this bit is zero, disabling the XF pin. This bit must be
set by user code before it can be used. This bit is not readable; hence, its status cannot be determined.
† Bold face type indicates function of the device pin after reset.
‡ It is highly recommended that VCCA be isolated from the digital supply voltage (and VSSA from digital ground) to maintain the specified accuracy
and improve the noise immunity of the ADC.
§ TDI is MUXed with digital output, not digital I/O.
¶ Pin 26 is VCCP on LF2401A and is a No Connect (NC) on LC2401A.
LEGEND: ↑ − Internal pullup ↓ − Internal pulldown (Typical active pullup/pulldown value is ±20 µA.)
NOTE: On the target hardware, pins 13 and 14 (EMU0/EMU1) of the JTAG header must be pulled high.
NOTE: Do not use pullup resistors on TRST; it has an internal pulldown device. TRST is an active high
TRST 20 test pin and must be maintained low at all times during normal device operation. In a low-noise
environment, TRST may be left floating. In other instances, an external pulldown resistor is highly
recommended. The value of this resistor should be based on drive strength of the debugger pods
applicable to the design. A 2.2-kΩ resistor generally offers adequate protection. Since this is
application-specific, it is recommended that each target board be validated for proper operation of the
debugger and the application.
XTAL1/CLKIN 6 Crystal/Clock input to PLL
XTAL2 7 Crystal output
Flash programming voltage pin. This pin must be connected to a 5-V supply for Flash programming. The
Flash cannot be programmed if this pin is connected to GND. When not programming the Flash (i.e.,
during normal device operation), this pin can either be left connected to the 5-V supply or it can be tied
VCCP¶ 26 to GND. This pin must not be left floating at any time. Do not use any current-limiting resistor in series
with the 5-V supply on this pin. This pin is a “no connect” (NC) on ROM parts (i.e., this pin is not connected
to any circuitry internal to the device). Connecting this pin to 5 V or leaving it open makes no difference
on ROM parts.
VDD 5 Core supply (3.3 V)
VDD 25 Core supply (3.3 V)
VSS 8 Core ground
VSS 21 Core ground
VSS 30 Core ground
† Bold face type indicates function of the device pin after reset.
‡ It is highly recommended that VCCA be isolated from the digital supply voltage (and VSSA from digital ground) to maintain the specified accuracy
and improve the noise immunity of the ADC.
§ TDI is MUXed with digital output, not digital I/O.
¶ Pin 26 is VCCP on LF2401A and is a No Connect (NC) on LC2401A.
LEGEND: ↑ − Internal pullup ↓ − Internal pulldown (Typical active pullup/pulldown value is ±20 µA.)
NOTE: On the target hardware, pins 13 and 14 (EMU0/EMU1) of the JTAG header must be pulled high.
NOTE:
The I/O pins that are MUXed with the JTAG function cannot be used while debugging, since the
emulator needs complete control of the JTAG pins. While debugging, there should not be any
circuitry connected on these MUXed pins that could disturb the JTAG debug process.
PADATDIR.n
[IOPAn − input data]
PADATDIR.m
(Direction) 0
Pullup
MCRA.k
PADATDIR.n
[IOPAn − Output Data] 0
PWMn 1
PADATDIR.0
[IOPA0 − Input Data]
PADATDIR.0
[IOPA0 − Output Data] Pullup
PDPINTA/IOPA0 Pin
MCRA.0 PADATDIR.8
Input
PDPINTA Qualifier
Circuit
EVAIMRA.0
1
PADATDIR.7
[IOPA7 − Input Data]
XINT2 and XINT2 0
LPM1 Wakeup Logic Input
Qualifier
Circuit
XINT2CR.0
CAP1
CAPCONA[14,13]
Pullup
ADSOC XINT2/ADCSOC/
CAP1/IOPA7/
CLKOUT Pin
ADCTRL2.7
MCRA.7
PADATDIR.15
(Direction)
CLKOUT 1
PADATDIR.7 0
[IOPA7 − Output Data]
XINT1CR.0
T2PWM/XINT1/IOPB0 Pin
PBDATDIR.8
(Direction Bit) 0
TCOMPOE
[GPTCONA.6] 1
MCRA.8
PBDATDIR.0
[IOPB0 − Output Data] 0
T2PWM 1
[PWM Signal]
PBDATDIR.3
[IOPB3 − Input Data]
PBDATDIR.11
(Direction Bit) Pullup
SCITXD/
MCRA.11 IOPB3 Pin
PBDATDIR.3
[IOPB3 − Output Data] 0
SCITXD 1
SCIRXD
PBDATDIR.4
[IOPB4 − Input Data]
Pullup
PBDATDIR.12
(Direction Bit) SCIRXD/IOPB4 Pin
MCRA.12
PBDATDIR.4
[IOPB4 − Output Data]
TCK
Pullup
PBDATDIR.1
[IOPB1 − Input Data]
TCK/IOPB1 Pin
PBDATDIR.1
[IOPB1 − Output Data]
TRST
To CPU
RS
PBDATDIR.9
(Direction Bit)
Pullup
TDI
TDI/OPB5 Pin
PBDATDIR.5
[OPB5 − Output Data]
TRST
RS
PBDATDIR.13
(Direction Bit)
IOPBDATDIR.2
[IOPB2 − Input Data]
TDO/IOPB2 Pin
PBDATDIR.2
[IOPB2 − Output Data] 0
Pulldown
TDO 1
TRST
RS
PBDATDIR.10
(Direction Bit)
Pullup
TMS
TMS/XF Pin
XF
TRST
Bit 0† of SCSR4
TRST Pin
Pulldown
constraints while emulating with JTAG port pins and GPIO functions
This section highlights the constraints that are encountered if the emulation/debugging tool attempts to use the
multiplexed JTAG/GPIO pins in their JTAG configuration while the application attempts to use them in the GPIO
configuration at the same time:
1. Since the emulation/debugging tools need complete control of the JTAG port pins, the GPIO functions that
are multiplexed with the JTAG port pins cannot be used when the JTAG pod is connected to the JTAG
header.
2. Applications using the JTAG port pins for its GPIO function must provide some isolation mechanism (such
as jumpers) to isolate the external circuitry associated with the GPIO circuits. This will ensure that the GPIO
circuit does not conflict with the signals from the JTAG pod. To reiterate, the circuitry associated with the
GPIO pins must be isolated from the DSP before the JTAG pod is connected to the JTAG header.
3. It is recommended that the Lx2401A application software does not enable GPIO function for the multiplexed
JTAG/GPIO pins if emulation tools are ever planned to be used concurrently. This will avoid drive conflicts
between JTAG pod signals and GPIO signals—particularly on TCK, TDI and TMS pins. Table 2 shows the
configuration of the multiplexed JTAG/GPIO pins depending on the status of the TRST pin.
4. TRST pin is internally pulled down. When this pin is left unconnected, it puts the multiplexed JTAG/GPIO
pins in their GPIO configuration. If TRST is driven high, it puts the multiplexed JTAG/GPIO pins in their JTAG
configuration and the device enters emulation mode. All the emulation and flash programming tools use the
JTAG port and will drive this pin high. TRST pin controls the functionality of the multiplexed JTAG/GPIO pins.
Lx2401A Target
Lx2401A/EVM Harness
JTAG Link
memory map
ÈÈÈÈÈÈÈÈÈ
Hex Program Hex Data Hex I/O
ÈÈÈÈÈÈÈÈÈ
0000 FLASH SECTOR 0 (4K) 0000 Memory-Mapped 0000
Interrupt Vectors (0000−003Fh) Registers/Reserved Addresses
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
005F
Reserved † (0040−0043h) 0060 On-Chip DARAM B2
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
User code begins at 0044h 007F
0FFF 0080 Illegal
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
2000 01FF
0200 On-Chip DARAM (B0)§ (CNF = 0)
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
ÉÉÉÉÉÉÉÉÉ ÈÈÈÈÈÈÈÈÈ
0500 Illegal
ÉÉÉÉÉÉÉÉÉ
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
Reserved (PON = 0)
0FFF
81FF
1000
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
8800 7000 Peripheral Memory-Mapped
ÈÈÈÈÈÈÈÈÈ Reserved
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ FEFF
ÈÈÈÈÈÈÈÈÈ
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
FF00
Reserved
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
FF0E
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
FEFF
FF00
On-Chip DARAM (B0)‡ (CNF = 1)
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
Reserved (CNF = 0) Reserved
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
FFFF
FFFF FFFF
ÉÉÉ
ÉÉÉ
ÈÈÈ
On-Chip Flash Memory (Sectored) SARAM (See Table 1 for details.)
NOTE A: Boot ROM: If the boot ROM is enabled, then addresses 0000−00FF in the program space will be occupied by boot ROM.
† Addresses 0040h−0043h in program memory are reserved for code security passwords.
‡ When CNF = 1, addresses FE00h−FEFFh and FF00h−FFFFh are mapped to the same physical block (B0) in program-memory space. For
example, a write to FE00h has the same effect as a write to FF00h. For simplicity, addresses FE00h−FEFFh are referred to as reserved.
§ When CNF = 0, addresses 0100h−01FFh and 0200h−02FFh are mapped to the same physical block (B0) in data-memory space. For example,
a write to 0100h has the same effect as a write to 0200h. For simplicity, addresses 0100h−01FFh are referred to as reserved.
¶ Addresses 0300h−03FFh and 0400h−04FFh are mapped to the same physical block (B1) in data-memory space. For example, a write to 0400h
has the same effect as a write to 0300h. For simplicity, addresses 0400h−04FFh are referred to as reserved.
ÈÈÈÈÈÈÈÈÈÈ
ÈÈÈÈÈÈÈÈÈÈ
Hex Program Hex Data Hex I/O
0000 0000 Memory-Mapped 0000
ÈÈÈÈÈÈÈÈÈÈ
On-chip ROM (8K)
Interrupt Vectors (0000−003Fh) 005F Registers/Reserved Addresses
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
Reserved† (0040−0043h) 0060 On-Chip DARAM B2
007F
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
1FBF User code begins at 0044h
0080 Illegal
1FCO 00FF
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
2000
0200 On-Chip DARAM (B0)§ (CNF = 0)
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
02FF Reserved (CNF = 1)
ÈÈÈÈÈÈÈÈÈÈ
ÉÉÉÉÉÉÉÉÉÉ ÉÉÉÉÉÉÉÉÉÉ ÈÈÈÈÈÈÈÈÈÈ
0800 SARAM (512 words) Reserved
ÉÉÉÉÉÉÉÉÉÉ
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
Internal (PON = 1)
Reserved
Reserved (PON = 0)
0FFF
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
8800 7000 Peripheral Memory-Mapped
Registers (System, WD, ADC,
ÈÈÈÈÈÈÈÈÈÈ Reserved
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
FEFF
FF00
ÈÈÈÈÈÈÈÈÈÈ Reserved‡
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ FF10
Reserved
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
FF00
On-Chip DARAM (B0)‡ (CNF = 1)
ÈÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈÈ
Reserved (CNF = 0) Reserved
ÉÉÉ
FFFF
FFFF FFFF
ÉÉÉ
ÈÈÈ
On-chip ROM SARAM (See Table 1 for details.)
ÈÈÈ
Reserved or Illegal
NOTE A: Boot ROM: If the boot ROM is enabled, then addresses 0000−00FF in the program space will be occupied by boot ROM.
† Addresses 0040h−0043h in program memory are reserved for code security passwords.
‡ When CNF = 1, addresses FE00h−FEFFh and FF00h−FFFFh are mapped to the same physical block (B0) in program-memory space. For
example, a write to FE00h has the same effect as a write to FF00h. For simplicity, addresses FE00h−FEFFh are referred to as reserved.
§ When CNF = 0, addresses 0100h−01FFh and 0200h−02FFh are mapped to the same physical block (B0) in data-memory space. For example,
a write to 0100h has the same effect as a write to 0200h. For simplicity, addresses 0100h−01FFh are referred to as reserved.
¶ Addresses 0300h−03FFh and 0400h−04FFh are mapped to the same physical block (B1) in data-memory space. For example, a write to 0400h
has the same effect as a write to 0300h. For simplicity, addresses 0400h−04FFh are referred to as reserved.
ÈÈÈÈÈÈÈÈÈ
Hex
0000
ÈÈÈÈÈÈÈÈÈ
Memory-Mapped Registers
and Reserved Illegal 7000−700F
005F
0060 System Configuration and
ÈÈÈÈÈÈÈÈÈ
On-Chip DARAM B2 7010−701F
007F Control Registers
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
0080
Illegal
Watchdog Timer Registers 7020−702F
ÈÈÈÈÈÈÈÈÈ
00FF
0100
ÈÈÈÈÈÈÈÈÈ
Reserved Illegal 7030−703F
01FF
0200
On-Chip DARAM B0 Reserved 7040−704F
ÈÈÈÈÈÈÈÈÈ
02FF
0300
On-Chip DARAM B1 SCI 7050−705F
ÈÈÈÈÈÈÈÈÈ
03FF
0400 Illegal 7060−706F
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
Reserved
04FF External interrupt registers 7070−707F
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
0500 Illegal Illegal 7080−708F
07FF
0800 Digital I/O Control Registers 7090−709F
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
SARAM (512 words)
09FF ADC Control Registers 70A0−70BF
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
0A00
Illegal
Illegal 70C0−70FF
6FFF
ÈÈÈÈÈÈÈÈÈ
7000
Peripheral Frame 1 (PF1) Reserved
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
73FF 7100−710E
7400
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
Peripheral Frame 2 (PF2) Illegal
743F 710F−71FF
7440
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
Illegal Reserved
74FF 7200−722F
ÈÈÈÈÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
7500
Reserved Illegal 7230−73FF
ÈÈÈÈÈÈÈÈÈ
753F
7540
ÈÈÈÈÈÈÈÈÈ
Illegal
77EF
ÈÈÈÈÈÈÈÈÈ
77F0 Event Manager − EVA
Code Security Passwords
ÈÈÈÈÈÈÈÈÈ
77F3 General-Purpose
Timer Registers 7400−7408
77F4
ÈÈÈÈÈÈÈÈÈ
Reserved Compare, PWM, and
77FF 7411−7419
Deadband Registers
ÈÈÈÈÈÈÈÈÈ
7800 Illegal Capture Registers 7420−7429
ÈÈÈÈÈ
FFFF
Interrupt Mask, Vector and
ÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
Flag Registers 742C−7431
“Illegal” indicates that access to
ÈÈÈÈÈ ÈÈÈÈÈÈÈÈÈ
Illegal these addresses causes a
nonmaskable interrupt (NMI). Illegal 7432−743F
PIE IMR
PDPINTA IFR
ADCINT
RXINT Level 1
TXINT IRQ GEN
XINT1 INT1
XINT2
INT2
CMP1INT
CMP2INT
CMP3INT
T1PINT Level 2
T1CINT IRQ GEN
T1UFINT
T1OFINT
CPU
INT3
T2PINT
T2CINT Level 3
T2UFINT IRQ GEN
T2OFINT
INT4
Level 4
CAP1INT
IRQ GEN
ADCINT INT6
Level 6
XINT1 IRQ GEN
XINT2 IACK
Interrupt from external interrupt pin. The remaining interrupts are internal to the peripherals.
Figure 12. Peripheral Interrupt Expansion (PIE) Module Block Diagram for Hardware-Generated Interrupts
scan-based emulation
TMS320x2xx devices incorporate scan-based emulation logic for code-development and hardware-
development support. 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. The scan-based emulator communicates with the x2xx
by way of the IEEE 1149.1-compatible (JTAG) interface. The Lx2401A DSP does not include boundary scan.
The scan chain of the device is useful for emulation function only.
MUX
XTAL1
CLKOUT
Program Bus
Data Bus
XTAL2 NPAR
Control
XF
RS 16 PC PAR MSTACK MUX
Stack 8 × 16
XINT[1−2]
2
16
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)
32 32
16
MUX
ARAU(16) MUX
32
CALU(32)
32
16 Memory Map
Register
MUX MUX 32
IMR (16)
IFR (16)
Program Bus
Data/Prog Data
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
15 13 12 11 10 9 8 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
FIELD FUNCTION
Auxiliary register pointer buffer. When the ARP is loaded into ST0, the old ARP value is copied to the ARB except during an LST
ARB
instruction. When the ARB is loaded by way of an LST #1 instruction, the same value is also copied to the ARP.
Auxiliary register (AR) pointer. ARP selects the AR to be used in indirect addressing. When the ARP is loaded, the old ARP value
ARP is copied to the ARB register. ARP can be modified by memory-reference instructions when using indirect addressing, and by the
LARP, MAR, and LST instructions. The ARP is also loaded with the same value as ARB when an LST #1 instruction is executed.
Carry bit. C is set to 1 if the result of an addition generates a carry, or reset to 0 if the result of a subtraction generates a borrow.
Otherwise, C is reset after an addition or set after a subtraction, except if the instruction is ADD or SUB with a 16-bit shift. In these
C cases, ADD can only set and SUB can only reset the carry bit, but cannot affect it otherwise. The single-bit shift and rotate
instructions also affect C, as well as the SETC, CLRC, and LST #1 instructions. Branch instructions have been provided to branch
on the status of C. C is set to 1 on a reset.
On-chip RAM configuration control bit. If CNF is set to 0, the reconfigurable data dual-access RAM blocks are mapped to data
CNF space; otherwise, they are mapped to program space. The CNF can be modified by the SETC CNF, CLRC CNF, and LST #1
instructions. RS sets the CNF to 0.
multiplier
The TMS320Lx2401A device uses a 16 x 16-bit hardware multiplier that is capable of computing a signed or
an unsigned 32-bit product in a single machine cycle. All multiply instructions, except the MPYU (multiply
unsigned) instruction, perform a signed multiply operation. That is, two numbers being multiplied are treated
as 2s-complement numbers, and the result is a 32-bit 2s-complement number. There are two registers
associated with the multiplier, as follow:
D 16-bit temporary register (TREG) that holds one of the operands for the multiplier
D 32-bit product register (PREG) that holds the product
Four product-shift modes (PM) are available at the PREG output (PSCALE). These shift modes are useful for
performing multiply/accumulate operations, performing fractional arithmetic, or justifying fractional products.
The PM field of status register ST1 specifies the PM shift mode, as shown in Table 6.
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.
multiplier (continued)
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) instructions. 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.
central arithmetic logic unit
The TMS320Lx2401A central arithmetic logic unit (CALU) implements a wide range of arithmetic and logical
functions, the majority of which execute in a single clock cycle. This ALU is referred to as central to differentiate
it from a second ALU used for indirect-address generation called the auxiliary register arithmetic unit (ARAU).
Once an operation is performed in the CALU, the result is transferred to the accumulator (ACC) where additional
operations, such as shifting, can occur. Data that is input to the CALU can be scaled by ISCALE when coming
from one of the data buses (DRDB or PRDB) or scaled by PSCALE when coming from the multiplier.
The CALU is a general-purpose ALU that operates on 16-bit words taken from data memory or derived from
immediate instructions. In addition to the usual arithmetic instructions, the CALU can perform Boolean
operations, facilitating the bit-manipulation ability required for a high-speed controller. One input to the CALU
is always provided from the accumulator, and the other input can be provided from the product register (PREG)
of the multiplier or the output of the scaling shifter (that has been read from data memory or from the ACC). After
the CALU has performed the arithmetic or logical operation, the result is stored in the accumulator.
The TMS320Lx2401A device supports floating-point operations for applications requiring a large dynamic
range. The NORM (normalization) instruction is used to normalize fixed-point numbers contained in the
accumulator by performing left shifts. The four bits of the TREG define a variable shift through the scaling shifter
for the LACT/ADDT/SUBT (load/add to/subtract from accumulator with shift specified by TREG) instructions.
These instructions are useful in floating-point arithmetic where a number must be denormalized — that is,
floating-point to fixed-point conversion. They are also useful in the execution of an automatic gain control (AGC)
going into a filter. The BITT (bit test) instruction provides testing of a single bit of a word in data memory based
on the value contained in the four LSBs of TREG.
The CALU overflow saturation mode can be enabled/disabled by setting/resetting the OVM bit of ST0. When
the CALU is in the overflow saturation mode and an overflow occurs, the overflow flag is set and the accumulator
is loaded with either the most positive or the most negative value representable in the accumulator, depending
on the direction of the overflow. The value of the accumulator at saturation is 07FFFFFFFh (positive) or
080000000h (negative). If the OVM (overflow mode) status register bit is reset and an overflow occurs, the
overflowed results are loaded into the accumulator with modification. (Note that logical operations cannot result
in overflow.)
The CALU can execute a variety of branch instructions that depend on the status of the CALU and the
accumulator. These instructions can be executed conditionally based on any meaningful combination of these
status bits. For overflow management, these conditions include OV (branch on overflow) and EQ (branch on
accumulator equal to zero). In addition, the BACC (branch to address in accumulator) instruction provides the
ability to branch to an address specified by the accumulator (computed goto). Bit test instructions (BIT and
BITT), which do not affect the accumulator, allow the testing of a specified bit of a word in data memory.
internal memory
The TMS320Lx2401A device is configured with the following memory modules:
D Dual-access random-access memory (DARAM)
D Single-access random-access memory (SARAM)
D ROM (LC2401A)
D Flash (LF2401A)
D Boot ROM
dual-access RAM (DARAM)
There are 544 words × 16 bits of DARAM on the 2401A device. The 2401A DARAM allows writes to and reads
from the RAM in the same cycle. The DARAM is configured in three blocks: block 0 (B0), block 1 (B1), and
block 2 (B2). Block 1 contains 256 words and Block 2 contains 32 words, and both blocks are located only in
data memory space. Block 0 contains 256 words, and can be configured to reside in either data or program
memory space. The SETC CNF (configure B0 as program memory) and CLRC CNF (configure B0 as data
memory) instructions allow dynamic configuration of the memory maps through software.
When using on-chip RAM, the 2401A runs at full speed with no wait states. The ability of the DARAM to allow
two accesses to be performed in one cycle, coupled with the parallel nature of the 2401A architecture, enables
the device to perform three concurrent memory accesses in any given machine cycle.
single-access RAM (SARAM)
There are 512 words × 16 bits of SARAM on the Lx2401A. The PON and DON bits select SARAM (512 words)
mapping in program space, data space, or both. See Table 16 for details on the SCSR2 register and the PON
and DON bits. At reset, these bits are 11, and the on-chip SARAM is mapped in both the program and data
spaces.
ROM (LC2401A)
There are 8K words × 16 bits of ROM on the LC2401A.
Flash EEPROM (LF2401A)
Flash EEPROM provides an attractive alternative to masked program ROM. Like ROM, Flash is nonvolatile.
However, it has the advantage of “in-target” reprogrammability. The LF2401A incorporates one 8K 16-bit
Flash EEPROM module in program space. The Flash module has two sectors that can be individually protected
while erasing or programming. The sector size is partitioned as 4K/4K sectors.
Unlike most discrete Flash memory, the LF2401A Flash does not require a dedicated state machine, because
the algorithms for programming and erasing the Flash are executed by the DSP core. This enables several
advantages, including: reduced chip size and sophisticated, adaptive algorithms. For production programming,
the IEEE Standard 1149.1† (JTAG) scan port provides easy access to the on-chip RAM for downloading the
algorithms and Flash code. This Flash requires 5 V for programming (at VCCP pin only) the array. The Flash runs
at zero wait state while the device is powered at 3.3 V.
boot ROM†
Boot ROM is a 256-word ROM mapped in program space 0000h−00FFh. This ROM will be enabled if the
BOOT_EN mode is enabled during reset. Boot-enable function is implemented using combinational logic of the
TDI, TRST, and RS pins as described below. The on-chip bootloader is invoked when:
TRST = 0
RS = 0
TDI = 0
(In addition to the three pins mentioned above, the application must ensure that PDPINTA stays high during the
execution of the boot ROM code.) Since it has an internal pulldown, the TRST pin will be low, provided the JTAG
connector is not connected. Therefore, the BOOT_EN bit (bit 3 of the SCSR2 register) will be set to 0 if TDI is
low upon reset. If on-chip bootloader is desired while debugging with the JTAG connector connected
(TRST = 1), it can be achieved by writing a “0” into bit 3 of the SCSR2 register.
The boot ROM has a generic bootloader to transfer code through the SCI port. The incoming code should
disable the BOOT_ROM bit by writing 1 to bit 3 of the SCSR2 register, or else, the whole Flash array will not
be enabled.
The boot ROM code sets the PLL to x2 or x4 option based on the condition of the SCITXD pin during reset. The
SCITXD pin should be pulled high/low to select the PLL multiplication factor. The choices made are as follows:
D If the SCITXD pin is pulled low, the PLL multiplier is set to 2.
D If the SCITXD pin is pulled high, the PLL multiplier is set to 4. (Default)
D If the SCITXD pin is not driven at reset, the internal pullup selects the default multiplier of 4.
Care should be taken such that a combination of CLKIN and the PLL multiplication factor does not result in a
CPU clock speed of greater than 40 MHz, the maximum rated speed. For restrictions concerning the maximum
frequency of CLKIN, see the latest revision of the TMS320LF2401A DSP Controller Silicon Errata (literature
number SPRZ013).
Furthermore, when the bootloader is used, only specific values of CLKIN would result in a baud-lock for the SCI.
Refer to the TMS320LF/LC240xA DSP Controllers Reference Guide: System and Peripherals (literature
number SPRU357) for more details about the bootloader operation.
Flash/ROM security
The 2401A device has a security feature that prevents external access to Flash/ROM memory. This feature is
useful in preventing unauthorized duplication of proprietary code resident on the Flash/ROM memory.
If access to Flash/ROM contents are desired for debugging purposes, two actions need to be taken:
1. A “dummy” read of locations 40h, 41h, 42h and 43h (of program memory space) is necessary. The word
“dummy” indicates that the destination address of this read is not relevant. If 40h−43h contain all zeros or
ones, then Step 2 is not required.
2. A 64-bit password (split as four 16-bit words) must be written to the data-memory locations 77F0h, 77F1h,
77F2h, and 77F3h. The four 16-bit words written to these locations must match the four words stored in 40h,
41h, 42h, and 43h (of program memory space), respectively. The device becomes “unsecured” one cycle
after the last instruction that unsecures the part.
PERIPHERALS
The integrated peripherals of the TMS320Lx2401A are described in the following subsections:
D Event-manager module (EVA)
D Enhanced analog-to-digital converter (ADC) module
D Serial communications interface (SCI) module
D PLL-based clock module
D Digital I/O and shared pin functions
D Watchdog (WD) timer module
16 3
16
16
EV Control Registers ADC Start of
and Control Logic Conversion
16 GP Timer 1
Compare
16 CLKOUT
GP Timer 1 Prescaler
(Internal)
T1CON[8,9,10]
16
SVPWM PWM1
16 Full-Compare 3 State 3 Deadband 3 Output
Units Machine Units Logic
PWM6
16 GP Timer 2 Output
Compare Logic T2PWM
16
GP Timer 2 Prescaler CLKOUT
(Internal)
T2CON[8,9,10]
16
16
MUX
16
Capture Unit CAP1
16
PWM characteristics
Characteristics of the PWMs are as follows:
D 16-bit registers
D Programmable deadband for the PWM output pairs, from 0 to 12 µs
D Minimum deadband width of 25 ns
D Change of the PWM carrier frequency for PWM frequency wobbling as needed
D Change of the PWM pulse widths within and after each PWM period as needed
D External-maskable power and drive-protection interrupts
D Pulse-pattern-generator circuit, for programmable generation of asymmetric, symmetric, and four-space
vector PWM waveforms
D Minimized CPU overhead using auto-reload of the compare and period registers
D The PWM pins are driven to a high-impedance state when the PDPINTA pin is driven low and after
PDPINTA signal qualification. The status of the PDPINTA pin (after qualification) is reflected in bit 8 of the
COMCONA register.
capture unit
The capture unit provides a logging function for different events or transitions. The values of the selected GP
timer counter is captured and stored in the two-level-deep FIFO stack when selected transitions are detected
on the capture input pin, CAP1. The capture unit consists of three capture circuits.
The capture unit includes the following features:
D One 16-bit capture control register, CAPCONA (R/W)
D One 16-bit capture FIFO status register, CAPFIFOA
D Selection of GP timer 1/2 as the time base
D One 16-bit 2-level-deep FIFO stack
D One capture input pin (CAP1). [The input is synchronized with the device (CPU) clock. In order for a
transition to be captured, the input must hold at its current level to meet two rising edges of the device clock.]
D User-specified transition (rising edge, falling edge, or both edges) detection
D One maskable interrupt flag
input qualifier circuitry
An input-qualifier circuitry qualifies the input signal to the CAP1, XINT1/2, ADCSOC, and PDPINTA pins in the
2401A device. (The I/O functions of these pins do not use the input-qualifier circuitry). The state of the internal
input signal will change only after the pin is high/low for 6(12) clock edges. This ensures that a glitch smaller
than 5(11) CLKOUT cycles wide will not change the internal pin input state. The user must hold the pin high/low
for 6(12) cycles to ensure the device will see the level change. Bit 6 of the SCSR2 register controls whether
6 clock edges (bit 6 = 0) or 12 clock edges (bit 6 = 1) are used to block 5- or 11-cycle glitches.
ADCIN01
10-Bit
ADC Result Reg 7 70AFh
ADCIN02 Module Result Reg 8 70B0h
(500 ns)
ADCIN03
ADCIN04
Result Reg 15 70B7h
To obtain the specified accuracy of the ADC, proper board layout is very critical. To the best extent possible,
traces leading to the ADCINn pins should not run in close proximity to the digital signal paths. This is to minimize
switching noise on the digital lines from getting coupled to the ADC inputs. Furthermore, proper isolation
techniques must be used to isolate the ADC module power pins (such as VCCA and VSSA) from the digital supply.
Unused ADC inputs should be connected to analog ground for improved accuracy and ESD protection.
† SCI speed will be limited by the I/O buffer speed and external transceiver performance.
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
TXSHF TXENA
SCITXD
Register SCITXD
SCICTL1.1
SCIHBAUD. 15 −8
SCI Priority Level
Baud Rate 1
MSbyte Level 5 Int.
Register 0
Internal Level 1 Int.
Clock SCI TX
SCILBAUD. 7 −0 Priority
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
XTAL1/CLKIN
Fin
Cb1 PLL CLKOUT
RESONATOR/ XTAL
CRYSTAL OSC
3-bit
PLL Select
XTAL2 (SCSR1.[11:9])
Cb2
CAUTION:
The bootloader sets the PLL to x2 or x4 option. If the bootloader is used, the value of CLKIN
used should not force CLKOUT to exceed the maximum rated device speed. See the “Boot
ROM” section for more details.
NOTE A: TI 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.
low-power modes
The 2401A has an IDLE instruction. When executed, the IDLE instruction stops the clocks to all circuits in the
CPU, but the clock output from the CPU continues to run. With this instruction, the CPU clocks can be shut down
to save power while the peripherals (clocked with CLKOUT) continue to run. The CPU exits the IDLE state if
it is reset, or, if it receives an interrupt request.
clock domains
All 2401A-based devices have two clock domains:
1. CPU clock domain − consists of the clock for most of the CPU logic
2. System clock domain − consists of the peripheral clock (which is derived from CLKOUT of the CPU) and
the clock for the interrupt logic in the CPU.
When the CPU goes into IDLE mode, the CPU clock domain is stopped while the system clock domain continues
to run. This mode is also known as IDLE1 mode. The 2401A CPU also contains support for a second IDLE mode,
IDLE2. By asserting IDLE2 to the 2401A CPU, both the CPU clock domain and the system clock domain are
stopped, allowing further power savings. A third low-power mode, HALT mode, the deepest, is possible if the
oscillator and WDCLK are also shut down when in IDLE2 mode.
Two control bits, LPM1 and LPM0, specify which of the three possible low-power modes is entered when the
IDLE instruction is executed (see Table 9). These bits are located in the System Control and Status
Register 1 (SCSR1), and they are described in the TMS320LF/LC240xA DSP Controllers Reference Guide:
System and Peripherals (literature number SPRU357).
Peripheral
Interrupt,
IDLE1 − (LPM0) 00 Off On On On On On External Interrupt,
Reset,
PDPINTA
Wakeup
Interrupts,
IDLE2 − (LPM1) 01 Off Off On On On On External Interrupt,
Reset,
PDPINTA
† The Flash must be powered down by the user code prior to entering LPM2. For more details, see the TMS320LF/LC240xA DSP Controllers
Reference Guide: System and Peripherals (literature number SPRU357).
CAUTION:
The bit definitions of the MCRA, PADATDIR, and PBDATDIR registers are not compatible
with those of other 24x/240x/240xA devices.
000
001
010
WDPS 011
WDCR.2 − 100
0 0
2 1 101
110
WDCR.6 111 WDFLAG
WDDIS WDCR.7 Reset Flag
WDCNTR.7 −0
8-Bit Watchdog
Counter One-Cycle Internal
Delay PS/257 Pullup
CLR
RS pin
WDKEY.7 −0 System
Bad Key Reset
Watchdog 55 + AA Request
Reset Key Good Key WDCHK2−0
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.
development support
Texas Instruments (TI) offers an extensive line of development tools for the 240x 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 240x-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 x24x multiprocessor system debug)
TMS320LF2407 EVM (Evaluation module for 2407 DSP)
See Table 13 and Table 14 for complete listings of development support tools for the 240x. For information on
pricing and availability, contact the nearest TI field sales office or authorized distributor.
Table 13. Development Support Tools
DEVELOPMENT TOOL PLATFORM PART NUMBER
Software
Code Composer Studio v.2.2 PC TMDSCCS2000-1
Hardware − Emulation Debug Tools
XDS510PP Pod (Parallel Port) with JTAG cable PC TMDS3P701014
XDS510, Code Composer Studio, and XDS510PP are trademarks of Texas Instruments.
PC is a trademark of International Business Machines Corp.
To designate the stages in the product development cycle, TI assigns prefixes to the part numbers of all
TMS320 DSP devices and support tools. Each TMS320 DSP commercial family member has one of three
prefixes: TMX, TMP, or TMS. Texas Instruments recommends two of three possible prefix designators for
support tools: TMDX and TMDS. These prefixes represent evolutionary stages of product development from
engineering prototypes (TMX / TMDX) through fully qualified production devices/tools (TMS / TMDS).
TMX and TMP devices and TMDX development-support tools are shipped with appropriate disclaimers
describing their limitations and intended uses. Experimental devices (TMX) may not be representative of a
final product and Texas Instruments reserves the right to change or discontinue these products without notice.
TMS devices and TMDS development-support tools have been characterized fully, and the quality and
reliability of the device have been demonstrated fully. TI’s standard warranty applies.
Predictions show that prototype devices ( TMX or TMP) have a greater failure rate than the standard
production devices. Texas Instruments recommends that these devices not be used in any production system
because their expected end-use failure rate still is undefined. Only qualified production devices are to be used.
PREFIX
TMX = experimental device TEMPERATURE RANGE
TMP = prototype device A = −40°C to 85°C
TMS = qualified device S = −40°C to 125°C
DEVICE
TECHNOLOGY 2401A
LC = Low-voltage CMOS (3.3 V)
LF = Flash EEPROM (3.3 V)
documentation support
Extensive documentation supports all of the TMS320 DSP 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. Useful reference documentation includes:
D Silicon Errata
− TMS320LF2401A, TMS320LC2401A DSP Controller Silicon Errata (literature number SPRZ013)
describes the known advisories of various revisions of the silicon.
D User’s Guides
− TMS320F/C24x DSP Controllers Reference Guide: CPU and Instruction Set (literature number
SPRU160) describes the TMS320C24x 16−bit fixed−point digital signal processor controller. Covered
are its architecture, internal register structure, data and program addressing, and instruction set. Also
includes instruction set comparisons and design considerations for using the XDS510 emulator.
− TMS320LF/LC240xA DSP Controllers Reference Guide: System and Peripherals (literature number
SPRU357). This reference guide describes the architecture, system hardware, peripherals, and
general operation of the TMS320Lx2407A/x2406A/x2404A/x2403A/x2402A/x2401A digital signal
processor (DSP) controllers. This book is also applicable to TMS320Lx2407/2406/2402 and future
derivatives of the 240x family.
D Application Reports
− Getting Started in C and Assembly Code with the TMS320LF240x DSP (literature number SPRA755)
This application report presents basic code for initializing and operating the TMS320LF240x DSP
devices. Two functionally equivalent example programs are presented: one written in assembly
language and the other in C language. Detailed discussions of each program are provided that explain
numerous compiler and assembler directives, code requirements, and hardware-related requirements.
The programs are ready to run on either the TMS320LF2407 Evaluation Module (EVM) or the eZdspo.si
LF2407 development kit. However, they are also intended for use as a code template for any
TMS320LF240x (LF240x) or TMS320LF240xA (LF240xA) DSP target system.
− Motor Speed Measurement Considerations Using TMS320C24x DSPs (literature number SPRA771)
The TMS320C24x generation of DSPs provide appropriate internal hardware for interfacing with
low-cost, external-speed sensors for motor speed measurement applications. The periodic output
signal from the speed sensor is applied to the capture input pin of the DSP and the signal’s period is
measured. This information is then used to calculate the motor speed. However, this calculation of
motor speed depends on several system parameters. These parameters affect the scaling and
normalization factors that must be used in the speed calculation routine for accurate measurements.
This application report, therefore, gives an analysis of the speed measurement system to show the
effect of system parameters on the calculated speed. The choice of appropriate scaling and
normalization factors for a given system is also discussed. Finally, code examples are given to show the
software implementation of the speed calculation routine.
− 3.3 V DSP for Digital Motor Control (literature number SPRA550) describes a scenario of a 3.3-V-only
motor controller indicating that for most applications, no significant issue of interfacing between 3.3 V
and 5 V exists. On-chip 3.3−V analog-to-digital converter (ADC) versus 5-V ADC is also discussed.
Guidelines for component layout and printed circuit board (PCB) design that can reduce system noise
and EMI effects are summarized.
To receive copies of TMS320 DSP 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 digital signal
processing research and education. The TMS320 DSP newsletter, Details on Signal Processing, is published
quarterly and distributed to update TMS320 DSP customers on product information.
Updated information on the TMS320 DSP controllers can be found on the worldwide web at:
http://www.ti.com.
To send comments regarding the TMS320LF2401A/TMS320LC2401A data sheet (literature number
SPRS161), use the [email protected] email address, which is a repository for feedback. For
questions and support, contact the Product Information Center listed at the
http://www.ti.com/sc/docs/pic/home.htm site.
This document contains information on products in more than one phase of development. The electrical
specifications for the TMS320LF2401A device are Production Data (PD) and those for the TMS320LC2401A
device are Product Preview (PP). These electrical specifications are subject to change.
absolute maximum ratings over operating temperature range (unless otherwise noted)†
Supply voltage range, VDD, VDDO, and VCCA (see Note 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . − 0.3 V to 4.6 V
VCCP range (LF2401A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . − 0.3 V to 5.5 V
Input voltage range, VIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . − 0.3 V to 4.6 V
Output voltage range, VO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . − 0.3 V to 4.6 V
Input clamp current, IIK (VIN < 0 or VIN > VCC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ± 20 mA
Output clamp current, IOK (VO < 0 or VO > VCC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ± 20 mA
Operating ambient temperature ranges, TA: A version‡ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . − 40°C to 85°C
S version‡ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . −40°C to 125°C
Storage temperature range, Tstg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . − 65°C to 150°C
† Clamp current 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.
‡ Long-term high-temperature storage and/or extended use at maximum temperature conditions may result in a reduction of overall device life.
For additional information, see IC Package Thermal Metrics Application Report (literature number SPRA953) and Reliability Data for
TMS320LF24x and TMS320F281x Devices Application Report (literature number SPRA963).
NOTE 1: All voltage values are with respect to VSS.
100
90
80
70
Current (mA)
60
I DD
50
40
30
20
10
0
0 5 10 15 20 25 30 35 40 45
CLKOUT Frequency (MHz)
Figure 21. LF2401A Typical Current Consumption (With Peripheral Clocks Enabled)
SCI 1.9
† ADC current shown is at 30 MHz.
VDD VDD
13 5
EMU0 EMU0 PD
14
EMU1 EMU1
2 4
TRST TRST GND
1 6
TMS TMS GND
3 8
TDI TDI GND
7 10
TDO TDO GND
11 12
TCK TCK GND
9
TCK_RET
DSP
JTAG Header
Figure 22. Emulator Connection Without Signal Buffering for the DSP
IOL
Tester Pin
Electronics
50 Ω Output
VLOAD Under
Test
CT
IOH
20%
0.4 V (VOL)
10%
0.8 V (VIL)
CI XTAL1
CO CLKOUT
RS RESET pin RS
INT XINT1, XINT2
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)
switching characteristics over recommended operating conditions [H = 0.5 tc(CO)] (see Figure 26)
PARAMETER PLL MODE MIN TYP MAX UNIT
tc(CO) Cycle time, CLKOUT X4 mode† 25 ns
tf(CO) Fall time, CLKOUT 4 ns
tr(CO) Rise time, CLKOUT 4 ns
tw(COL) Pulse duration, CLKOUT low LF2401A X4 mode† @ 2 mA load H −3 H H +3 ns
tw(COH) Pulse duration, CLKOUT high LF2401A X4 mode† @ 2 mA load H −3 H H +3 ns
tw(COL) Pulse duration, CLKOUT low LC2401A X4 mode† @ 2 mA load H −5 H H +5 ns
tw(COH) Pulse duration, CLKOUT high LC2401A X4 mode† @ 2 mA loadH −5 H H +5 ns
† Input frequency should be adjusted (CLK PS bits in SCSR1 register) such that CLKOUT = 40 MHz maximum, 2 MHz minimum.
tc(CI)
tw(CIH)
tf(Cl) tr(Cl)
tw(CIL)
XTAL1/CLKIN
tw(COH)
tw(COL) tf(CO)
tc(CO) tr(CO)
CLKOUT
Figure 26. CLKIN-to-CLKOUT Timing With PLL and External Clock in ×4 Mode
RS timing
timing requirements for a reset [H = 0.5tc(CO)] (see Figure 27 and Figure 28)
MIN NOM MAX UNIT
tw(RSL) Pulse duration, stable CLKIN to RS high 8tc(CI)† cycles
tw(RSL2) Pulse duration, RS low 8tc(CI) cycles
tp PLL lock-up time 98304tc(CI) cycles
td(EX) Delay time, reset vector executed after PLL lock time 36H cycles
† During power-on reset, the device can continue to hold the RS pin low for another 128 CLKIN cycles.
VDD/VDDO
td(EX)
tp
tw(RSL)
RS
CLKIN
XTAL1
(See tOSCST
Note B) (See Note C)
TDI TDI/OPB5
(See
Note D) BOOT_EN
CLKOUT
(See
Note E)
NOTES: A. Be certain that the emulation logic is reset before de-asserting the device reset. That is, TRST of the device is not driven high before
the device reset is de-asserted. This is applicable to XDS510, XDS510PP, and XDS510PP+ class of emulators. New
generation emulators such as SPI515 and XDS510 USB emulators have a built-in protection mechanism to take care of this
requirement.
B. XTAL1 refers to the internal oscillator clock if an on-chip oscillator is used.
C. tOSCST is the oscillator start-up time, which is dependent on crystal/resonator and board design.
D. The TDI pin is used to determine whether or not the on-chip boot ROM is invoked in the BOOT_EN phase. In the “TDI/OPB5” phase,
this pin functions as TDI (if TRST is high) or OPB5 (if TRST is low).
E. Unlike other 24x/240x devices, the CLKOUT signal does not appear on the CLKOUT pin by default (after a device reset). The
CLKOUT waveform depicted in the figure is present internally in the DSP. However, in order to route the internal CLKOUT signal
to the XINT2/ADCSOC/CAP1/IOPA7/CLKOUT pin, bit 7 of the MCRA register must be programmed appropriately.
RS timing (continued)
td(EX)
tp
tw(RSL2)
RS
CLKIN
XTAL1†
TDI‡ TDI/OPB5
BOOT_EN
CLKOUT§
RS timing (continued)
switching characteristics over recommended operating conditions for a reset [H = 0.5tc(CO)]
(see Figure 29)
PARAMETER MIN MAX UNIT
tw(RSL1) Watchdog reset pulse width 128tc(CI) ns
td(EX) Delay time, reset vector executed after PLL lock time 36H ns
tp PLL lock time (input cycles) 98 304tc(CI) ns
td(EX)
tp
tw(RSL1)
RS
CLKIN
XTAL1†
TDI‡ TDI/OPB5
BOOT_EN
CLKOUT§
td(WAKE−A)
A0−A15
CLKOUT†‡
WAKE INT§
† In 2401A, CLKOUT will not be seen at the pin, only in some modes; it can be enabled in software.
‡ Unlike other 24x/240x devices, the CLKOUT signal does not appear on the CLKOUT pin by default (after a device reset). The CLKOUT waveform
depicted in the figure is present internally in the DSP. However, in order to route the internal CLKOUT signal to the
XINT2/ADCSOC/CAP1/IOPA7/CLKOUT pin, bit 7 of the MCRA register must be programmed appropriately.
§ WAKE INT can be any valid interrupt or RESET.
td(IDLE−COH)
A0−A15
CLKOUT†‡
WAKE INT§
td(WAKE−A)
† In 2401A, CLKOUT will not be seen at the pin, only in some modes; it can be enabled in software.
‡ Unlike other 24x/240x devices, the CLKOUT signal does not appear on the CLKOUT pin by default (after a device reset). The CLKOUT waveform
depicted in the figure is present internally in the DSP. However, in order to route the internal CLKOUT signal to the
XINT2/ADCSOC/CAP1/IOPA7/CLKOUT pin, bit 7 of the MCRA register must be programmed appropriately.
§ WAKE INT can be any valid interrupt or RESET.
td(EX)
tp
A0−A15
td(IDLE−OSC)
td(IDLE−COH)
CLKOUT
td(WAKE−OSC)
tw(RSL)
RESET
† In 2401A, CLKOUT will not be seen at the pin, only in some modes; it can be enabled in software.
‡ Unlike other 24x/240x devices, the CLKOUT signal does not appear on the CLKOUT pin by default (after a device reset). The CLKOUT waveform
depicted in the figure is present internally in the DSP. However, in order to route the internal CLKOUT signal to the
XINT2/ADCSOC/CAP1/IOPA7/CLKOUT pin, bit 7 of the MCRA register must be programmed appropriately.
tOSC†
tp
CLKIN
CLKOUT‡§
tw(PDP−WAKE)
PDPINTA
td(PDP-PWM)HZ
PWM
td(INT)
PWM timing
PWM refers to all PWM outputs on EVA.
CLKOUT
td(PWM)CO
tw(PWM)
PWMx
capture timing
CLKOUT
tw(CAP)
CAP1
interrupt timing
INT refers to XINT1, XINT2, and PDPINTA.
CLKOUT
tw(PDP)
PDPINTA
td(PDP-PWM)HZ
PWM†
tw(INT)
XINT1, XINT2
td(INT)
† PWM refers to all the PWM pins in the device (i.e., PWMn and TnPWM pins). The state of the PWM pins after PDPINTA is taken
high depends on the state of the FCOMPOE bit.
CLKOUT
td(GPO)CO
GPIO
tr(GPO)
tf(GPO)
CLKOUT
tw(GPI)
GPIO
tc(AD)
Bit Converted 9 8 7 6 5 4 3 2 1 0
ADC Clock
Analog Input
ÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ tw(C)
EOC/Convert
tw(SH)
Internal Start/
Sample Hold
td(SOC−SH)
Start of Convert
td(EOC)
tw(SHC)
XFR to RESULTn
td(ADCINT)
ADC Interrupt
(In addition to the three pins mentioned above, the application must ensure that PDPINTA stays high during the
execution of the boot ROM code.) Since it has an internal pulldown, the TRST pin will be low, provided the JTAG
connector is not connected. Therefore, the BOOT_EN bit (bit 3 of the SCSR2 register) will be set to 0 if TDI is
low upon reset. If on-chip bootloader is desired while debugging with the JTAG connector connected
(TRST = 1), it can be achieved by writing a “0” into bit 3 of the SCSR2 register.
GPIO
The multiplexing scheme of the GPIO pins with other functional pins is different in the Lx2401A. Because of this,
the bit assignments for the MCRA, PADATDIR, and PBDATDIR registers of the Lx2401A is not compatible with
the bit assignments of the 240xA family.
EV
The Event Manager of the Lx2401A has reduced functionality when compared to that of the 240xA family.
Following are the important differences:
D There is no QEP unit.
D There is only one “Capture” input (CAP1).
D Although Timer 1 is present, there is no compare output pin (T1CMP/T1PWM).
D There is no provision to feed an external clock to the timers.
D There is no external direction control pin for the timers.
Due to these differences, some of the bits in the EV registers are not applicable in the Lx2401A and are shaded
gray. Refer to Table 16, Lx2401A DSP Peripheral Register Description, for more details.
ADC
The Lx2401A ADC has only five input channels as compared to eight or sixteen channels in the 240xA family.
Therefore, the 4-bit fields in the CHSELSEQn registers should be programmed with values from 0−4 only.
The Lx2401A ADC does not have dedicated VREFHI and VREFLO pins. Instead, the VCCA and VSSA pins provide
the necessary reference.
pins
The following pins, which are available in other 240xA devices, have been internally tied as indicated:
CAP2, CAP3 − low
TDIRA − low
TCLKINA − low
BIO − high
DINR
The device ID contained in the DINR register is 0810h for LF2401A and 0910h for LC2401A.
XF pin
The XF pin has to be enabled by writing a 1 to Bit 0 of the SCSR4 register before it can be used.
These bits are not applicable in the Lx2401A since either (i) the peripheral functionality is absent or (ii) the corre-
sponding pins have not been bonded out of the device.
These bits are not applicable in the Lx2401A since either (i) the peripheral functionality is absent or (ii) the corre-
sponding pins have not been bonded out of the device.
These bits are not applicable in the Lx2401A since either (i) the peripheral functionality is absent or (ii) the corre-
sponding pins have not been bonded out of the device.
These bits are not applicable in the Lx2401A since either (i) the peripheral functionality is absent or (ii) the cor-
responding pins have not been bonded out of the device.
These bits are not applicable in the Lx2401A since either (i) the peripheral functionality is absent or (ii) the corre-
sponding pins have not been bonded out of the device.
These bits are not applicable in the Lx2401A since either (i) the peripheral functionality is absent or (ii) the corre-
sponding pins have not been bonded out of the device.
These bits are not applicable in the Lx2401A since either (i) the peripheral functionality is absent or (ii) the corre-
sponding pins have not been bonded out of the device.
These bits are not applicable in the Lx2401A since either (i) the peripheral functionality is absent or (ii) the corre-
sponding pins have not been bonded out of the device.
MECHANICAL DATA
VF (S-PQFP-G32) PLASTIC QUAD FLATPACK
0,45 0,20 M
0,80
0,25
24 17
25 16
32 9
0,13 NOM
1 8
5,60 TYP
7,20
SQ
6,80 Gage Plane
9,20
SQ
8,80
0,25
0,05 MIN
0°−ā 7°
1,45
1,35
0,75
Seating Plane 0,45
4040172/D 04/00