This article introduces Motorola's MC9S12DP25616-bit MCU and several peripheral IC products. These products are designed to adapt to the harsh environment common in automotive systems. In addition, the advanced diagnostic functions provided by these products are discussed in detail. Figure 1 shows the block diagram of the scheme used.
Power system
The power supply system is one of the most important subsystems in any automotive system design. Overall power consumption, battery reverse pole protection, car jump, vehicle noise and car sleep power are all factors that must be considered. If the power supply design is poor, even the best system will not work properly. Motorola provides intelligent power semiconductor products that can well manage all aspects of the power subsystem.
Motorola ’s System-on-Chip (SBC) MC33989 has two power rectifiers designed to provide power for MCUs and peripheral devices. The chip also provides a CAN interface with a speed of 1 Mbaud, 4 high-voltage wake-up inputs and system protection functions. This intelligent semiconductor device can provide all the necessary system voltage, and it has a low-noise 200mA rectifier to power the MCU subsystem. In addition, there is a device that controls external conduction transistors to power peripheral devices. This external conduction transistor allows the secondary power supply to be adjusted to meet the power dissipation limits required for each particular application. The secondary power supply can also cut off the power supply of the selected peripheral equipment according to the requirements, so as to achieve the purpose of reducing power consumption.
The input power comes directly from the car battery. Only need to add an external diode to achieve the purpose of battery polarity protection. SBC can complete the protection action under all overvoltage conditions. The application of power MOSFET process technology also enables the device to work normally when the battery voltage is as low as 4.5V, and can output a battery failure alarm signal when the battery voltage is as low as 3V. The power supply system also has an over-temperature protection function. When the temperature reaches 160 degrees Celsius, the internal thermal shutdown process will be performed. When the temperature is 130 degrees Celsius, an alarm signal will be output. In addition, SBC can also provide a low-power sleep mode, in which the system current can be reduced to 40μA.
CAN transceiver
In addition to providing system power, a 1 megabaud CAN transceiver is integrated inside the SBC. The transceiver has functions such as overtime detection of the master control state, internal thermal protection, and short-circuit protection at the CAN + and CAN- input terminals. Inside the transceiver, the CAN + and CAN- input terminals are protected against tripping, reverse battery connection, and short circuit to power or ground.
Four high-voltage wake-up input terminals make the device have a powerful wake-up function. The maximum withstand voltage of these wake-up inputs can reach 40V. The pull-up source at the input can be generated on the chip. Since only the pull-up source can be used to detect the change of the switch input at any time, the power consumption can be better reduced. The device also has a periodic wake-up function. In addition, SBC also provides reset adjustment and low voltage detection function for MCU.
Multi-switch detection interface
Due to the need for special contact wet currents (wetTIngcurrents) and circuit fault detection functions, automotive electronic equipment requires a highly complex input sensing circuit to detect the switch state. Motorola's multi-switch detection interface (MSDI) device MC33993 is designed for this purpose.
Systems that require a large number of switch interfaces have many discrete components, and these discrete components take up a lot of space on a standard printed circuit board, and solder joint integrity must be tested. The integrated solution can reduce the number of solder joints, take up less space, and can provide a wider operating voltage, so it has greater flexibility. The MSDI device performs the switch detection function, which can detect the open and closed states of up to 22 switch contacts. These detected open and closed states are transmitted to the MCU through a high-speed serial link. Only a suitable electrostatic discharge capacitor can be added to the input to protect against transient interference. Similarly, all input terminals have battery reverse connection, trip and load removal protection functions.
MSDI also has an optional wet current. These internal current sources greatly reduce the number of system components and make the use of metal or rubber switches possible. The large wet current used to detect metal switches can be used selectively in the detection process, so as to achieve the purpose of reducing power consumption. The internal current source can be used as the power supply for light loads, such as sensors, LEDs or MOSFET gates. This method further enhances the design performance of the system, so that these inputs can be used for other purposes without the need for switch detection.
High-impedance analog circuits are particularly susceptible to noise from other signals on the circuit board. Shortening the analog signal path and allowing the device to buffer the signal can reduce this effect. MC33993 has a powerful analog interface function. Compared with traditional systems, this method can reduce system wiring and failure modes. In addition, MC33993 also integrates a 22 to 1 analog multiplexer to improve device performance. Channel selection is achieved through a high-speed serial link. The device not only provides advanced switch diagnostic functions, but also allows the use of analog sensor interfaces and trapezoidal impedance interfaces.
The MCU output circuit cannot directly drive the car load, and also requires integrated circuits such as lamps, relays, motors, range meters, and LED drivers. These special input interface devices also provide protection and error detection functions.
Output system
After confirming the power system and input adjustment, the output system must be considered. Many automotive loads cannot be driven directly by MCUs or low-current interface devices, including motors and lights. Relays or mechanical switches are the main high-current switching devices in today's automotive body control structures. Due to the low cost and mature design of the electromagnetic system, many system architects are still willing to choose. However, the use of electromagnetic systems can cause many problems, such as:
1. The limited life of mechanical contacts limits the switching frequency of the relay. Because the contact has a certain inertia when opening or closing, there will be a certain degree of jump before it stabilizes to the next state. This jitter limits the maximum operating frequency. If this frequency is exceeded, the life of the relay will be greatly shortened.
2. The electromagnetic system does not have a diagnostic function. In harsh automotive environments, the reliability of these devices is a big issue.
Drivers designed for this type of load can easily integrate these loads into the system. Motorola's MC33888 switch with 4 high-end and 8 low-end is designed specifically to drive automotive loads. This device can directly control four high-end loads of up to 60W and eight low-end loads of low current (2.5W). The MC33888 device also has built-in functions to deal with the surge current associated with incandescent lamps. It can be seen from Figure 2 that the surge current caused by the incandescent lamp can reach 10 to 15 times the normal operating current, which will cause great problems to the system without these large surge current processing circuits. The most common measure for this type of load is to trigger an overcurrent protection circuit to cut these loads.
MC33888 solves this problem well. It uses a start timer to allow the incandescent lamp to warm up before the overcurrent protection circuit works. The startup of the overcurrent protection circuit requires detection and adjustment of the state and pulse width signal of the output driver to an acceptable level of the device. Figure 3 shows the action waveform of overcurrent protection. Complete battery reverse pole protection, load dump protection and low power consumption features help to reduce the complexity of the system and reduce the number of external components. Diagnostic functions include load open circuit detection, short circuit detection and over temperature detection. As an additional protection function, the device also has a built-in watchdog timer, which can be used to shut down the device when communication between the device and the MCU is interrupted. The control of the device is achieved through a high-speed serial interface, thus greatly reducing the number of MCU pins required.
Electronic motor control
The last issue to consider is electronic motor control. MC33887 motor driver can accomplish this task well. It is a complete H-bridge driver. The device has a continuous current drive capability greater than 5A, so it is very suitable for locking motors, antenna motors or wiper pumps. MC33887 also has high-end current sensing feedback function. The high-end current sensor feedback function can correct the drive frequency and load cycle of the motor based on real-time motor current feedback. Like the lamp driver, it can automatically pulse-width modulate the output when an overcurrent condition is detected.
MC33887 device can fully control the H bridge activation direction and load interrupt control.
Embedded emulator
The MC33993, MC33887 and MC33888 devices specifically designed for complex automotive electronics applications provide solutions with advanced performance and diagnostic capabilities.
Complex multi-pin MCUs often cause development problems. MC9S12DP256 provides a single-line background debugging interface, which can easily achieve a wide range of debugging in the automotive environment, and will not encounter the common difficulties when using traditional circuit embedded emulators. This interface can also be used to program the main flash memory at the end of the production line, and can even be used to perform reprogramming operations in the car.
Modern automotive microcontrollers often use flash memory to store the main operating program. The best way to program flash memory is to program the main program into the complete electronic control module after final assembly. Compared with programming the main program into the MCU through a third party before module assembly, this method can effectively avoid risks and delays. Time. Programming the main program into the MCU through a simple serial interface is done after the module is assembled and is generally executed during the final test. Some manufacturers use inexpensive stand-alone programmers to complete this operation, while others integrate the programming operation into the test equipment at the end of the production line.
Motorola's related devices provide a single-wire background debugging interface for flash memory programming, verification, and general debugging operations. When the device works normally, the serial communication pin is pulled high at reset, so the background system is not activated. When a programmer or debug system is connected to this pin, the pin will be pulled low during reset, thereby forcing the MCU to enter the active background mode instead of starting the application. In order to facilitate debugging, you can connect a host system to the target MCU system when the device is working normally, so as to monitor the contents of the flash memory or registers without interfering with the operation of the device. The connected debugging system can also replace the control of the MCU to read and write CPU registers, set hardware breakpoints or trace a single instruction.
The traditional circuit embedded emulator and the target system usually require 30 to 40 connections, while the above background debugging interface only requires 2 to 4 connections. A single BKGD communication signal and a common ground are necessary. Adding a reset signal makes it easier for the host to force and control the system to reset, and in some cases increasing VDD can allow the debug fixture to "steal" power from the target system. This simple interface provides automotive electronics designers with debugging access to the MCU installed in the sports vehicle electronic control module. When the car is traveling under normal road conditions, many problems can only be discovered through debugging.
Memory programming
The most important factors related to flash memory programming are speed and convenience. The programming speed depends on the programming time of the flash memory cell and the data transfer speed from the programmer to the target MCU. Of course, there are some other factors, such as the time to erase the array before programming, and the time used to verify the success of the programming operation. The MC9S12DP256 can program any 16-bit word for 45ms, but a burst programming operation allows any additional word in the same row of 32-word flash memory to be programmed at 20ms. In theory, a single-wire background debugging interface can be used to transmit a word of information in 27ms, which is slightly slower than the actual programming time of the flash memory. Actual programming also requires additional task overhead, such as verification overhead. The independent programmer tool SCBDMPGMR12 can complete the erasure, programming and verification operations of 256KB flash memory in less than 10s.
Verification is one of the important factors incurring overhead. Retransmitting all data to achieve word-to-word verification will double the programming time. A quick way is to perform CRC calculation when data is programmed into the flash memory, and then re-read the flash memory content to verify the CRC value after the entire flash memory programming is completed. This operation can be performed at bus speed without retransmitting data.
Separating the transfer of data to the target and making it complete before the data is programmed into the flash memory will also double the programming time. A better method is to parallelize data transfer and programming operations. Generally speaking, it is necessary to send the programming algorithm to the target MCU first, so as to facilitate the management of the received data and send the data into the RAM buffer, and then control the erase and programming operations. The programming algorithm uses two data buffers to receive data to be programmed into the flash memory. When the first buffer is full of data, the programming algorithm begins to program the data into the flash memory, and new data is loaded into the second buffer. The background interface can be used to receive data and write them to RAM. This operation does not interfere with the work of the target CPU, because the CPU reads data from another buffer and programs it into flash memory.
The flash memory in MC9S12DP256 is divided into 4 independent 64KB blocks, so you can independently perform erase and program operations on these 4 blocks. In the case of flash programming based on background debugging, because the data transfer speed is slightly slower than the average word programming speed of the flash, it is impractical to try to interleave the programming operation of the independent array, but perform batch erase on all 4 blocks in parallel Except operation is feasible.
Background access provides an extremely convenient way for the first flash programming, but some users still hope to use other system buses such as CAN bus, J1850 bus or serial interface bus to complete all on-site reprogramming operations. Including the appropriate bootloader program in the main application program can easily do this. In order to respond to some special codes from a bus in the finished car, the bootloader should be able to erase the flash memory and accept new programming data.
Celeron Mini Pc,Office Mini Pc,Mini Desktop,Linux Mini Pc
Shenzhen Innovative Cloud Computer Co., Ltd. , https://www.xcycomputer.com