EFT Anti-interference Measures Based on Renesas QzROM MCU

Publisher:科技奇思Latest update time:2011-03-13 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

QzROM is a programmable memory that uses PROM technology that has been miniaturized. QzROM microcontrollers are Renesas microcontrollers equipped with a new type of memory QzROM (Figure 1), which are widely used in cameras, portable devices, home appliances, and civil equipment.


EFT concept

EFT (electrical fast transient pulse group, as shown in Figure 2) is generated when the inductive load in the circuit is disconnected. It is characterized by a series of pulses, which have a relatively large impact on the circuit and can cause the MCU (single-chip microcomputer) program to run away, freeze, reset, etc. Since a series of pulses can produce a cumulative effect at the input end of the circuit, the amplitude of the interference level will eventually exceed the circuit noise threshold.

When each pulse of the pulse train is very close to each other, the capacitor of the circuit does not have enough time to discharge, and it starts to charge again, which easily reaches a higher level. Therefore, the shorter the period of the pulse train, the greater the impact on the circuit.

EFT anti-interference measures mainly introduce three types of methods:

1. Optimize PCB (printed circuit board) wiring

•In terms of component layout, MCU (single-chip microcomputer), clock, and reset circuits should be placed first; components should be divided into different functional modules, and the positions of each module should be reasonably placed. The angles of components should be adjusted to shorten the total wiring length.

• In terms of wiring width and wiring gap, try to use thicker wiring width and wiring gap to reduce the impact of the voltage on the wire on the signal under interference, and at the same time reduce the interference between each wiring.

• In terms of ground and power line layout: try to separate the ground and power lines of the MCU, clock, and reset circuits from other functions. Pay attention to the placement of copper at low frequencies and try to shorten the wiring length.

• For the clock circuit, use the shortest wiring to connect the clock circuit and the MCU. Long wiring is more likely to introduce interference, see Figure 3; separate the ground wire of the crystal oscillator from the ground wire of other functions, and lay a polygonal copper cover for the crystal oscillator part separately; avoid large current flowing under the crystal oscillator circuit. The reason is: if noise invades the clock input/output (I/O) pin, the clock waveform will be disordered, resulting in malfunction and loss of control. In addition, if the potential difference between the Vss level of the microcontroller and the Vss level of the resonator is caused by noise, the correct clock cannot be input to the microcontroller.
• Reset circuit: shorten the wiring length connecting the reset circuit and the MCU as much as possible, see Figure 4. The reason is: because the timing requirement stipulates the pulse width input to the reset pin, if a pulse noise less than the specified width is input to the reset pin, the reset is released before the microcontroller enters the initialization state completely, causing the program to lose control.

•Decoupling capacitors: Place decoupling capacitors close to the MCU and the wiring should drive the current to flow to the decoupling capacitors.

• Regarding the CNVss pin (the pin that controls the chip operation mode), if the on-board programming function is not used, CNVss should be directly connected to Vss; if on-board programming is required, connect it to Vss with a 5.1kΩ resistor close to the MCU, and the wiring length of CNVss should be shortened as much as possible.

•Wiring of P40 (Vpp) pin: When the P40 (Vpp) pin is used as an input port, a resistor of about 5kΩ should be inserted in series near the P40 (Vpp) pin as much as possible; when the P40 (Vpp) pin is not used, it should be connected to the nearest GND wiring with the shortest distance from the GND (ground) provided to the Vss pin of the microcontroller. In addition, it is possible to improve the noise resistance by inserting a 5kΩ resistor in series and connecting it to GND. At this time, try to connect to the GND wiring with the shortest distance from the GND provided to the Vss pin of the microcontroller as much as possible, as shown in Figure 5.

Reason: The P40 (Vpp) pin is the power input pin of the internal QzROM. When writing a program to the QzROM, the impedance of the P40 (Vpp) pin is reduced to generate leakage current, so noise can easily invade, and the QzROM instruction code and data reading operations cannot be performed normally, resulting in loss of control.

2. I/O port processing

• Correct handling of unused pins:

(1) It can only be set to input mode. Use a 1k~10kΩ resistor to pull each pin up or down. If there is an internal pull-up, it can also be selected;

(2) Can only be set to output mode, the pin is open, and the output is high or low level;

(3) For other I/Os, it is recommended to set them as outputs with the pins open.

• Notes when pin processing is not used:

(1) When the I/O port is set to input, do not open the circuit;

(2) When the I/O port is set to input, do not connect it directly to Vcc or Vss, and do not connect multiple ports together to Vcc or Vss with a resistor to prevent short circuits between ports when the direction register is changed to output mode due to noise or program runaway.

(3) When using the output mode, the software processing must regularly refresh the port status to prevent the port level from being unstable when the direction register changes to the input mode due to noise and program runaway, which may cause an increase in the power supply current.
3. Optimize program structure design

•Instruction redundancy:

(1) Insert two or more single-byte instructions (NOP) after the multi-byte instructions at the key position to prevent the following instructions from being treated as operands;

(2) Insert two NOPs before jump instructions (JMP, JSR, BRA) and return instructions (RTI, RTS) to prevent program errors.

• Software traps:

(1) Unused interrupt vector

Point to an error handling routine to prevent interference with activating unused interrupts and causing the program to run away;

(2) Add a runaway handler in the unused program space, after the storage table in the ROM, and between important subroutines in the program area:

Subroutine: ; Subroutine

RTS

NOP

NOP

B RunAway

RunAway: ; Runaway processing subroutine

RTS

•Use the watchdog in conjunction with software, see Figure 6:

(1) When the MCU is working normally, the watchdog timer is initialized regularly; (2) When the MCU runs away, since it is not initialized within the watchdog timing period, the watchdog timer count overflows and generates a reset signal to reset the MCU; (3) Watchdog initialization settings: ① When no interrupt is used, the watchdog is initialized in the main program loop; ② Using interrupts, refresh a certain variable in the interrupt program, and judge the change of this variable in the main program, and then execute the initialization watchdog operation and initialize this variable; ③ In the case of multiple interrupts, select one interrupt to refresh the variable according to the relationship between them, and the main program makes a judgment.

Summary of measures

• Optimize PCB routing: The most effective measure to improve anti-interference performance - given priority in design and development.

• I/O Processing: Recommended Configuration for MCU Use - Use the recommended configuration for best performance.

• Software measures: can partially solve interference problems - remedial methods, such as problems found after mass production to reduce costs, it is recommended to reconsider the first two methods.

Reference address:EFT Anti-interference Measures Based on Renesas QzROM MCU

Previous article:Extended RAM read and write timing of single chip microcomputer
Next article:Application of LS7266R1 in electronic universal material testing machine

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号