Académique Documents
Professionnel Documents
Culture Documents
Version 1.2
Agenda
Portfolio
2
ARM-Based Processors
32-bit ARM Cortex-M3 MCUs ARM Cortex-A8 MPUs
DSP DSP+ARM
Multi-core DSP
MSP430
Up to 25 MHz Flash 1 KB to 256 KB Analog I/O, ADC LCD, USB, RF
Measurement, Sensing, General Purpose
ARM Cortex-M3
Stellaris
Up to 100 MHz
Sitara
C6000 DaVinci
video processors
C6000
24.000 MMACS
C5000
Up to 300 MHz +Accelerator Up to 320KB RAM Up to 128KB ROM USB, ADC McBSP, SPI, I2C
Audio, Voice
OMAP
Medical, Biometrics
$0.25 to $9.00
$1.50 to $20.00
$1.00 to $8.00
$5.00 to $20.00
$5.00 to $200.00
$40 to $200.00
$3.00 to $10.00
Ultra-Low Power
230 A/MHz 1.9 A standby mode Wake up from standby in < 5 s Up to 25 MHz 8 MHz across entire operating range (1.8 - 3.6 V) 1.8V ISP flash erase & write Fail-safe, flexible clocking system Integrated LDO, BOR, WDT+, RTC Multi-channel DMA supports data movement in standby mode More connectivity: USB, RF AES encryption, RTC on backup battery User-defined Bootstrap Loader Industry-leading code density
Increased Performance
Innovative Features
MSP430 Generations
4
MSP430 Generations
1xx
Basic Clock System Core voltage same as supply voltage 16-bit CPU GPIO
2xx
Basic Clock System + Core voltage same as supply voltage 16-bit CPU, CPUX GPIO w/ pull-up and pull-down N/A Software RTC USCI, USI DMA up to 3-ch MPY16 ADC10,12 4-wire JTAG, some devices with Spy-Bi-Wire
4xx
FLL, FLL + Core voltage same as supply voltage 16-bit CPU, CPUX GPIO
5xx
Unified Clock System UCS Programmable Core Voltage with integrated PMM 16-bit CPUXV2 GPIO w/pull-up and pull-down, drive strength CRC16 True 32-bit RTC w/Alarms USCI, USB, RF DMA up to 8-ch MPY32 ADC12_A 4-wire JTAG and Spy-Bi-Wire
N/A Software RTC USART DMA up to 3-ch MPY16 ADC10,12 4-wire JTAG
N/A Software RTC with Basic Timer, Basic Timer + RTC USART, USCI DMA up to 3-ch MPY16, MPY32 ADC12 4-wire JTAG
MSP430 Generations
5
MSP430 Generations
Category
CPU Clock (max) Active Current (@ 3.0V, typical) 16MHz
515uA @ 1MHz 4.2mA @ 8MHz 9.1mA @ 16MHz
2xx
8MHz
4xx
25MHz
600uA @ 1MHz 4.8mA @ 8MHz N/A
5xx
290uA @ 1MHz 1.84mA @ 8MHz 230 uA/MHz 8.90mA @ 25MHz
0.9 1.1uA
0.1uA 2.2V
1.1 2.5uA
0.1uA 2.7V
P1/P2
N/A
P1/P2
N/A
N/A
500 uA 800 uA FLL LFXT1 XT2 (if available)
UCS
LFXT1
Roadmap
MSP430 Roadmap
FR57xx Device Production Development
100+ devices
F6/563x
BGM, Catalog
FRAM
F53xx
Gen Purpose
F550x
USB
F51x2 2xx-Catalog
16 MIPS 120 kB Flash 8 kB RAM 500 nA Standby 1.8 3.6V
F261x F241x F23x-F24x F23x0 F23x0 F22xx F21x2 F15x-F16x F13x-F14x F12xx F44x Fx42x Fx42x0 F41x FE42x2 F41x2
Lighting
L092
0.9V Native
F552x
USB
CC430
RF
5xx-6xx
25MIPS 256 kB Flash 16 kB RAM 1.8 3.6V FRAM, USB, RF 6xx: LCD Controller 160 uA/MIPS
F541x
F543xA
F21x1 G2xx5
F471xx
100+ devices
G2xx2
75+ devices
F11xx
4xx: LCD
16 MIPS 120 kB Flash 8 kB RAM LCD Controller, 160 segments 1.8 3.6V
1xx-Catalog
8MIPS 60 kB Flash 10 kB RAM 1.8 3.6 V
CPU
7
friendly
1MB
CPU
Address-word
Instruction
CPU
Cycle
Extension
UCS
8
Low Freq
32768 Hz crystal 10 kHz 32 kHz 4 32 MHz crystal 4 32 MHz crystal FLL multiple of reference
High Freq
ACLK / SMCLK / MCLK tree is fully orthogonal Clocks on demand MODOSC provided to modules
Operating Modes
9
CPU active Fast Peripherals Enabled 32 kHz Peripherals Enabled - RTC CPU disabled Fast Peripherals Enabled 32 kHz Peripherals Enabled RTC CPU disabled Fast Peripherals Disabled 32 kHz Peripherals Enabled
LPM0 70 uA
LPM3 1.9 uA
LPM4 1.2 uA
All clocks disabled Wake on interrupt Regulator & all clocks disabled No RAM retention BOR on nRST/NMI or Port I/O
Operating Range
10
Programmable VCORE maximizes power efficiency Lowering VCC or VCORE reduces system current
Mem Map
11
Beginning of MAIN flash moves according to RAM Vector table starts at 0xFF80
SYS
12
Brownout (BOR) (highest priority) RST/NMI (POR) DoBOR (BOR) Port_wakeup (BOR) Security violation (BOR) SVSL (POR) SVSH (POR) SVML_OVP (POR) SVMH_OVP (POR) DoPOR (POR) WDT time out (PUC) WDT key violation (PUC) KEYV flash key violation (PUC) PLL unlock (PUC) PERF peripheral/config area fetch (PUC)
Generates a constant that maps to the cause of last reset Simplifies reset handling
Reset events NMIs split into SYSNMI & UNMI SYSNMIs have higher priority Separate interrupt vectors
GPIO
13
Port mapping allows for additional digital signals to be mapped to one or several output pins.
PM_xxx denotes a port-mappable signal Datasheet specifies which ports can be mapped
Port mapping configuration is password protected Available on select MSP430 families. (Check the datasheet)
USCI
15
USCI - New standard MSP430 serial interface Auto clock start from any low power mode Two independent communication blocks Asynchronous communication modes UART standard and multiprocessor protocols UART with automatic Baud rate detection (LIN support) Two modulators support n/16 bit timing IrDA bit shaping encoder and decoder Synchronous communication modes SPI (Master & Slave modes, 3 & 4 wire) I2C (Master & Slave modes)
UxRXBUF Receiver Shift Register UCLKI ACLK SMCLK SMCLK URXD SOMI Baud-Rate Generator STE SIMO Transmit Shift Register UxTXBUF UTXD
UCLK
16
LCD distinguishes 6xx from 5xx Static, 2-, 3- or 4-mux displays Supports up to 196 LCD segments Blinking of individual segments Regulated charge pump Software-driver contrast control Integrated drivers to decouple LCD load from the bias generation
Encryption and decryption according to AES FIPS PUB 197 with 128-bit key Key expansion for en- and decryption Off-line key generation for decryption AES ready interrupt flag
USB
17
5xx + USB
Single-chip USB solution Just add USB connector & TI-supplied USB API software for the most common device classes (CDC/HID/MSC) USB + analog + ultra-low-power
+3.3V
DVCC
Power Supply CPU & Supervision RAM DMA 32x32 MPY CRC 16 Serial Comms Flash
PUR DD+
Comparator
ESD
TPD2E001DRL
ESD Protection Diode Array
4MHz
CC430
18
Low Power RF IC
Radio Frequency
MSP430 MCU
Application & Protocol processor
Low-power RF SoC
Ultra-low power High analog performance High level of integration Ease of development Sensor interface
Emulation
19
Used for in-system programming and emulation JTAG access can be locked using SW no fuse JTAG pins serve as 4 x pin GPIO port (Port J) Support for both 4-wire and 2-wire Spy-Bi-Wire Compatible with existing MSP430 tools
Emulation
20
Up to 8 hardware breakpoints with complex triggering capabilities 40-bit wide CPU cycle counters in hardware JTAG Mailbox system provides direct interface to the CPU during
State Storage: non-intrusive trace buffer for data and address bus (e.g., instruction fetch)
Block Diagram
21
MSP-EXP430F5438
22
MSP-EXP430F5438
Integrated backlight
23
Code Composer Studio v4.1: A single development platform for all TI processors
Enhancements:
Speed Code
Community Support
24
Processor Wiki
Growing
Blogs, Forums Extensive community support and idea exchange Global customer support http://e2e.ti.com
collection of technical wiki articles Tips & tricks, common pitfalls, and design ideas http://wiki.msp430.com
Lab_1
25
Agenda
26
Agenda
Minimize instantaneous current draw Maximize time spent in low power modes
The MSP430 is inherently low-power, but your design has a big impact on power efficiency Proper low-power design techniques make the difference
Slowing MCLK reduces instantaneous power, but usually increases active duty cycle
Power savings can be nullified The ULP sweet spot that maximizes performance for the minimum current consumption per MIPS: 8 MHz MCLK
5xx has integrated LDO with variable output voltage Optimize core voltage for chosen MCLK speed
Input voltages between VIL and VIH cause shoot-through if input is allowed to float (left unconnected) Driven as outputs Be driven at Vcc/ground by an external device Have a pull-up/down resistor
FLLREFCLK = XT1CLK ACLK = XT1CLK MCLK = DCOCLKDIV SMCLK = DCOCLKDIV DCOCKLDIV = DCOCLK / 2 DCO_freq ~= 2 MHz, so
FLLREFCLK sources:
PMM
33
Integrated Low Dropout (LDO) regulator: VCC VCORE VCORE is programmable to four levels Brown Out Reset (BOR) is always ON PMM is password protected
Unlock: Lock:
34
Change the low-side monitor threshold Change the core voltage level Wait until the core voltage level is reached Change supervisor threshold to match the monitor level
Decrease supervisor and monitor levels Decrease the core voltage level
Maximum Robustness
Fast Performance Mode 5 us wakeup from LPM2,3,4 +8 uA active & LPMx current consumption
Normal Performance Mode +800 nA active current consumption 0 nA LPM2,3,4 current consumption
Entering LPMs
36
Intrinsics
38
Intrinsic Functions:
__bic_SR_register(LPM3_bits); __bic_SR_register_on_exit(LPM3_bits); __bis_SR_register(LPM3_bits + GIE); __bis_SR_register_on_exit(unsigned short a); __get_SR_register(void); __get_SR_register_on_exit(void); __enable_interrupts( ); __disable_interrupts( );
39
LFXT1 reverts to REFO HFXT1 & XT2 revert to DCO On startup, LFXT1 will fail because quartz crystals are not instant-on Clearing the fault flags allows expected default operation
Modules place clock requests to the system clocks LPM3 entry can be prevented if a module requires SMCLK to operate properly User must be aware of the clocks required in the system.
Available Oscillators
40
High-Frequency
DCO HFXT1/ XT2 MODOSC
RTC
Lab_2
41
Using an ammeter and measure the current through the PWR1 jumper
FET
Agenda
42
Agenda
Comparator
43
ADC12_A
44
ADC12_A Features
Conversion Modes:
Repeat-sequence
45
ADC12_A Enhancements
50ppm vs. 100ppm Selectable speed vs power ADC12_A core is only enabled when needed
Higher clock dividers for faster system clocks ~6x lower current than ADC12
On-chip temperature sensor channel On-chip Vcc/2 channel The temperature sample period > 30 us Temp sensor offset voltage is large and must be calibrated
When the conversion result is written into the EOS ADC12MEMx register, the interrupt will be triggered.
48
Lab 3 code
49
// Poll IFG until ADC12MEM1 loaded signifying sequence is complete while(!(ADC12IFG & BIT1)); ADC12CTL0 &= ~ADC12ENC; REFCTL0 &= ~REFON; temp_temp = ADC12MEM0; temp_vcc = ADC12MEM1; // // // // Disable conversions to configure REF Disable internal reference Read ADC12 temperature conversion Read ADC12 Vcc/2 conversion
// Calculate temperature in degrees Celsius & format display string accordingly ... // Calculate temperature in degrees Fahrenheit & format display string accordingl ... // Calculate Vcc in volts & format display string accordingly ... /* Initialize serial communication module to send data over USB */ halUsbInit(); halUsbSendString(&USB_string[0],USB_STRING_LEN+2); halUsbShutDown(); // Shut down USB to enter sleep mode
__delay_cycles(2200000); } } // Delay 2 seconds
Alphabet Soup
50
(msp430x54xA.h file)
(User Guide)
Lab 3 Power
51
Lab 3 Power
540uA
Current
390uA 290uA
75us Active MCLK @1MHz=290uA 80us
Time
2 seconds until next Sample
CPU
__delay_cycles(2200000);
ADC12
52
Use ADC12 integrated temperature sensor Set up ADC12 to perform a single conversion Loop continuously, converting to Degrees F and C in software Touch the F5438A with a finger to change the temperature Open a watch window in the debugger to see the temperature values
FET
Agenda
53
Agenda
Timer Architecture
54
Timer Architecture
PWM outputs
Interrupt vector register for fast decoding Can trigger DMA transfer On all MSP430s
Timer Modes
55
Interrupts
56
Timer_B Interrupts
The Timer_B Capture/Comparison Register 0 Interrupt Flag (TBCCR0) generates a single interrupt vector: TBCCR0 CCIFG TIMERB0_VECTOR
No handler is required
TBCCR1-6 and TB interrupt flags are prioritized and combined using the Timer_B Interrupt Vector Register (TBIV) into another interrupt vector
TBIV
TIMER_B1_VECTOR
B vs A
Timer_B vs Timer_A
Default function identical to Timer_A 8, 10, 12, or 16-bit timer or counter (16-bit only for Timer_A) Outputs double-buffered for simultaneous loading CCRx registers can be grouped for simultaneous updates Tri-state function from external pin
Lab 4 Flowchart
58
Lab 4 Power
59
Lab 4 Power
540uA Current
390uA 290uA
75us Active MCLK @1MHz=290uA 80us
2.1uA Time
2 seconds until next Sample
CPU is in LPM3 most of the time Delay between ADC12 samples handled by hardware ADC12 handled completely in software
60
FET
Agenda
61
Agenda
Timer Output
62
Each CCRx register can be used in the different timer modes to generate interrupt flags Independent PWM frequencies with different duty cycles can be automatically generated in continuous mode using CCR0 and CCR1+ A new interrupt (TAIFG or TBIFG) occurs on every rollover of the timer Continuous Mode
Power Optimization:
Currently: Timer delays for 2 seconds, software ADC12 trigger Optimization: Timer delays for 2 seconds, then: [1] Enables reference on TBIFG rollover
TBCCR1 output (SHP = 0) SHT0x * ADC12CLK [ lab uses SHT0x * ADC12CLK cycles (192 x 1/5MHz ~= 40 us)]
Time between TBIFG and TBCCR1 must be > 75 us for 2.0V REF to stabilize
Timer Interrupts
64
Timer_B Interrupts
The Timer_B Capture/Comparison Register 0 Interrupt Flag (TBCCR0) generates a single interrupt vector: TBCCR0 CCIFG TIMERB0_VECTOR
TBCCR1-6 and TB interrupt flags are prioritized and combined using the Timer_B Interrupt Vector Register (TBIV) into another interrupt vector
TIMER_B1_VECTOR
Handler
65
0xF830 #0x4,&P1OUT
#0x2,&P1OUT #0x1,&P1OUT
Interrupt Control
66
Power
optimization:
Polling for ADC12MEM1IFG Enable ADC12MEM1IFG interrupts & wake CPU only to handle conversion data
Currently: Optimization:
ADC12
Interrupt Enable (ADC12IE) bits enable interrupt request on a write to the respective ADC12MEMx register ADC12MEM1 has EOS set, so interrupt will be requested after the sequence of temperature and vcc/2 conversions is complete Reading the ADC12MEMx register clears the respective interrupt flag
ADC12IFG1 Handler
67
switch(__even_in_range(ADC12IV,36)) { case 0: break; // No interrupt case 2: break; // Overflow case 4: break; // Time overflow case 6: break; // ADC12MEM0IFG case 8: // ADC12MEM1IFG Disable REF & ADC12 samples; Read ADC12MEM0 & ADC12MEM1; Exit active to main( ); break; case 36: break; }
Lab 5 Code
68
Lab 5 Code
Main
ADC12MEM1 ISR
Lab 5 Power
69
Lab 5 Power
Current 252uA
Entry/exit to ISR Disables the reference Stores the ADC12MEM0 & ADC12MEM1 values Wakes active on exit from LPMx
Lab 5
70
FET
Agenda
71
Agenda
IAR
72
CCS
73
Code Composer Studio v4.1: A single development platform for all TI processors
Enhancements:
Speed Code
eZ430 Tools
74
Options include RF, energyharvesting, RFID, even a wireless sports watch development kit!
FETs
75
Programming Tools
Parallel FET
Supports ALL MSP430 devices Supports 4-Wire JTAG mode only Fixed output voltage of 2.8V No JTAG fuse blow Simple hardware circuit, possible to implement as part of a product
USB FET
Supports ALL MSP430 devices Supports 4-Wire and 2-Wire (Spy-Bi-Wire) JTAG Adjustable output voltage: 1.8 - 3.6V, 100mA JTAG fuse blow Fast operation
Gang Programmer
76
Target Boards
77
100-pin target board exclusive to the F543x(A) / F541x(A) devices Development board with 100-pin TSSOP (PW) ZIF socket (MSPTS430PZ5x100) All pins brought out to pin headers for easy access Programming via JTAG, Spy-bi-wire or BSL A FET board exists for most variants of MSP430 Only $49
MSP-EXP430FG4618
78
Connector for CC1100/CC1101/ CC2500/CC2420 EMs Includes support for the CC2480 ZigBee Processor
Software Tools
79
Z-Stack (CC2520 + MSP430F5438 ZigBee) TI-MAC SimpliciTI (on MSP430 MediaWiki) DASH7 Wireless M-Bus 6LoPAN
Drivers for hardware peripherals, LCD, USB conn. uC-OSII IAR PowerPac Salvo FreeRTOS
www.ti.com
Operating Systems
80
www.ti.com/msp430
Users Guides
Datasheets Code Libraries
Summary
81
Ultra-Low Power
230 A/MHz 1.9 A standby mode Wake up from standby in < 5 s Up to 25 MHz 8 MHz across entire operating range (1.8 - 3.6 V) 1.8V ISP flash erase & write Fail-safe, flexible clocking system Integrated LDO, BOR, WDT+, RTC Multi-channel DMA supports data movement in standby mode More connectivity: USB, RF AES encryption, RTC on backup battery User-defined Bootstrap Loader Industry-leading code density
Increased Performance
Innovative Features
Dont Forget
82
Dont Forget!
Fill out the evaluation form on line if possible (use paper forms otherwise)
This material is available on-line:
http://processors.wiki.ti.com/index.php/MSP430_5xx_One_Day_Workshop
84