<<

Software-related EMI Behavior of Embedded

Shi-Yi Yuan Wei-Yen Chung Cheng-Chang Chen Chiu-Kuo Chen Department of Department of Bureau of Standards, Bureau of Standards, Communication Communication Metrology and Inspection, Metrology and Inspection, Engineering, Engineering, M.O.E.A, M.O.E.A, Feng Chia University, Feng Chia University, Taipei, Taiwan, R.O.C., Taipei, Taiwan, R.O.C., Taichung, Taiwan, R.O.C. Taichung, Taiwan, R.O.C. [email protected] [email protected] [email protected] [email protected]

Abstract—This paper studies software-related EMI. microcontroller’s conducted electromagnetic interference (SW-cEMI) behaviors when are executing From EMI measurement standards [8], software is basically different programs of the same functionality. The SW-cEMI an infinite loop. These setups are for EMI standard behaviors of different program types, clock sources, and measurement and configuration but not for practical programmable PLL settings are measured and observed. Two applications. In this paper, EMI measurement based on major trends of microcontrollers are used as devices under test. different software implementations with the same functionality The result shows that 10-12 dB cEMI differences even on a are observed. simple LED blinking function implemented by different program types. To the best of our knowledge, this work is the first Based on this work, some software design approaches observation on EMI phenomena of software implementations on overcoming or at least partially compensating some parasitic microcontroller’s programs. Some advises are given to μC emission effects are principally observed. To the best of our programmers for cEMI reduction.. knowledge, this work is the first observation on EMI phenomena of software implementation behavior on μC’s Keywords—Software-related EMI, embedded PLL cEMI conducted EMI (cEMI). control, microcontroller EMI programming This paper is organized as follows: section 2 describes the I. INTRODUCTION program design for the target μCs. Section 3 details the target μCs’ characteristics, measurement setups, and measurement As technology advances, more and more electronic procedures. Experimental results are described in section 4. products are applied to daily lives. Electronic product more Section 5 gives our conclusions. complicated than ever and demands more functionalities in one single device. The increasing and higher II. PROGRAM TYPES AND PLL CONFIGURATIONS system clock rates result in serious mutual interference. In this paper, we use two program implementation types Pacemaker, electrocardiogram, electric wheelchairs, or other among different μCs: Infinite loop-type and interrupt-type medical-related equipment may be suffered from the chance of program implementations. malfunction by these technology advances. Therefore, component-level electromagnetic interference (EMI) becomes Fig. 1 shows the infinite loop type program implementation. one of most important issues for these devices. After initial PLL and clock setups, program goes into an infinite loop of one specially designed function. All through To solve the EMI problems, there are many techniques this paper, the designed function is a simple LED blinking proposed. Most of them are based on hardware level EMI function set to 2 Hz of any type program implantations. reduction such as PLL designs [1][2][3], or PCB layout designs [4][5][6]. The optimization of EMI problems by hardware level techniques should be done as much as possible. To the best of our knowledge, little research addresses its attention on the relationship between the software functionalities of microcontroller (μC) and EMI behaviors [7], especially on the configurations of the embedded phase lock loop (PLL) inside a μC. Generally, a modern μC is equipped with at least one programmable embedded phase lock loop (PLL). A PLL is a component that generates clock signals for μC. PLL can keep Fig. 1 Infinite loop type program implementation system clock accuracy from jitter and instability. It also controls clock sources and clock rate in a digital system. Fig. 2 shows a LED blinking program of the interrupt type Nowadays, the state of PLL of an can be program implantation (also in 2 Hz). An interrupt service easily controlled by system software. Therefore, such software routine (ISR) and initial PLL setups are firstly executed. After can control the PLL behaviors and further control the system the procedures are initially executed, the program goes into an

This paper is supported by Bureau of Standard, Metrology and Inspection, Taiwan, Republic of China.

978-1-4799-5545-9/14/$31.00 ©2014 IEEE 118 infinite loop of NOP (no-operation). The LED blinking Table. 1 All clock rates for PIC18F4550 test programs function is designed inside the ISR. Test Program Name loop type interruption type Clock Rate 48 MHz, external mode pic_loop_48M_ext pic_intpt_48M_ext 8 MHz, internal mode pic_loop_8M_int pic_intpt_8M_int 31 kHz, internal mode pic_loop_31k_int pic_intpt_31k_int The naming of the test programs of LPC1114FN28 of are listed in Table. 2. The naming rule is the same as Table. 1. Table. 2 All clock rates for LPC1114FN28 test programs

Test Program Name loop type interruption type Clock Rate 12 MHz, internal mode arm_loop_12M_int arm_intpt_12M_int 12 MHz, external mode arm_loop_12M_ext arm_intpt_12M_ext 24 MHz, external mode arm_loop_24M_ext arm_intpt_24M_ext 36 MHz, external mode arm_loop_36M_ext arm_intpt_36M_ext Fig. 2 Interrupt type program implementation 48 MHz, external mode arm_loop_48M_ext arm_intpt_48M_ext Two designs under test (DUTs) or μCs are chosen: one is Microchip's PIC18F4550, and the other is NXP's ARM III. TEST BOARD AND MEASUREMENT SETUPS Cortex-M0 LPC1114FN28. PIC18F4550 is an old-style, small The measurement of the IC conducted EMI (cEMI) follows and popular μC used for many embedded systems through the international IC-EMI measurement standards (IEC 61967-4) industrial history. And LPC1114FN28 is an ARM core which [11]. This standard specifies the measurement for cEMI of IC is a new-style μC popular in nowadays applications. between 150 kHz to 1GHz. The block diagram of these methods is shown in Fig. 3. In this paper, 150Ω method (Fig. 3 There are two clock source modes on the two DUTs: the upper right) is used to observe the cEMI from VDD pin. internal oscillation mode or external oscillation mode. Both modes can be controlled by PLL. The fundamental clock source is determined by external crystal and is designed to be 48 MHz according the design application note. The internal oscillators are embedded in the DUTs. The PLL configuration of PIC18F4550 is controlled by its registers: OSCCON, CONFIG1L and CONFIG1H [9]. The clock rate can be set by equation (1) and (2): 8 MHz, for internal clock mode ( 1 ) (7 - OSCCON<6:4>) 96 MHz, for external clock mode ( 2 ) CONFIG1L<4:3> - 1 The PLL configuration of LPC1114FN28 is also controlled Fig. 3 IEC-61967-4 measurement by registers [10]. The name of the registers, the clock rate The test circuit PIC18F4550 follows cEMI measurement equation, and the PLL controls are omitted here. standard [11]. It uses an external 20MHz to generate 48MHz clock by PLL for external oscillator mode. The PLL setups can be changed or pre-determined The circuit layout is shown in Fig. 4 and the measurement according to the characteristics of the two μCs. For setup is shown in Fig. 5. The spectrum analyzer is Agilent PIC18F4550, the internal clock rate can be on-line changed by N1996A-CSA. program through PLL setups while the external clock rate is fixed to be a pre-determined value (in this paper, 48 MHz is set). For LPC1114FN28, the internal clock rate is set to 12 MHz and the external clock rate can be on-line changed by program. The naming of the test programs of PIC18F4550 are listed in Table. 1. The “pic_loop_48M_ext” means the PIC test program is an infinite loop type under external clock mode with the clock rate set to 48 MHz. “pic_intpt_31k_int” means the program is an interrupt type under internal clock mode set to 31 kHz clock. Other programs are named by the same rule accordingly.

Fig. 4 PIC18F4550 Test Board

119

Fig. 8 shows the comparisons among interrupt type programs with different PLL setups. In Fig. 8, cEMI is almost the same under interrupt type program implementation. Combined with Fig. 7, it seems the programs have no effect on any cEMI behaviors on the PIC μC.

Fig. 5 Measurement Environment The test board of LPC1114FN28 also follows the same rule as suggested by [11]. The test board is shown in Fig. 6. The measurement environment is similar to Fig. 5 and is omitted.

Fig. 8 Comparisons between PIC interruption type programs under different internal clock rate (only envelopes are showed) However, Fig. 9 shows the comparisons between the external/internal clock source programs of interrupt type. From Fig. 9, the response of pic_intpt_48M_ext (external oscillator mode) is higher than internal oscillator. The major frequency differences lies in the 12 MHz and its harmonics. From Fig. 8, the three internal oscillator PLL setups are generally identical; this means, in PIC μC, the internal/external oscillator setups may be one of the critical program issues on the cEMI behaviors.

Fig. 6 LPC1114FN28 Test Board

IV. MEASUREMENT RESULT A. Measurement Result of PIC18F4550 Fig. 7 shows the comparisons among infinite loop type programs with different PLL setups. In Fig. 7, “pic_loop” programs are almost identical; this means different program operations have no influence on the cEMI behavior of the PIC DUT. Envelops of these cEMI responses are also shown. Only the envelopes of cEMI results of the following measurements will be shown in order to hide irrelevant details. Fig. 9 Comparison of pic_intpt_48M_ext and pic_intpt_8M_int In Fig. 10, comparisons among different clock sources and program types are shown here. Generally, the frequency response of loop type programs is higher than interrupt type programs. About 10 dB worst case differences are observed. It shows that the interrupt type programs are a good candidate for system program designs, at least for the simple LED blinking function. The programmers of PIC μC are advised to design the embedded program by interrupt service routine as much as possible to decrease cEMI.

Fig. 7 Comparisons of PIC loop type programs

120

Table. 4 Maximum frequency response of interrupt type programs

Maximum frequency Programs frequency(MHz) response (dBuV) arm_intpt_12M_int 227 42 arm_intpt_12M_ext 228 40.81 arm_intpt_24M_ext 216 47.06 arm_intpt_36M_ext 252 50.55 arm_intpt_48M_ext 240 54.17

Fig. 10 Comparisons among pic_loop and pic_intpt programs B. Measurement Result of LPC1114FN28 Fig. 11 shows the comparisons among “arm_loop” programs. The maximum difference is 10 dB between arm_loop_12M_int and arm_loop_48M_ext. From Fig. 11, the maximum frequency response appear at 200 MHz to 300 MHz. We list all maximum frequency responses of Fig. 11 in Table. 3.

Fig. 12 Comparisons among arm_intpt type programs

V. CONCLUSION In this paper, software-related conducted electromagnetic interference (SW-cEMI) behaviors of different microcontrollers (μCs) under different program implementations of the same functionality are observed. Two major trends of μCs are used as DUTs: PIC18F4550 is an old-style, small and popular μC used for many embedded systems through industrial history. And LPC1114FN28 is an ARM core which is a new-style μC popular in nowadays more complex applications. Different software implantations include: different program types (loop or interrupt), different clock Fig. 11 Comparisons result among arm_loop type programs sources, clock rates, PLL setups, and the combinations of these factors. Table. 3 Maximum frequency response of loop type programs In PIC18F4550, program type affects cEMI the most. Maximum frequency Programs frequency(MHz) response (dBuV) About 10 dB worst case differences are observed. The arm_loop_12M_int 227 42.12 interrupt-type programming clearly reduces the cEMI. The arm_loop_12M_ext 228 40.76 other parameters such as the external/internal clock sources or arm_loop_24M_ext 216 44.66 the clock rates affect less on the cEMI behaviors. The arm_loop_36M_ext 251 50.56 programmers of PIC μC are advised to design embedded arm_loop_48M_ext 239 52.58 programs by interruption service routine as much as possible to Fig. 12 and decrease cEMI. Table. 4 are the comparisons among "arm_intpt" programs. On the other hand, in LPC1114FN28, different factors may From Fig. 11 and Fig. 12, there are no obvious worst case affect the cEMI behaviors. The major affecting factors are the differences among the program types which are different from clock sources and the clock rates. Different programs affect PIC μC characteristics. However, from Table. 3 and cEMI behaviors about 12 dB. The programmers are advised to reduce the clock rate as low as possible and uses internal clock Table. 4, different programs of clock do affect source if it is acceptable. To the best of our knowledge, this cEMI behaviors about 12 dB (from 42 dBuV to 54 dBuV). The work is the first observations and software design advises on loop or interrupt type programs have less differences. The most μCs’ SW-cEMI phenomena about software implementation important issue of cEMI in LPC1114FN28 is to reduce the behaviors. PLL operating frequency. REFERENCES [1] C.-S. Lin, T.-H. Chien, C.-L. Wey, C.-M. Huang, and

121 Y.-Z. Juang, "An Edge Missing Compensator for Fast Engineering (MACE), 2011, pp. 5383-5386. Settling Wide Locking Range Phase-Locked Loops," [6] J. Cui and M. Zhang, "Transient analysis of PCB EMC IEEE Journal of Solid-State Circuits, vol. 44, pp. problem," 8th International Symposium on ISAPE 2008. , 3102-3110, 2009. 2008, pp. 1111-1114. [2] J.-L. Levant, M. Ramdani, R. Perdriau, and M. h. Drissi, [7] S.-Y. Yuan, C.-F. Yang, E. Sicard, C.-K. Chen, and S.-S. "EMC assessment at chip and PCB level: Use of the Liao, "EMI prediction under different program behavior," ICEM model for jitter analysis in an integrated PLL," IEEE International Symposium on Electromagnetic IEEE Transactions on Electromagnetic Compatibility, vol. Compatibility, 2007, pp. 1-7. 49, pp. 182-191, 2007. [8] IEC," IEC 61967 : Integrated circuits - Measurement of [3] S.-Y. Yuan, C.-H. Wu, and S.-S. Liao, "FPGA electromagnetic emissions, 150 kHz to 1 GHz - Part 1: programmable PLL impact on EMC behavior," 2010 General conditions and definitions ", 2002 Asia-Pacific Symposium on Electromagnetic [9] PIC18F2455/2550/4455/4550 Data Sheet: Microchip Compatibility (APEMC), 2010, pp. 1072-1075. Technology Inc., 2009. [4] D. K. Shin, Y. H. Song, and J. Im, "Effect of PCB Surface [10] LPC111x/LPC11Cxx User manual: NXP Semiconductors, Modifications on the EMC-to-PCB Adhesion in 2012. Electronic Packages," IEEE Transactions on Components [11] IEC," IEC 61967 : Integrated circuits - Measurement of and Packaging Technologies, vol. 33, pp. 498-508, 2010. electromagnetic emissions, 150 kHz to 1 GHz - Part 4: [5] X. Liu, Q. Geng, and X. Huang, "The EMC analysis and Measurement of conducted emissions - 1 Ω/150 Ω direct design of the PCB," 2011 Second International coupling method", 2002 Conference on Mechanic Automation and Control

122