COMPEL/STM Seminar COMPEL/STM Seminar November 2010 Seminar Agenda Overview of ST Microcontroller Portfolio Introduction to Cortex-M Core STM32 General Purpose Lines Product-Line Overview (F100/F101/F103) Walk through the main peripherals ST Standard Peripheral Library Live demonstration of the STM32 Value Discovery Kit STM32 LowPower Line STM32 Low-Power Line Product-Line Overview (L15x) Low-Power modes and consumption Specific Peripherals STM32 Connectivity Line STM32 Connectivity Line Product-Line Overview (F105/7 & next) Ethernet & USB Host Peripherals Third Party Stacks Audio Support pp STM32 Wireless Product-Line Overview (W108) RF Performances Wireless Stacks (Zigbee, RF4CE, proprietary) STM32 Tools Third Party Compiler & IDE Boards and Debuger ST Libraries STM32 Semi nar November 2010 2 STM32W - an open architecture for wireless sensor networks Wireless sensor network domains Healthcare, assisted living Security Shock sensor, anti theft, Rehabilitation, balance control Sport and fitness Sport monitoring Shock sensor, anti theft, anti intrusion Sport monitoring, pedometer, fall detection In-network distributed computation Industrial Reduce data transmission Increase network lifetime Vibration and tilt remote measurement Infrastructure monitoring Buildings, bridges Games and remote control Energy management STM32 Semi nar November 2010 Consumer control control Smart metering Open flexible reconfigurable platform p g p MAC interface Kernel SoC IEEE 802 15 4 SoC IEEE 802.15.4 Proprietary - Remote control - Home automation STM32 Semi nar November 2010 STM32W IEEE 802.15.4 radio Microcontroller ARM Cortex-M3 core architecture IEEE 802.15.4 2.4 GHz radio Transmitter: 2-point direct synthesizer modulation Receiver: lowIF super heterodyne architecture Embedded memory (eFlash 16kx64, SRAM 4kx16) Receiver: low IF super heterodyne architecture Digital baseband DSP and MAC support -100 dBmsensitivity and up to 7 dBmoutput power Networking Networking ZigBee compliant PRO and RF4CE stacks 128-Kbyte Flash for stack and apps codes IEEE 802.15.4 simple MAC library Peripherals Oth Peripherals AES encryption HW accelerator Debug channel via J TAG USART, SPI, IC, 24 GPIOs Other Compatible with SN2xx series QFN48 and QFN40 packages available STM32 Semi nar November 2010 STM32Warchitecture overview 32-bit ARM Cortex-M3 core running @ 24 MHz 128-Kbyte Flash, 8-Kbyte RAM Fully IEEE 802.15.4 compliant radio @ 2.4 GHz Power management D l d 1 A ith RAM t ti Deep sleep mode <1 A with RAM retention On-chip debug support ARM J TAG/SWD Packet trace interface enables remote monitoring of radio messages ARM memory protection unit To detect erroneous software accesses Sl ti t hd ti d GP ti Sleep timer, watchdog timer and GP timers AES 128 encryption acceleration Serial communication (UART/SPI/IC) GPIO GPIO ADC (6 channels, first order 12 bits sigma delta) STM32 Semi nar November 2010 Power management modes g Native Cortex-M3 sleep mode is a perfect foundation to implement several STM32Wsystemlowpower modes to implement several STM32W system low-power modes Low- frequency 32 kHz High- frequency 24 MHz Power Mode Regulators frequency 10 kHz RC oscillator crystal oscillator frequency 12 MHz RC oscillator crystal oscillator Power consumption Deep sleep 2 off off off off off 0.4 A Deep sleep 1 off off optional off off 0.8 A Standby on on optional off off 2 mA Active at 12 MHz on on optional off on 6 mA Active mode Sensitivity Rx current Tx current Tx current Radio peripheral dBm mA mA at 0 dBm mA at -32 dBm -100 20 24 15 STM32 Semi nar November 2010 STM32WRF peripheral STM32W RF peripheral 9 Radio block diagram LNA ADC Receiver IF LNA ADC RF_P,N Baseband IF amp PA PA Lower MAC RF_TX_ALT_P,N CPU prescaler divider VCO Sigma- delta DAC Transmitter Baseband GPIO[21]/ TX_ACTIVE PA select prescaler PFD loop filter divider VCO HF OSC OSCA OSCB STM32 Semi nar November 2010 10 Analog receiver features Low IF super heterodyne receiver Input RF signal is mixed down to the IF frequency of 4MHz by I and Q mixers. Output of the mixers is then filtered and combined by a polyphase bandpass filter y p yp p Sampling by a 12 Msps dedicated ADC. STM32 Semi nar November 2010 11 Analog transmitter features Synthesizer using a 2 point modulation scheme. It modulates the division ratio using sigma-delta fractional N technique and the VCO directly using a varactor. The 4.8GHz VCO signal is then divided by 2 and g y amplified by the on chip PA. 2 on-chip PAs: 2 on chip PAs: One is used to combine the transmitter output with the receiver input pins. receiver input pins. The other is support using an external high power PA. STM32 Semi nar November 2010 12 Baseband The receiver is a conventional coherent PSK architecture. It generates a coherent reference at the IF frequency, locked in g q y, frequency and phase to the incoming signal. The preamble period of the 802.15.4 signal is used to achieve frequency, phase and chip timing and symbol timing lock with the received signal. The receiver demodulates at the chip level making hard decisions before despreading. The receiver DSP operates down to a signal to noise level of 1 dB The receiver DSP operates down to a signal to noise level of 1 dB out of the ADC. Tx baseband spreads the 4-bit symbol into its 802.15.4 defined 32- chip sequence chip sequence. It also provides the interface for software to calibrate the Tx module to reduce silicon process, temperature, and voltage variations. STM32 Semi nar November 2010 13 Lower MAC CRC generation, appending and checking Hardware timers and interrupts Hardware timers and interrupts DMA memory control Preamble, sync word and length generation and prepending Add iti d k t filt i Address recognition and packet filtering Automatic acknowledgement transmission Automatic transmission of packet from memory p y Automatic transmission after backoff time if CSMA clear Automatic acknowledgement checking Ti t i f i d t it Time stamping of receive and transmit messages Attaching packet information to receive packets Pseudo random number generator for backoff slots g 15.4 timing and slotted/unslottedtiming STM32 Semi nar November 2010 14 Radio other features Dedicated ADC for calibration Hardware packet trace interface Hardware AES128 block True random number generator based on thermal noise in the analog circuitry thermal noise in the analog circuitry STM32 Semi nar November 2010 15 MB851 Application Board / Ref Design GND C1 100n C2 100n C3 100n GND C4 10uF C13 C12 GND GND C10 8pF +1V8 GND C11 100nF GND C6 10nF GND C5 10nF GND R1 10R GPIO10 GPIO11 GPIO12 GPIO00 GPIO04 GPIO01 GPIO05 GPIO02 GPIO07 GPIO03 GPIO06 GPIO19 GPIO09 GPIO20 GPIO18 D1 LED D2 LED R3 1k R4 1k J TCK nRST +VBATAAA + 1 - 2 AAA BT1 AAA-SCK1 +VBRD 1 2 3 4 5 6 P3 Header 3X2 +VISA +VBRD +VBRD +VUSB GPIO21 D4 DIODE D3 DIODE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 P2 C13 18pF C12 18pF X1 24MHz R2 nc 1 V 4 5 V 4 6 O 4 7 3 7 3 8 3 9 4 0 4 1 4 2 4 3 4 4 36 O 4 8 IC1 STM32W108 +1V2 J TCK GPIO14 GPIO15 GPIO17 GPIO13 GPIO16 GPIO08 G P IO 1 4 G P IO 1 5 G P IO 1 7 G P IO 1 3 G P IO 1 6 GPIO08 GND GND 1 2 3 4 5 6 7 8 9 10 P1 Debug/Trace GPIO04 GPIO05 nRST GPIO18 GPIO19 GPIO16 GPIO20 +VISA +VBRD 21 22 23 24 25 26 27 28 Header 14X2 D5 TSHF5210 R12 10R L2 5n1 1 5 4 2 3 + - T1 WE748-422-245 E1 AN0835 L1 2n7 C16 15p C15 nc 4 2 1 GND 3 FLT1 WE748351124 C14 22nF GND GND GND GND VDDA 1 VDDA 2 RF P 3 RF N 4 VDDRF 5 RF TX ALT P 6 RF TX ALT N 7 VDDIF 8 BIAS R 9 VDDA 10 GPIO19 34 GPIO20 35 GPIO5 27 VDDPADS 28 GPIO6 29 GPIO9 30 GPIO10 31 J TCK 32 GPIO18 33 V D D A V D D A O S C BV D D P A D S G P IO 1 7 V D D M E M G P IO 1 6 G P IO 1 5 G P IO 1 4 G P IO 1 3 V D D C O R E GPIO8 36 O S C A C17 8p2F GND GPIO10 GPIO08 GPIO05 GPIO06 GPIO09 GPIO20 GPIO18 1 U2 1 G 2 3 G 4 G 5 V 6 U1 ST: LIS302DL GND GND 12 J P4 Header 2 C23 100n C22 100n GND GND Debug/Trace GND J TCK GPIO19 GND J 1 MCX +VBRD L3 nc C31 nc C30 nc C29 nc GND GND GPIO12 Q1 BC846 R13 1k GND R14 10k X2 R7 180K(1%) GND GND GPIO21 11 G P IO 2 2 1 3 G P IO 2 3 1 4 V R E G O U T 1 5 V D D P A D S 1 6 V D D C O R E 1 7 G P IO 7 1 8 G P IO 1 1 1 9 G P IO 1 2 2 0 G P IO 0 2 1 G P IO 1 2 2 V D D P A D S 2 3 GPIO3 25 GPIO4 26 RSTB 12 G P IO 2 2 4 EPAD +1V2 C7 10nF GND G P IO G P IO G P IO G P IO GPIO04 G P IO G P IO GPIO03 NC 1 GND 2 Vout 3 Vcc 4 GND 5 ST: STLM20W87F V d d _ IO G N D R e s e rv e d G N D G N D V d d CS 7 IN T 1 8 IN T 2 9 G N D 1 0 G N D 1 1 S D O 1 2 S D A /S D I 1 3 SCL/SPC 14 GND GND C24 100n R6 470 GND GPIO02 GPIO01 C27 4.7uF C26 100n C25 100n +VUSB GPIO21 R9 Byp 3 Vout 4 Vin 5 Shdn 1 GND 2 U3 LKF1112 2 2 1 6 6 1 2 5 6 1 2 2 2 A K Rst SW-PB 32.768kHz C19 22pF C20 33pF GND GND C8 10nF C18 1uF GND GND R5 10K C9 10nF R8 1R C21 2.2uF GND +1V8 S1 SW-PB O 1 2 O 1 1 O 0 7 O 0 0 O 0 1 O 0 2 nRST Vbus 1 D- 2 D+ 3 ID 4 GND 5 J 2 +VBRD GND GND GND GND GPIO10 GPIO09 PWRoff R9 10k C32 100n GND R10 VCCIO 4 VCC 20 USBDM 16 USBDP 15 NC 8 RESET# 19 NC 24 RTS# 3 RXD 5 RI# 6 DCD# 10 DSR# 9 CTS# 11 TXD 1 DTR# 2 IC2 2 1 2 1 2 1 6 6 6 6 1 2 1 2 3 4 2 1 2 1 1 2 3 4 1 2 2 2 2 1 2 1 1 2 1 13 14 10 9 8 7 11 12 1 2 A K 5 4 3 2 1 10nF GND GND 6 USB_MINIB GND C28 100n GND GND PWRoff R10 0R R11 0R GPIO05 OSCI 27 A G N D 2 5 G N D 1 8 G N D 2 1 T E S T 2 6 CBUS4 12 CBUS3 14 CBUS1 22 CBUS0 23 OSCO 28 3V3OUT 17 CBUS2 13 FT232R 1 2 1 2 1 2 1 2 1 1 1 2 1 2 2 1 2 1 3 2 4 1 2 1 49 1 2 2 1 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 1 2 2 1 2 2 A K A K 2 1 2 1 1 1 2 6 5 4 3 2 1 2 1 STM32 Semi nar November 2010 16 1 2 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 10 8 6 4 9 5 2 1 3 7 0 0 2 2 1 2 1 1 2 Product specificities: RF design Antenna matching is very dependant on PCB substrate - Copy paste only valid if same material is used (even manufacturer) - Specific equipments needed Spectrum Analyzer, RF Network Analyzer 200 differential 1 4 T1 WE748-422-245 E1 L1 TBD 4 2 FLT1 WE748351124 C14 RF P to 50 single Can be done in discrete L2 TBD 5 2 3 + - ANT C16 TBD C15 TBD 1 GND 3 TBD GND GND GND RF N GND C17 8p2F GND Need to be tuned for max power Band pass filter Antenna matching GND VDD RF Can be done in discrete At 2.4GHz, speed of light is not anymore negligible. STM32 Semi nar November 2010 17 C7 10nF GND y g g Gerber RF part topview Minimized space between components 50 trace Vias a long RF trace long RF path for good ground Best g Would be straight here. In 200 Differential our design we had not the space d i STM32 Semi nar November 2010 18 difficult to do it. Stacks and Tools Stacks and Tools STM32W software libraries i b r a r y Customer application Network layer ( ti l) ZigBee PRO stack Customer application RF4CE network layer l i b r a r y Customer application 15.4 simple MAC S t a n d a r d
l (optional) ZigBee PRO stack (including standard peripheral library) and ZRC profile S t a n d a r d
15.4 simple MAC Simple MAC application STM32W ZigBee application STM32W RF4CE application STM32W Application profiles Customer code - Smart energy (SE) - Home automation (HA) - Consumer (CERC) Silicon Libraries provided by ST STM32 Semi nar November 2010 ZigBee PRO Stack Features The ZigBee PRO stack uses Stochastic Addresses for node addressing The ZigBee PRO stack uses Stochastic Addresses for node addressing and Mesh (next-hop) routing x delivering messages. Many-to-One/Source Routing and Asymmetric Link Handling allow Many to One/Source Routing and Asymmetric Link Handling allow setting large networks (up to thousands of nodes) Advanced network encryption and device security features allow setting more secure networks. Frequency Agility feature allows the entire network to change channels if some interferences occur if some interferences occur. Fragmentation feature allows handling large messages delivery. STM32 Semi nar November 2010 21 Public Application Profiles Building Automation defining devices for large commercial buildings and networks and networks. Smart Energy Management defining products that enhance energy management and efficiency for consumers Consumers will remotely management and efficiency for consumers. Consumers will remotely control their homes and manage their energy use. Personal Home Health Care Monitoring of personal health in the g p home environment. Home Automation defining devices for typical residential and small i l i t ll ti commercial installations. Telecom Application Wireless applications within the telecom area. STM32 Semi nar November 2010 22 ZigBee Stack Size benchmark Current application sizing S S S SN250 SN250 STM32W New compiler Smallest App 78466 70619 63557 Base HA App 89100 80190 72171 Base HA plus Link Keys 99772 89795 80815 B SE ECC 13272 101945 91750 Base SE w ECC 13272 101945 91750 Notes: End device configuration save 7KB g 40 to 60KB free for application SW! TI Z-Stack CC2430 (8051) Coordinator/Router 116 kB Flash 7 kB RAM Coordinator/Router - 116 kB Flash, 7 kB RAM End Device - 99kB Flash, 3.8kB RAM STM32 Semi nar November 2010 23 ZigBee RF4CE / Home Entertainment Control Today with IR Today with RF Line of sight transmission No line-of-sight or field of vision limitations Line of sight transmission Decades-old technology Short transmission distance Many consumers want devices hidden Field of vision limitations Remote needs to be pointedat IR receiver No line of sight or field of vision limitations Control components behind walls or in cabinets Control over extended ranges Remote needs to be pointed at IR receiver Unidirectional unacknowledged transfers Unreliable communication Cannot send information to remote control or between components (DTV, set top box, etc.) Bi-directional capability Reliable communications Send program guides, playlists stock quotes, etc to remote/components Allows for communications between devices Over-the-air firmware updates possible Remote locator Technology Challenge Pl DTV t i hi hf i t th t b t t IR Faster more reliable communications T it d til i d Plasma DTV contains high frequency inverter that obstructs IR signals LCD back lighting saturates DTV IR receiver Transmit commands until received Many times faster response than IR Enables enhanced user interfaces Touchpad or pointing capability Power consumption 802 15 4RF consumes 25%of the power used by IR Power consumption Multiple redundant transmissions for each command Higher TX power required to avoid interference created by plasma/LCD screens 802.15.4 RF consumes 25% of the power used by IR solutions Requires manufacturer-specific IR databases Allows for true interoperability between vendors products STM32 Semi nar November 2010 24 Each product has its own commands Requires larger memory for storing lookup tables ZigBee RF4CE Technical Overview Based on 2.4 GHz MAC/PHY IEEE 802 15 4standard 802.15.4 standard Networking layer is thin, flexible and future- proof APPLICATION OEM Co-exists with other 2.4 GHz technologies Support for interoperability APPLICATION FRAMEWORK ZigBee RF4CE Net ork PROFILES Support for secure communications Power save mechanisms implemented in network layer Network & Profiles POWER SAVE POWER SAVE TOPOLOGY TOPOLOGY NETWORKING LAYER SECURITY SECURITY CHANNEL AGILITY CHANNEL AGILITY MANAGEMENT MANAGEMENT PAIRING PAIRING Simple and intuitive pairing mechanism Allow for vendor specific applications and transactions PHY LAYER MAC LAYER IEEE 802.15.4 transactions Support for many different applications STM32 Semi nar November 2010 25 ZigBee RF4CE Node Types Two Nodes Types Target Node Network Startup Full PAN Capability Accepts or declines a pairing request Accepts or declines a pairing request Makes decision on operating channel (frequency agility) Controller Node Initiates pairing and discovery process to Target Nodes Implements frequency agility On-demand communication ZigBee RF4CE Network Supports Multiple PANs Participation in multiple networks p p Low power Power Save mechanism built into network stack Supports multiple transmission options Support for multiple application profiles STM32 Semi nar November 2010 26 ZigBee RF4CE Network Topology PAN 3 TV RC DVDRC DVD DVD RC PAN 1 Multi-function RC TV Target Controller CD RC PAN 2 CD STM32 Semi nar November 2010 27 27 node node STM32W development tools p Infrared RF application board RF extension Read ;;;;;; Sniffer Analyser USB STM32 Semi nar November 2010 STM32W in a nutshell Highest performance Industry-leading RF performance Industry leading RF performance Network performance highest throughput, lowest latency for routing, security computations Enhanced battery life by 25%+ y y Application code space ZigBee PRO stack 20%+ smaller than best-in-class previous product generation, plus architecture provides more usable Flash generation, plus architecture provides more usable Flash 1.5 times higher code efficiency than 8-bit core based solutions available on the market Power consumption I d t t d d l di Power consumption 1/3rd less active current than 250/260 series, combined with core efficiencies, results in longest battery life in industry Industry-standard, leading core High performance, standard tools, powerful debug capabilities Part of largest ARM Cortex-M3 product family: STM32 STM32 Semi nar November 2010 Thank you y Integrated 2.4 GHz radio MCU enables efficient and low-cost wireless network efficient and low-cost wireless network implementation STM32Wis a ZigBee certified platform(PRO Stack) STM32W is a ZigBee certified platform (PRO Stack) STM32W is a ZigBee RF4CE certified platform STM32W is an IEEE 802.15.4 certified platform Please visit: www.st.com/stm32w STM32 Semi nar November 2010 Thank You ! STM32 Semi nar November 2010 31