AN2860 Application note

Similar documents
AN2667 Application note

AN2676 Application note

STEVAL-SPBT4ATV3. USB dongle for the Bluetooth class 1 SPBT2632C1A.AT2 module. Features. Description

STEVAL-CCM002V1. TFT-LCD panel demonstration board based on the STM32 as LCD controller. Features. Description

AN2672 Application note

AN4113 Application note

STEVAL-PCC010V1. ST802RT1A Ethernet PHY demonstration board with STM32F107 controller add-on board. Features. Description

AN3996 Application Note

AN3279 Application Note

AN2470 Application note TS4871 low voltage audio power amplifier Evaluation board user guidelines Features Description

AN2202 Application note

STM8 I 2 C optimized examples

EV-VNQ5E050AK VNQ5E050AK evaluation board

STTS V memory module temperature sensor. Features

AN626 Application note

EVAL6235PD. L6235 three-phase brushless DC motor driver demonstration board. Features. Description

AN3354 Application note

AN2734 Application note S-Touch design procedure Introduction

AN2825 Application Note

AN2855 Application note

AN3154 Application note

UM0693 User manual. 1 Introduction. STM8L101-EVAL demonstration firmware

AN3265 Application note

STM32-MP3NL/DEC. STM32 audio engine MP3 decoder library. Description. Features

STM3210B-SK/KEIL STR91X-SK/KEI, STR7-SK/KEIL

AN2143 Application note

AN3250 Application note

AN3965 Application note

UM0792 User manual. Demonstration firmware for the DMX-512 communication protocol transmitter based on the STM32F103Zx.

AN2474 Application note

AN3980 Application note

ST33F1M. Smartcard MCU with 32-bit ARM SecurCore SC300 CPU and 1.25 Mbytes high-density Flash memory. Features. Hardware features.

AN2737 Application note Basic in-application programming example using the STM8 I 2 C and SPI peripherals Introduction

SOT23-6L ESDALCL6-2SC6

AN2673 Application note

STICE CF/Stice_Connect AD/Stice_Connect AS/Stice_Connect

STA bit single chip baseband controller for GPS and telematic applications. Features

AN2261 APPLICATION NOTE

UM1572 User manual. STEVAL-IPE020V1: ST energy meter application based on the Android platform. Introduction

ST19WR08 Dual Contactless Smartcard MCU With RF UART, IART & 8 Kbytes EEPROM Features Contactless specific features

TN0189 Technical note

AN4321 Application note

AN2240 Application note

EMIF01-SMIC01F2 IPAD. Single line EMI filter including ESD protection. Main application. Description. Benefits. Pin configuration (Bump side view)

UM1488 User manual. STPMC1 evaluation software. Introduction

STM32-SK/KEIL STR91X-SK/KEI, STR7-SK/KEIL

Obsolete Product(s) - Obsolete Product(s)

AN2408 Application note

ST19NP18-TPM-I2C Trusted Platform Module (TPM) with I²C Interface Features

STM3220G-SK/KEI. Keil starter kit for STM32F2 series microcontrollers (STM32F207IG MCU) Features. Description

UM0401 User manual. User manual for eight bit port expander STMPE801 demonstration board. Introduction

EMIF02-SPK02F2. 2-line IPAD, EMI filter and ESD protection. Features. Application. Description. Complies with the following standards

STM32-SK/RAIS,STR91X-SK/RAI,STR7-SK/RAIS STM32-D/RAIS,STR9-D/RAIS,STR7-D/RAIS

EMIF02-MIC01F2 2-line IPAD, EMI filter including ESD protection Features Application Description Complies with the standards:

AN2594 Application note

AN3001 Application note

AN2557 Application note

STEVAL-IHM028V1. 2 kw 3-phase motor control demonstration board featuring the IGBT intelligent power module STGIPS20K60. Features.

Main components 1 A, high efficiency adjustable single inductor dual mode buckboost DC-DC converter

SMP75. Trisil for telecom equipment protection. Features. Description. Applications. Benefits

LD A very low drop adjustable positive voltage regulator. Description. Features

OSPlus USB Extension. OSPlus USB 2.0 extension. Description. Features. Application. TCP/IP stack NexGenOS NexGenIP VFS. FAT Ext2 LVM Device layer

AN2781 Application note

AN2361 Application note

STMicroelectronics. STxP70-4 assembler. User manual Rev A. October

Main components USB charging controller with integrated power switch

AN2792 Application note

Description SPC564A-DISP. March 2014 DocID Rev 3 1/5

AN2061 APPLICATION NOTE

ST33F1M, ST33F1M0, ST33F896, ST33F768, ST33F640, ST33F512

EMIF03-SIM06F3. 3-line IPAD, EMI filter including ESD protection. Description. Features. Application. Complies with the following standards:

ST10F271B/E, ST10F272B/E Errata sheet

AN3362 Application note

AN3988 Application note

AN2430 Application note

AN3140 Application note

STLC2500D. Bluetooth V2.1 "Lisbon" + EDR. Features. Description

Description of STM8 LIN software package (STSW-STM8A-LIN) release 4.1. Table 1. Release information. STM8 LIN package

UM1084 User manual. CR95HF development software user guide. Introduction. Reference documents

ST21NFCB. Near field communication controller. Features. RF communications. Hardware features. Communication interfaces. Electrical characteristics

TN0132 Technical note

STM32 embedded target for MATLAB and Simulink release 3.1. Summary for STM32 embedded target for MATLAB and Simulink release 3.1:

MEMS functional sensor: smart 3D orientation and click detection standalone device. FC30-40 to +85 LGA-14 Tray FC30TR -40 to +85 LGA-14 Tape and reel

AN4274 Application note

AN2592 Application note

AN3050 Application note

AN3155 Application note

ECMF02-3F3. Common mode filter with ESD protection. Features. Description. Applications. Complies with the following standard:

Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension

RN0046 Release note. 1 Introduction. SimpleMAC library for STM32W108xx kits. About this release note

STM8L-PRIMER STM32-PRIMER STMPRIMER

L6460. SPI configurable stepper and DC multi motor driver. Features. Description

ESDA25LY Automotive dual Transil array for ESD protection Features Applications Description Benefits

AN3991 Application note

AN3174 Application note

STM8-SK/RAIS STM8-D/RAIS ST7-SK/RAIS ST7-D/RAIS

b. Typical values, independent of external clock frequency and supply voltage. a. TCG website:

SMP30. Trisil for telecom equipment protection. Features. Applications. Description. Benefits

AN3964 Application note

Order code Temperature range ( C) Package Packing

Transcription:

Application note EMC guidelines for STM8 microcontrollers Introduction To meet the demand for higher performance, complexity and cost reduction, the semiconductor industry develops microcontrollers with both high density design technology and higher clock frequencies. This has intrinsically increased the potential noise emission and noise sensitivity. Therefore, application developers must now apply electromagnetic compatibility (EMC) hardening techniques in the design of hardware, PCB layout, firmware and at system level. This application note is intended for application designers who need to reach the optimum level of EMC performance. It gives an overview of microcontroller EMC features and compliance standards. This document focuses on STM8 features, behaviors and on the differences between the STM8 family members. For general information on EMC for ST microcontrollers, refer to the EMC design guide for ST microcontrollers application note (AN1709). General recommendations for STM8 devices are summarized in the Getting started application notes. These documents also provide basic EMC recommendations. Related documents AN1015: Software techniques for improving microcontroller EMC performance AN1709: EMC design guide for ST microcontrollers AN2677: Getting started with the STM8A AN2752: Getting started with the STM8S AN2867: Oscillator design guide for ST microcontrollers AN3029: Getting started with the STM8L AN3181: Guidelines for obtaining IEC60335 Class B certification on STM8 family RM0009: STM8A microcontroller family reference manual RM0013: STM8L101xx microcontroller family reference manual RM0016: STM8S microcontroller family reference manual RM0031: STM8L15x microcontroller family reference manual May 2010 Doc ID 15267 Rev 3 1/15 www.st.com

Contents AN2860 Contents 1 STM8 and EMC robustness................................... 4 2 Application design robustness................................ 5 2.1 Power supply............................................... 5 3 PCB layout recommendations................................. 8 3.1 Two-layer board............................................. 8 3.2 Single layer board.......................................... 11 4 EMC characteristics........................................ 11 5 Software recommendations.................................. 12 5.1 Critical bytes and opcode technique............................ 12 5.2 Reset sources............................................. 12 6 Revision history........................................... 14 2/15 Doc ID 15267 Rev 3

List of figures List of figures Figure 1. STM8S power connections.................................................. 6 Figure 2. STM8L power connections.................................................. 7 Figure 3. Top view of a 64-pin package layout........................................... 9 Figure 4. Bottom view of a 64-pin package layout....................................... 10 Figure 5. Top view of a 32-pin package layout......................................... 11 Doc ID 15267 Rev 3 3/15

STM8 and EMC robustness AN2860 1 STM8 and EMC robustness Most STM8 product family applications require a high level of EMC robustness. The considered level of robustness is closely linked to application purposes. The different levels of robustness are defined by international EMC class standards together with criteria for testing and measurement techniques used to classify these levels. Note: Note: One of the pivotal IEC (international electrotechnical commission) standards is the IEC 61000 standard which defines the following robustness classes: Class A: No failure detected Class B: Failure detected but self-recovery after disturbance Class C: An external user action needed to recover normal functionality Class D: Normal functionality cannot be recovered IEC is a world wide recognized authority on international standards for a vast range of safety issues concerning electrical, electronic and related technologies. It is important to note that there are several other recognized bodies concerning electronic safety standards besides IEC, such as VDE in Germany, IET in the United Kingdom and the IEEE in the United States. Class B has a different meaning from that used in the IEC 61000 standard as it means in this case that the application is classified from a safety point of view. See the IEC 60335 standard in the AN3181: Guidelines for obtaining IEC60335 Class B certification on STM8 family. EMC robustness is a complex result of several factors and it depends on the component design. However, a very good EMC robustness of any component may be degraded by its incorrect position into the PCB design or by an incorrect hardware project. These factors are discussed in more details in the next chapters. Another important factor is the software solution which can significantly improve the robustness of the application by a proper software reaction when any disturbance is detected, which is fundamental, especially for Class-B compliant applications. In most cases, it is possible to recover the application internally even if the user is not aware of the internal issues. It is also possible to predict an imminent error state by using some efficient techniques capable of testing permanently if both the MCU and the application work properly. These techniques are further described in the following documents: application notes AN1015 (Software techniques for improving microcontroller EMC performance) and AN3181 (Guidelines for obtaining IEC60335 Class B certification on STM8 family) 4/15 Doc ID 15267 Rev 3

Application design robustness 2 Application design robustness Even though the STM8 has been designed for a high level of EMC robustness, the user should be aware that the modern high-density CMOS technology used for the STM8 design is commonly and naturally noise sensitive. This factor must be taken into account in users projects: this is important to avoid steps which could lead to a degradation of the EMC robustness, especially in applications working in an aggressive environment. Some specific requirements and recommendations are given in the rest of this chapter. 2.1 Power supply The STM8S and STM8A product families are designed for standard applications in the 3.3 V to 5 V (+/-10%) supply voltage range. All power pins must be connected: V DD /V SS, V DDA /V SSA, V DDIOx /V SSIOx. The V CAP pin is the regulator output used on STM8S and STM8A devices only. It provides the 1.8 V supply to the core and the peripherals. This pin must be decoupled with a capacitance of at least 470 nf. If the capacitance of an applied capacitor drops under this level due to temperature or lifetime changes or if a wrong capacitor value is connected, the reset pin can toggle with a period of about 100 ms. To satisfy this minimum limit value, it is recommended to use a capacitor with a higher capacitance (about 680 nf), taking into account possible changes of this capacitance due to environment conditions and the period of utilization. The V LCD pin is used in the STM8L152xx devices to provide a voltage from 2.5 V to 3.6 V to the built-in LCD drivers. An external capacitor from 0.1 to 2 µf must be connected to this pin to stabilize the LCD reference voltage. For products with separated V DD and V DDIO1, it is mandatory to supply both pins and strongly recommended to decouple both with a capacitor of 100 nf. V DDA and V DDIO2, when present, must also be decoupled with a dedicated 100 nf capacitor. Power supply connections are shown in the following diagrams. Doc ID 15267 Rev 3 5/15

Application design robustness AN2860 Figure 1. STM8S power connections 6/15 Doc ID 15267 Rev 3

Application design robustness Figure 2. STM8L power connections Doc ID 15267 Rev 3 7/15

PCB layout recommendations AN2860 3 PCB layout recommendations Figure 1 and Figure 2 defines the appropriate bill of materials but, for EMC performance, special attention must be paid to the layout which defines ground plane, track width and length, etc. It is also important to pay special attention to the following tasks: The ground plane should be used as a shield below the device The power supply planes must be designed around the device towards the other components, as shown in Figure 3, Figure 4 and Figure 5. The purpose is to separate the current flow supplying the rest of the application from the CPU power supply plane Every supply pin should be decoupled by a ceramic capacitor. The capacitor should be placed as close as possible to the supply pin and connected to V SS with a path as short as possible. STM8S and STM8A devices require an additional external capacitor for a voltage regulator connected through the V CAP pin: The correct value of the capacitor is very critical (a min. 470 nf capacitance must be kept in any condition) The capacitor should be placed as close as possible to V CAP pin and with the shortest ground plane. Warning: Special care must be taken on the device EMC robustness when the application requires the use of an external (HSE) oscillator (for instance, for permanent asynchronous communication or time-dependent measuring) and the internal clock source cannot be used. A potential risk of EMC robustness degradation can be minimized by applying the rules described below. The ground path between the capacitor-loaded resonator and V SS must be as short as possible. It is better to use a resonator with a metal cap which should be connected to Vss whenever possible. An additional shielding structure should surround the area of the crystal resonator and of the associated components (see Figure 3, Figure 4 and Figure 5) 3.1 Two-layer board Due to the position of V DDIO2 and V SSIO2, a two-layer board design is recommended for 44- pin packages and above. 8/15 Doc ID 15267 Rev 3

PCB layout recommendations Figure 3. Top view of a 64-pin package layout. Supplies towards other components Crystal 1 VSS VDD 1: RESET 2: OSCIN 3: OSCOUT 4: VSSIO1 5: VSS 6: VCAP 7: VDD 8: VDDIO1 19: VDDA 20: VSSA 39: VSSIO2 40: VDDIO2 ai15361 Note: Grey: bottom side Dark grey: top side Doc ID 15267 Rev 3 9/15

PCB layout recommendations AN2860 Figure 4. Bottom view of a 64-pin package layout Crystal ai15362 Note: Grey: bottom side Dark grey: top side 10/15 Doc ID 15267 Rev 3

EMC characteristics 3.2 Single layer board For 32-pin package and below, a single layer board can offer a very good level of EMC performance. Figure 5. Top view of a 32-pin package layout Supplies towards other components Crystal 1 VSS VDD 1: RESET 2: OSCIN 3: OSCOUT 4: VSS 5: VCAP 6: VDD 7: VDDIO1 9: VDDA 10: VSSA ai15363b 4 EMC characteristics EMC characteristics are specific to each device. Please refer to the Electrical characteristics section in the product datasheet for any information on these characteristics. Doc ID 15267 Rev 3 11/15

Software recommendations AN2860 5 Software recommendations The standard software techniques for improving EMC performance described in the AN1015 application note ( Software techniques for improving microcontroller EMC performance ) also apply to the STM8 product family. This section lists the STM8 specificities related to the software techniques referred in the AN1015. It gives the values dedicated to STM8 products but it is strongly recommended to read carefully the AN1015 in order to implement safely the software recommendations. Some other techniques used to test the MCU correct state and to prevent from an unexpected MCU behavior are described in details in the AN3181 (Guidelines for obtaining IEC60335 Class B certification on STM8 family). These techniques are used in the associated firmware. 5.1 Critical bytes and opcode technique It is recommended to avoid occurrences of the following critical bytes in your code: 0x8E: opcode for HALT (instruction used to enter low power modes) 0x8F: opcode for WFI (instruction wait for interrupt ) 0x82: opcode for INT (instruction used to jump in interrupt routine only) 0x8B: opcode for SWBRK (software breakpoint instruction used to stall the CPU in debug mode) These critical bytes can be generated by the linker when computing the address destination in a branch instruction (JUMP or CALL) in absolute or relative addressing modes. To remove such occurrences you can simply insert a NOP instruction before the target address. For further explanation, refer to the AN1015 application note. To keep a better control of unexpected jumps, it is recommended to fill unused memory areas with the TRAP opcode (0x83). Besides, if you want to generate an illegal opcode reset, illegal opcodes can be used, like for example the following simple ones: 0x05, 0x0B, 0x71 and 0x75. 5.2 Reset sources Reset sources can be checked in the Reset status register RST_SR. They can be identified through the Reset status register. The following reset sources are available for all STM8 devices: SWIM reset, Illegal opcode reset, Independent watchdog reset. A few additional reset sources are available only on some devices: EMC reset, Window watchdog reset, POR reset, BOR threshold reset. 12/15 Doc ID 15267 Rev 3

Software recommendations For more details on these reset sources and their differences between devices, please refer to the dedicated STM8 family reference manuals and device datasheets. Doc ID 15267 Rev 3 13/15

Revision history AN2860 6 Revision history Table 1. Document revision history Date Revision Changes 13-Jan-2009 1 Initial release. 27-Jan-2009 2 31-May-2010 3 Figure 5: Top view of a 32-pin package layout on page 11 modified: capacitors moved (pins 5 and 7). Information on STM8A and STM8L family devices added. Document updated. 14/15 Doc ID 15267 Rev 3

Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries ( ST ) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. 2010 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan - Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com Doc ID 15267 Rev 3 15/15