•Serial Onboard Programming, No External
Programming Voltage Needed, Programmable
Code Protection by Security Fuse
•Bootstrap Loader
•On-Chip Emulation Module
•Family Members Include:
– MSP430F2232
– 8KB + 256B Flash Memory
– 16KB + 256B Flash Memory
– 512B RAM
– MSP430F2272
– 32KB + 256B Flash Memory
– 1KB RAM
– MSP430F2234
– 8KB + 256B Flash Memory
– 512B RAM
– MSP430F2254
– 16KB + 256B Flash Memory
– 512B RAM
– MSP430F2274
– 32KB + 256B Flash Memory
– 1KB RAM
•Available in a 38-Pin Thin Shrink Small-Outline
Package (TSSOP) (DA), 40-Pin QFN Package
(RHA), and 49-Pin Ball Grid Array Package
(YFF) (See Table 1)
•For Complete Module Descriptions, See the
MSP430x2xx Family User's Guide (SLAU144)
SLAS504G –JULY 2006–REVISED AUGUST 2012
1
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.
2MSP430 is a trademark of Texas Instruments.
3All other trademarks are the property of their respective owners.
PRODUCTION DATA information is current as of publication date.
Products conform to specifications per the terms of the Texas
Instruments standard warranty. Production processing does not
necessarily include testing of all parameters.
This integrated circuit can be damaged by ESD. Texas Instruments recommends that all integrated circuits be handled with
appropriate precautions. Failure to observe proper handling and installation procedures can cause damage.
ESD damage can range from subtle performance degradation to complete device failure. Precision integrated circuits may be more
susceptible to damage because very small parametric changes could cause the device not to meet its published specifications.
www.ti.com
DESCRIPTION
The Texas Instruments MSP430™ family of ultra-low-power microcontrollers consist of several devices featuring
different sets of peripherals targeted for various applications. The architecture, combined with five low-power
modes is optimized to achieve extended battery life in portable measurement applications. The device features a
powerful 16-bit RISC CPU, 16-bit registers, and constant generators that contribute to maximum code efficiency.
The digitally controlled oscillator (DCO) allows wake-up from low-power modes to active mode in less than 1 µs.
The MSP430F22x4/MSP430F22x2 series is an ultra-low-power mixed signal microcontroller with two built-in 16bit timers, a universal serial communication interface, 10-bit A/D converter with integrated reference and data
transfer controller (DTC), two general-purpose operational amplifiers in the MSP430F22x4 devices, and 32 I/O
pins.
Typical applications include sensor systems that capture analog signals, convert them to digital values, and then
process the data for display or for transmission to a host system. Stand-alone radio-frequency (RF) sensor front
ends are another area of application.
Table 1. Available Options
PACKAGED DEVICES
T
A
-40°C to 85°C
-40°C to 105°C
(1) For the most current package and ordering information, see the Package Option Addendum at the end of this document, or see the TI
web site at www.ti.com.
(2) Package drawings, thermal data, and symbolization are available at www.ti.com/packaging.
All MSP430™ microcontrollers include an Embedded Emulation Module (EEM) that allows advanced debugging
and programming through easy-to-use development tools. Recommended hardware options include:
ADC10, conversion clock
General-purpose digital I/O pin
BSL transmit
General-purpose digital I/O pin
Timer_A, capture: CCI1A input, compare: OUT1 output
General-purpose digital I/O pin
Timer_A, capture: CCI2A input, compare: OUT2 output
General-purpose digital I/O pin
Test Clock input for device programming and test
General-purpose digital I/O pin
Test Mode Select input for device programming and test
General-purpose digital I/O pin
Test Data Input or Test Clock Input for programming and test
General-purpose digital I/O pin
D23836I/OTimer_A, compare: OUT2 output
Test Data Output or Test Data Input for programming and test
General-purpose digital I/O pin
ADC10, analog input A0
General-purpose digital I/O pin
Timer_A, clock signal at INCLK
SMCLK signal output
ADC10, analog input A1
General-purpose digital I/O pin
ADC10, analog input A2
General-purpose digital I/O pin
F32927I/O
G33028I/O
C2340I/O
Timer_A, capture CCI1B input, compare: OUT1 output
ADC10, analog input A3
Negative reference voltage input
General-purpose digital I/O pin
Timer_A, compare: OUT2 output
ADC10, analog input A4
Positive reference voltage output or input
General-purpose digital I/O pin
Input for external DCO resistor to define DCO frequency
Input terminal of crystal oscillator
General-purpose digital I/O pin
QFN PadNANAPadNAQFN package pad; connection to DVSSrecommended.
YFFDARHA
E4, E5
NO.I/ODESCRIPTION
General-purpose digital I/O pin
Timer_B, clock signal TBCLK input
Reset or nonmaskable interrupt input
Spy-Bi-Wire test data input/output during programming and test
Selects test mode for JTAG pins on Port 1. The device protection fuse is
connected to TEST.
Spy-Bi-Wire test clock input during programming and test
ADC10, conversion clock
General-purpose digital I/O pin
BSL transmit
General-purpose digital I/O pin
Timer_A, capture: CCI1A input, compare: OUT1 output
General-purpose digital I/O pin
Timer_A, capture: CCI2A input, compare: OUT2 output
General-purpose digital I/O pin
Test Clock input for device programming and test
General-purpose digital I/O pin
Test Mode Select input for device programming and test
General-purpose digital I/O pin
Test Data Input or Test Clock Input for programming and test
General-purpose digital I/O pin
D23836I/OTimer_A, compare: OUT2 output
Test Data Output or Test Data Input for programming and test
General-purpose digital I/O pin
ACLK output
ADC10, analog input A0
OA0, analog input IO
General-purpose digital I/O pin
Timer_A, clock signal at INCLK
B497I/OSMCLK signal output
ADC10, analog input A1
OA0, analog output
General-purpose digital I/O pin
Timer_A, capture: CCI0B input/BSL receive, compare: OUT0 output
ADC10, analog input A2
OA0, analog input I1
General-purpose digital I/O pin
Timer_A, capture CCI1B input, compare: OUT1 output
F32927I/O
ADC10, analog input A3
Negative reference voltage input
OA1, analog input I1
OA1, analog output
General-purpose digital I/O pin
Timer_A, compare: OUT2 output
G33028I/OADC10, analog input A4
Positive reference voltage output or input
OA1, analog input I/O
C2340I/O
B5119I/O
A61210I/OUSCI_B0 SPI mode: slave in/master out
G62523I/OUSCI_A0 UART mode: transmit data output
G52624I/OUSCI_A0 UART mode: receive data input
General-purpose digital I/O pin
Input for external DCO resistor to define DCO frequency
Input terminal of crystal oscillator
General-purpose digital I/O pin
Output terminal of crystal oscillator
General-purpose digital I/O pin
General-purpose digital I/O pin
USCI_B0 slave transmit enable
USCI_A0 clock input/output
ADC10, analog input A5
General-purpose digital I/O pin
USCI_B0 I2C mode: SDA I2C data
General-purpose digital I/O pin
USCI_B0 I2C mode: SCL I2C clock
General-purpose digital I/O pin
USCI_A0 slave transmit enable
General-purpose digital I/O pin
USCI_A0 SPI mode: slave in/master out
General-purpose digital I/O pin
USCI_A0 SPI mode: slave out/master in
General-purpose digital I/O pin
OA0 analog input I2
General-purpose digital I/O pin
OA1 analog input I2
General-purpose digital I/O pin
Timer_B, capture: CCI0A input, compare: OUT0 output
General-purpose digital I/O pin
Timer_B, capture: CCI1A input, compare: OUT1 output
General-purpose digital I/O pin
Timer_B, capture: CCI2A input, compare: OUT2 output
(2)
www.ti.com
(2) If XOUT/P2.7 is used as an input, excess current flows until P2SEL.7 is cleared. This is due to the oscillator output driver connection to
QFN PadNANAPadNAQFN package pad; connection to DVSSrecommended.
YFFDARHA
E4, E5
NO.I/ODESCRIPTION
General-purpose digital I/O pin
Timer_B, capture: CCI0B input, compare: OUT0 output
ADC10 analog input A12
OA0 analog output
General-purpose digital I/O pin
Timer_B, capture: CCI1B input, compare: OUT1 output
ADC10 analog input A13
OA1 analog output
General-purpose digital I/O pin
Timer_B, compare: OUT2 output
ADC10 analog input A14
OA0 analog input I3
General-purpose digital I/O pin
Timer_B, switch all TB0 to TB3 outputs to high impedance
ADC10 analog input A15
OA1 analog input I3
General-purpose digital I/O pin
Timer_B, clock signal TBCLK input
Reset or nonmaskable interrupt input
Spy-Bi-Wire test data input/output during programming and test
Selects test mode for JTAG pins on Port 1. The device protection fuse is
connected to TEST.
Spy-Bi-Wire test clock input during programming and test
The MSP430™ CPU has a 16-bit RISC architecture
that is highly transparent to the application. All
operations, other than program-flow instructions, are
performed as register operations in conjunction with
seven addressing modes for source operand and four
addressing modes for destination operand.
The CPU is integrated with 16 registers that provide
reduced instruction execution time. The register-toregister operation execution time is one cycle of the
CPU clock.
Four of the registers, R0 to R3, are dedicated as
program counter, stack pointer, status register, and
constantgeneratorrespectively.Theremaining
registers are general-purpose registers.
Peripherals are connected to the CPU using data,
address, and control buses and can be handled with
all instructions.
Instruction Set
The instruction set consists of 51 instructions with
three formats and seven address modes. Each
instruction can operate on word and byte data.
Table 5 shows examples of the three types of
instruction formats; Table 6 shows the address
modes.
www.ti.com
Dual operands, source-destinationADD R4,R5R4 + R5 → R5
Single operands, destination onlyCALL R8PC → (TOS), R8 → PC
Relative jump, unconditional/conditionalJNEJump-on-equal bit = 0
The MSP430 microcontrollers have one active mode and five software-selectable low-power modes of operation.
An interrupt event can wake up the device from any of the five low-power modes, service the request, and
restore back to the low-power mode on return from the interrupt program.
The following six operating modes can be configured by software:
•Active mode (AM)
– All clocks are active.
•Low-power mode 0 (LPM0)
– CPU is disabled.
– ACLK and SMCLK remain active. MCLK is disabled.
•Low-power mode 1 (LPM1)
– CPU is disabled ACLK and SMCLK remain active. MCLK is disabled.
– DCO dc-generator is disabled if DCO not used in active mode.
•Low-power mode 2 (LPM2)
– CPU is disabled.
– MCLK and SMCLK are disabled.
– DCO dc-generator remains enabled.
– ACLK remains active.
•Low-power mode 3 (LPM3)
– CPU is disabled.
– MCLK and SMCLK are disabled.
– DCO dc-generator is disabled.
– ACLK remains active.
•Low-power mode 4 (LPM4)
– CPU is disabled.
– ACLK is disabled.
– MCLK and SMCLK are disabled.
– DCO dc-generator is disabled.
– Crystal oscillator is stopped.
The interrupt vectors and the power-up starting address are located in the address range of 0FFFFh to 0FFC0h.
The vector contains the 16-bit address of the appropriate interrupt handler instruction sequence.
If the reset vector (located at address 0FFFEh) contains 0FFFFh (for example, if flash is not programmed), the
CPU goes into LPM4 immediately after power up.
(1) A reset is generated if the CPU tries to fetch instructions from within the module register memory address range (0h to 01FFh) or from
within unused address range.
(2) Multiple source flags
(3) (non)-maskable: the individual interrupt-enable bit can disable an interrupt event, but the general interrupt enable cannot.
Nonmaskable: neither the individual nor the general interrupt-enable bit will disable an interrupt event.
(4) Interrupt flags are located in the module.
(5) This location is used as bootstrap loader security key (BSLSKEY).
A 0AA55h at this location disables the BSL completely.
A zero (0h) disables the erasure of the flash if an invalid password is supplied.
(6) The interrupt vectors at addresses 0FFDCh to 0FFC0h are not used in this device and can be used for regular program code if
Most interrupt and module enable bits are collected into the lowest address space. Special function register bits
not allocated to a functional purpose are not physically present in the device. Simple software access is provided
with this arrangement.
Legend
rwBit can be read and written.
rw-0, 1Bit can be read and written. It is Reset or Set by PUC.
rw-(0), (1)Bit can be read and written. It is Reset or Set by POR.
SFR bit is not present in device.
Table 8. Interrupt Enable 1
Address76543210
00hACCVIENMIIEOFIEWDTIE
rw-0rw-0rw-0rw-0
WDTIEWatchdog timer interrupt enable. Inactive if watchdog mode is selected. Active if watchdog timer is configured in interval
WDTIFGSet on watchdog timer overflow (in watchdog mode) or security key violation.
Reset on VCCpower-up or a reset condition at RST/NMI pin in reset mode.
OFIFGFlag set on oscillator fault
RSTIFGExternal reset interrupt flag. Set on a reset condition at RST/NMI pin in reset mode. Reset on VCCpower up.
PORIFGPower-on reset interrupt flag. Set on VCCpower up.
NMIIFGSet via RST/NMI pin
Table 11. Interrupt Flag Register 2
Address76543210
03hUCB0TXIFG UCB0RXIFG UCA0TXIFG UCA0RXIFG
rw-1rw-0rw-1rw-0
UCA0RXIFGUSCI_A0 receive-interrupt flag
UCA0TXIFGUSCI_A0 transmit-interrupt flag
UCB0RXIFGUSCI_B0 receive-interrupt flag
UCB0TXIFGUSCI_B0 transmit-interrupt flag
The MSP430 bootstrap loader (BSL) enables users to program the flash memory or RAM using a UART serial
interface. Access to the MSP430 memory via the BSL is protected by user-defined password. For complete
description of the features of the BSL and its implementation, see the MSP430 Programming Via the BootstrapLoader User’s Guide (SLAU319).
The flash memory can be programmed via the JTAG port, the bootstrap loader, or in-system by the CPU. The
CPU can perform single-byte and single-word writes to the flash memory. Features of the flash memory include:
•Flash memory has n segments of main memory and four segments of information memory (A to D) of
64 bytes each. Each segment in main memory is 512 bytes in size.
•Segments 0 to n may be erased in one step, or each segment may be individually erased.
•Segments A to D can be erased individually, or as a group with segments 0 to n.
Segments A to D are also called information memory.
•Segment A contains calibration data. After reset, segment A is protected against programming and erasing. It
can be unlocked, but care should be taken not to erase this segment if the device-specific calibration data is
required.
Peripherals are connected to the CPU through data, address, and control buses and can be handled using all
instructions. For complete module descriptions, see the MSP430x2xx Family User's Guide (SLAU144).
Oscillator and System Clock
The clock system is supported by the basic clock module that includes support for a 32768-Hz watch crystal
oscillator, an internal very-low-power low-frequency oscillator, an internal digitally-controlled oscillator (DCO), and
a high-frequency crystal oscillator. The basic clock module is designed to meet the requirements of both low
system cost and low power consumption. The internal DCO provides a fast turn-on clock source and stabilizes in
less than 1 µs. The basic clock module provides the following clock signals:
•Auxiliary clock (ACLK), sourced from a 32768-Hz watch crystal, a high-frequency crystal, or the internal verylow-power LF oscillator.
•Main clock (MCLK), the system clock used by the CPU.
•Sub-Main clock (SMCLK), the sub-system clock used by the peripheral modules.
Table 14. DCO Calibration Data
(Provided From Factory in Flash Information Memory Segment A)
DCO FREQUENCYCALIBRATION REGISTERSIZEADDRESS
1 MHz
8 MHz
12 MHz
16 MHz
CALBC1_1MHZbyte010FFh
CALDCO_1MHZbyte010FEh
CALBC1_8MHZbyte010FDh
CALDCO_8MHZbyte010FCh
CALBC1_12MHZbyte010FBh
CALDCO_12MHZbyte010FAh
CALBC1_16MHZbyte010F9h
CALDCO_16MHZbyte010F8h
Brownout
The brownout circuit is implemented to provide the proper internal reset signal to the device during power on and
power off.
Digital I/O
There are four 8-bit I/O ports implemented—ports P1, P2, P3, and P4:
•All individual I/O bits are independently programmable.
•Any combination of input, output, and interrupt condition is possible.
•Edge-selectable interrupt input capability for all eight bits of port P1 and P2.
•Read/write access to port-control registers is supported by all instructions.
•Each I/O has an individually programmable pullup/pulldown resistor.
Because there are only three I/O pins implemented from port P2, bits [5:1] of all port P2 registers read as 0, and
write data is ignored.
Watchdog Timer (WDT+)
The primary function of the WDT+ module is to perform a controlled system restart after a software problem
occurs. If the selected time interval expires, a system reset is generated. If the watchdog function is not needed
in an application, the module can be disabled or configured as an interval timer and can generate interrupts at
selected time intervals.
Timer_A3 is a 16-bit timer/counter with three capture/compare registers. Timer_A3 can support multiple
capture/compares, PWM outputs, and interval timing. Timer_A3 also has extensive interrupt capabilities.
Interrupts may be generated from the counter on overflow conditions and from each of the capture/compare
registers.
Table 15. Timer_A3 Signal Connections
INPUT PIN NUMBERDEVICEMODULEMODULEOUTPUT PIN NUMBER
Timer_B3 is a 16-bit timer/counter with three capture/compare registers. Timer_B3 can support multiple
capture/compares, PWM outputs, and interval timing. Timer_B3 also has extensive interrupt capabilities.
Interrupts may be generated from the counter on overflow conditions and from each of the capture/compare
registers.
Table 16. Timer_B3 Signal Connections
INPUT PIN NUMBERDEVICEMODULEMODULEOUTPUT PIN NUMBER
The USCI module is used for serial data communication. The USCI module supports synchronous
communication protocols like SPI (3 or 4 pin), I2C and asynchronous communication protocols such as UART,
enhanced UART with automatic baudrate detection (LIN), and IrDA.
USCI_A0 provides support for SPI (3 or 4 pin), UART, enhanced UART, and IrDA.
USCI_B0 provides support for SPI (3 or 4 pin) and I2C.
ADC10
The ADC10 module supports fast, 10-bit analog-to-digital conversions. The module implements a 10-bit SAR
core, sample select control, reference generator and data transfer controller, or DTC, for automatic conversion
result handling allowing ADC samples to be converted and stored without any CPU intervention.
The MSP430F22x4 has two configurable low-current general-purpose operational amplifiers. Each OA input and
output terminal is software-selectable and offer a flexible choice of connections for various applications. The OA
op amps primarily support front-end analog signal conditioning prior to analog-to-digital conversion.
ADC memoryADC10MEM1B4h
ADC control register 1ADC10CTL11B2h
ADC control register 0ADC10CTL01B0h
ADC analog enable 0ADC10AE004Ah
ADC analog enable 1ADC10AE104Bh
ADC data transfer control register 1ADC10DTC1049h
ADC data transfer control register 0ADC10DTC0048h
OA1 (MSP430F22x4 only)Operational Amplifier 1 control register 1OA1CTL10C3h
Operational Amplifier 1 control register 1OA1CTL00C2h
OA0 (MSP430F22x4 only)Operational Amplifier 0 control register 1OA0CTL10C1h
Operational Amplifier 0 control register 1OA0CTL00C0h
USCI_B0USCI_B0 transmit bufferUCB0TXBUF06Fh
USCI_B0 receive bufferUCB0RXBUF06Eh
USCI_B0 statusUCB0STAT06Dh
USCI_B0 bit rate control 1UCB0BR106Bh
USCI_B0 bit rate control 0UCB0BR006Ah
USCI_B0 control 1UCB0CTL1069h
USCI_B0 control 0UCB0CTL0068h
USCI_B0 I2C slave addressUCB0SA011Ah
USCI_B0 I2C own addressUCB0OA0118h
USCI_A0USCI_A0 transmit bufferUCA0TXBUF067h
USCI_A0 receive bufferUCA0RXBUF066h
USCI_A0 statusUCA0STAT065h
USCI_A0 modulation controlUCA0MCTL064h
USCI_A0 baud rate control 1UCA0BR1063h
USCI_A0 baud rate control 0UCA0BR0062h
USCI_A0 control 1UCA0CTL1061h
USCI_A0 control 0UCA0CTL0060h
USCI_A0 IrDA receive controlUCA0IRRCTL05Fh
USCI_A0 IrDA transmit controlUCA0IRTCTL05Eh
USCI_A0 auto baud rate controlUCA0ABCTL05Dh
Basic Clock System+Basic clock system control 3BCSCTL3053h
Basic clock system control 2BCSCTL2058h
Basic clock system control 1BCSCTL1057h
DCO clock frequency controlDCOCTL056h
Port P4Port P4 resistor enableP4REN011h
Port P4 selectionP4SEL01Fh
Port P4 directionP4DIR01Eh
Port P4 outputP4OUT01Dh
Port P4 inputP4IN01Ch
Port P3Port P3 resistor enableP3REN010h
Port P3 selectionP3SEL01Bh
Port P3 directionP3DIR01Ah
Port P3 outputP3OUT019h
Port P3 inputP3IN018h
Port P2Port P2 resistor enableP2REN02Fh
Port P2 selectionP2SEL02Eh
Port P2 interrupt enableP2IE02Dh
Port P2 interrupt edge selectP2IES02Ch
Port P2 interrupt flagP2IFG02Bh
Port P2 directionP2DIR02Ah
Port P2 outputP2OUT029h
Port P2 inputP2IN028h
Table 20. Peripherals With Byte Access (continued)
MODULEREGISTER NAMESHORT NAMEADDRESS
Port P1Port P1 resistor enableP1REN027h
Port P1 selectionP1SEL026h
Port P1 interrupt enableP1IE025h
Port P1 interrupt edge selectP1IES024h
Port P1 interrupt flagP1IFG023h
Port P1 directionP1DIR022h
Port P1 outputP1OUT021h
Port P1 inputP1IN020h
Supply voltage range,
during flash memory
programming
Supply voltage range,
during program execution
Legend:
7.5 MHz
MSP430F22x2
MSP430F22x4
SLAS504G –JULY 2006–REVISED AUGUST 2012
Absolute Maximum Ratings
Voltage applied at VCCto V
Voltage applied to any pin
SS
(2)
(1)
-0.3 V to 4.1 V
-0.3 V to VCC+ 0.3 V
www.ti.com
Diode current at any device terminal±2 mA
Storage temperature, T
stg
(3)
Unprogrammed device-55°C to 150°C
Programmed device-55°C to 150°C
(1) Stresses beyond those listed under absolute maximum ratingsmay 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 operatingconditionsis not implied. Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability.
(2) All voltages referenced to VSS. The JTAG fuse-blow voltage, VFB, is allowed to exceed the absolute maximum rating. The voltage is
applied to the TEST pin when blowing the JTAG fuse.
(3) Higher temperature may be applied during board soldering process according to the current JEDEC J-STD-020 specification with peak
reflow temperatures not higher than classified on the device label on the shipping boxes or reels.
Recommended Operating Conditions
(1)(2)
MINNOMMAX UNIT
V
CC
V
SS
T
A
f
SYSTEM
During program
Supply voltageAVCC= DVCC= V
CC
execution
During program/erase
flash memory
Supply voltageAVSS= DVSS= V
Operating free-air temperature°C
Processor frequency
(maximum MCLK frequency)
(see Figure 1)
(1) All inputs are tied to 0 V or VCC. Outputs do not source or sink any current.
(2) The currents are characterized with a Micro Crystal CC4V-T1A SMD crystal with a load capacitance of 9 pF. The internal and external
load capacitance is chosen to closely match the required 9 pF.
(1) All inputs are tied to 0 V or VCC. Outputs do not source or sink any current.
(2) The currents are characterized with a Micro Crystal CC4V-T1A SMD crystal with a load capacitance of 9 pF. The internal and external
load capacitance is chosen to closely match the required 9 pF.
(3) Current for brownout and WDT clocked by SMCLK included.
(4) Current for brownout and WDT clocked by ACLK included.
(5) Current for brownout included.