AN901 STMICROELECTRONICS | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 14
Technical content
MICROCONTROLLER-BASED APPLICATIONS by Microcontroller Division Applications INTRODUCTION Electromagnetic compatibility (EMC) must be taken into account at the very beginning of a project as the cost of correcting an EMC problem encountered at the start of production can be far greater that the cost of a detailed EMC study during the development phase of an applica- tion. The use of microcontroller-based systems is increasingly wide-spread, especially in such areas as consumer, industrial and automotive applications, where the drive for cost reduction is the common trend. This emphasis on cost reduction and the increasing complexity of such systems requires the manufacturers of semiconductor components to develop highly inte- grated, single chip, high operating frequency microcontrollers using the highest density tech- nology possible. Unfortunately, for semiconductor structures, the higher the density and the faster the operation, intrinsically the higher the level of electrical noise generated, and the in- creased sensitivity to spikes induced from external noise. Therefore, the PCB layout, the soft- ware and the system must now apply EMC “hardening” techniques in their design. This note aims to provide guidelines for designers of microcontroller-based applications so that the optimum level of EMC performances can be achieved. For general information about EMC performances, please refer to application note AN898.
1 DEFINITION OF TERMS
as electromagnetic fields and conducted electrical noise.
1.1 EMC STANDARDS
Table 1. Electromagnetic Emissions Table 2. Electromagnetic Susceptibility
EMC GUIDELINES FOR MICROCONTROLLER-BASED APPLICATIONS
2 SCOPE
Specific EMC requirements apply to each part of a microcontroller-based application ac- cording to EMI references.
2.1 NOISE SOURCES
Electrostatic discharges, mains, switching of high currents and voltages or radio frequency (RF) generators are just some of the causes of electromagnetic interference, or noise, in mi- crocontroller environments. Within the microcontroller itself, the main contributors to noise are: – oscillator: continuous RF source, – system clock circuits: RF divider followed by large amplifiers which drive long lines inside the component, – output transitions: the relative weight depends on the frequency of the transitions and their duration; i.e. the shorter the transitions, the richer the frequency spectrum, – data/address buses: for some microcontrollers, a part of the memory space is external, which implies continuous transitions on several lines.
2.2 NOISE CARRIERS
EMI can be transferred by electromagnetic waves, conduction, and inductive/capacitive cou- pling. Obviously, EMI must reach the conductors in order to disturb the components. This means that the loops, long length and large surface of the conductors are vulnerable to EMI, making the PCB the principal subject of EMC improvements.
2.3 AFFECTED AREAS
In a microcontroller-based system, the core process is intrinsically sequential and must rely on valid data. Once a non-EMC-protected program is disturbed, it cannot resume normal opera- tion. From the electrical point of view, the following areas are vulnerable: – system-clock integrity – memory cells: memory blocks, in addition to registers and memory cells supporting the state machine of the processor, – important signals, i.e. RESET, INTERRUPT, HANDSHAKING STROBE.
EMC GUIDELINES FOR MICROCONTROLLER-BASED APPLICATIONS
3 EMC COMPLIANCE
Once the areas involved are identified, EMC performances are improved by decreasing noise source emissions, increasing EMI immunity in susceptible areas and weakening the capacity of noise carriers.
3.1 PRINTED CIRCUIT BOARD
For technical reasons, it is best to use a multi-layer printed circuit board (PCB) with a separate layer dedicated to the ground and another one to the V DD supply, which results in a good de- coupling, as well as a good shielding effect. For many applications, economical requirements prohibit the use of this type of board. In this case, the most important feature is to ensure a good structure for the ground and power supply.
3.1.1 Component Position
A preliminary layout of the PCB must separate the different circuits according to their EMI con- tribution in order to reduce cross-coupling on the PCB, i.e. noisy, high-current circuits, low- voltage circuits, and digital components.
3.1.2 Ground and Power Supply (V
SS , VDD ) The GROUND should be distributed individually to every block (noisy, low level sensitive, dig- ital,...) with a single point for gathering all ground returns. Loops must be avoided or have a minimum surface. The power supply should be implemented close to the ground line to mini- mize the surface of the supply loop. This is due to the fact that the supply loop acts as an an- tenna, and is therefore the main emitter and receiver of EMI. All component-free surfaces of the PCB must be filled with additional grounding to create a kind of shielding (especially when using single-layer PCBs).
3.1.3 Decoupling
The standard decoupler for microcontrollers is a 100-µF pool capacitor, and in parallel, a 0.1-µF high frequency capacitor (typical values). Aluminium electrolytic capacitors should be avoided due to their poor performance at high frequencies. These capacitors must physically be as close as possible to the V SS /VDD pins of the component in order to reduce the surface of the actual loop. As a general rule, decoupling all sensitive or noisy signals improves EMC performances. There are 2 types of decouplers: – Capacitors close to components. Inductive characteristics, which apply to all capacitors be- yond a certain frequency, must be taken into account. If possible, parallel capacitors with de- – Inductors. Although often ignored, ferrite beads, for example, are excellent inductors due to their good dissipation of EMI energy and there is no loss of DC voltage (which not the case when simple resistors are used).
EMC GUIDELINES FOR MICROCONTROLLER-BASED APPLICATIONS
3.1.4 Oscillator
Almost all microcontrollers have an oscillator coupled to an external crystal or ceramic reso- nator. On the PCB, the copper traces to pins EXTAL/XTAL/VSS (for external capacitors) must be kept as short as possible. These capacitors are included in certain resonators which further shorten traces. Since the RC option is potentially sensitive to spikes which can shorten clock periods, the res- onator option is preferable.
3.1.5 Other Signals
When designing an application, the following areas should be closely studied to improve EMC performances: – noisy signals (clock...), – sensitive signals (high impedance...). In addition to: – signals for which a temporary disturbance affects the running process permanently (the case of interrupts and handshaking strobe signals, and not the case for LED commands). A surrounding ground trace for these signal increases EMC performances, as well as a shorter length and the absence nearby of noisy and sensitive traces (crosstalk effect). For digital signals, the best possible electrical margin must be reached for the 2 logical states and slow Schmitt triggers are recommended for eliminating parasitic states.
3.2 PROGRAMMING EMC-HARDENED SOFTWARE
3.2.1 Parallel Processes
With a programmable system, an obvious possible EMS weakness arises from an unique process that relies on valid memorized data. At first, the unique process must be split into as many parallel and independent processes as possible. This is particularly important for secu- rity functions such as the watchdog, refresh routine and the initialization routine. Additionally, such a split is useful for locating weaknesses during EMC debugging.
3.2.2 Watchdog
The watchdog is a circuit which must be updated within a maximum time slot. The best sys- tems maintain the watchdog independent of the CPU (not built with a soft routine). For ex- ample, STMicroelectronics ST62 microcontrollers have a watchdog integrated in the compo- nent, and is able to run independently of the CPU. The watchdog update routine must be treated as a critical process to reduce chances that the watchdog is updated when the process is no longer in normal operation.
EMC GUIDELINES FOR MICROCONTROLLER-BASED APPLICATIONS
3.2.3 Free Memory
In many cases, the internal program space is not used 100%. This creates a free memory area where normally, the application program must never take instructions. This area must be used as a trap which leads to a Reset routine. This is done by filling this area with No-Operation in- structions (NOPs) followed by a “JUMP to Reset Routine” command.
3.2.4 Software Hardening
There are several other methods for improving EMC performances: – periodic self-checks of data integrity (checksum...), – when critical tasks are executed, verify data redundancy and check for runaway condi- tions, – create a kind of milestone (i.e. trace point) throughout the program that is verified using a “status register” that makes sure that step n follows step n-1, – periodic updating of the control/data registers, which is particularly useful for the I/O reg- isters which are in the first in line to face EMI. Each time a runaway condition is detected, the initialization routine must be performed.
3.3 SYSTEM ARCHITECTURE
At the very beginning of a project, certain preliminary decisions must be made to meet EMC optimization requirements.
3.3.1 PCB Location
The PCB must be kept as far away as possible from the mains supply wiring as well as extra- high voltage lines or very high current lines. Also, they should not be repeatedly switched on/ off. In certain cases, “natural” shielding may exist in the application. In this case, it should be used wisely.
3.3.2 Component Mounting
Surface-mounted components (SMCs) have a higher density than standard through-hole mounted components, and therefore require shorter traces on the PCB. For microcontrollers, SMC packages such as small outline (SO) and quad flat (QFP) packages reduce the length of signal lines and require a smaller power supply loop.
EMC GUIDELINES FOR MICROCONTROLLER-BASED APPLICATIONS
3.3.3 Choice of Microcontroller
The use of a microcontroller with a high clock rate may cause dangerous EMI levels. This fea- ture should not be used unless it is specifically needed for real-time application requirements. If a high system-clock frequency is requested, certain microcontrollers (such as the STMicro- electronics ST9 family) use an internal PLL to build a system clock frequency higher than the oscillator frequency with an external resonator (EMI reduction). A hardware watchdog must implemented in the microcontroller in order to meet EMC requirements. Certain component suppliers, such as STMicroelectronics, have taken EMC requirements into account when designing their products. It is best to use components designed with specific EMC technical characteristics, rather than those with unknown EMC performance levels.
3.3.4 Unused Features
All microcontrollers are designed for a variety of applications and often a particular application does not use 100% of the MCU resources. To increase EMC performances, unused clocks or counters, as well as I/Os, should not be left free, e.g. I/Os should be set to “0” or “1” and unused functions should be “frozen” or disabled.
3.4 MEASURING EMC PERFORMANCES
– Electromagnetic Susceptibility (EMS). The method is derived from IEC (standards) and VDE/SAE specifications. loading is standardized according to SAE 1751 specifications. Table 3. EMC Testing
3.4.1 Emissions Tests
producible because they do not overly depend on the PCB.
3.4.1.1 Radiated EME Tests
The board is placed on a metallic box in order to mask all other components. distance of 3 meters. The results are measured using a spectrum analyser.
3.4.1.2 Conducted EME Tests
these signals with a spectrum analyser. Figure 1. Ground Current Probe pling capacitor and pin load on one side and the IC GND and oscillator load on the other. Figure 2. Output Signal Probe A good correlation can be found between radiated EME and ground current measurements. signal levels, an amplifier is used. The HF resistance of wires on application boards is typically in the range of 100-300 ohms. board load to 50 ohms, a voltage divider is used.
Figure 3. Voltage Divider Diagram
3.4.2 EME Immunity Tests
Figure 4. Disturbance Spectrum Diagram rect since the rise time is much greater when compared to the clock period. STMicroelectronics focuses it efforts on ESDs and fast transients.
3.4.2.1 Electrostatic Discharges
tests that use a conical tip.
Discharges are made on the ground plane. A statistical method gives more reproducible results.
3.4.2.2 Fast Transients
This test consists of coupling these disturbances to the power supply or to the I/O of the MCU. Fast transients are generated by switches or relays. Fast transients are described in standard IEC.1000-4-4. Figure 5. Disturbance Diagram Figure 6. Coupling Network The fast transients are coupled to the I/O with a small capacitor.
EMC GUIDELINES FOR MICROCONTROLLER-BASED APPLICATIONS Test Description The test is performed in compliance with standard IEC 1000-4-4. Measurements are performed on a ground plane. The generator is connected to ground plane by a short wire. The HT wire is 10 cm from the ground plane. The DUT is on the insulator 10 cm from the ground plane. The first method consists of increasing the generator voltage until the MCU fails. If this method demonstrates reproducibility problems (the voltage is lower than when the spike occurs), a statistical method must be used.
3.4.2.3 Radio Frequency Interference
The radio frequency is a sine wave modulated with a 1-kHz signal. The frequency range is be- tween 150-kHz and 1-GHz. In general, radio frequency interference (RFI) results from electro- magnetic radiation. Both radiated and conducted EME tests (described in SAE and VDE spec- ifications, respectively) are used by STMicroelectronics. The first gives a global description of the MCU whereas the second gives a description of each pin. The radiated EME tests are performed in a screened room. The DUT is completely isolated by using special board according to standard SAE 1752. The test is performed in compliance with standard IEC 1000-4-3. The conducted EME test uses a coupling network similar to the one used for fast transients. For each frequency, the voltage is increased until the MCU fails in order to characterize the voltage/frequency interval of safe operation.
3.4.3 Interpretation of Results
The purpose of the described EMC measurements is to guide the Application Engineer during EMC debugging phases and for the pre-qualification EMC test. Since these measurements are not certified tests, which are the responsibility of specialized laboratories, there is no ab- solute acceptance levels (which depend on the area of application). This process is designed to detect EME peaks and sensitive frequencies that exceed accepted levels and in fixing these defects.
EMC GUIDELINES FOR MICROCONTROLLER-BASED APPLICATIONS
4 CONCLUSION
The purpose of this application note is to convince designers of microcontroller applications to take EMC performances into consideration at the very beginning of the project. Most of the EMC improvements presented in this document are already known, but they must be applied. There is no single action to meet EMC performance requirements, as each tech- nique yields a small improvement. Only a comprehensive application of the techniques men- tioned can lead to optimum EMC performances. STMicroelectronics, which has acquired ex- tensive EMC expertise for their microcontrollers, makes their expertise available to their cus- tomers.
EMC GUIDELINES FOR MICROCONTROLLER-BASED APPLICATIONS “THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH A NOTE AND/OR THE USE MADE BY CUSTOMERS OF THE INFORMATION CONTAINED HEREIN IN CONNEXION WITH THEIR PRODUCTS.” Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of STMicroelectronics. The ST logo is a registered trademark of STMicroelectronics 2000 STMicroelectronics - All Rights Reserved. Purchase of I2C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use these components in an I2C system is granted provided that the system conforms to the I2C Standard Specification as defined by Philips. STMicroelectronics Group of Companies Australia - Brazil - China - Finland - France - Germany - Hong Kong - India - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain Sweden - Switzerland - United Kingdom - U.S.A. http://www.st.com