9 » IC Electronic information » Category: B

IC Electronic information

BCM-based automotive microcontroller designs MC9S12XS128

In Electronic Infomation Category: B | on April 15,2011

Freescales S12 series of 16-bit MCU in the body control system is widely used for the body controller BCM, door modules, RKE receiver, smart actuators, lighting module in the body ECU. OEMs in the development of a BCM, the use of MC9S12XS128 as the central processor to control most of the functions of the body, including the door lock control, lighting control, wiper control, window control, and TA31137FN datasheet and burglar alarm, but also realized the CAN / LIN gateway features, speed through the CAN bus receive and TA31137FN price and collision signals, in order to achieve safe driving and TA31137FN suppliers and emergency operations, through the LIN bus to receive signals from the rain sensor to control wiper speed, slow or intermittent operation. The following hardware and software design introduces the key technologies in the BCM of MC9S12XS128.

1 Hardware Design

1.1 MC9S12XS128 Introduction

MC9S12XS128 is a high-performance for automotive electronics market, 16-bit microcontrollers, high speed, powerful, low cost, low power consumption. The chip resources and characteristics are as follows:

1) bus speed of up to 40 MHz;

2) 128 KB program Flash and 8 KB DataFlash, used to implement the program and data storage, all with error correcting code (ECC);

3) can be configured 8-bit, 10 bit or 12-bit ADC, 3s the conversion time;

4) MSCAN module for CAN nodes embedded applications, embedded support the LIN protocol modules and enhanced SCI SPI module;

5) 4-channel 16-bit counter;

6) excellent low power wake-up interrupt function with a 10, wake-sleep function of the system to achieve;

7) 8-channel PWM, motor control is easy to implement.

1.2 System Architecture

BCM hardware implementation based on S12XS128 system structure shown in Figure 1. The figure shows, BCM hardware circuit including switching signal detection, CAN / LIN communication, load control and monitoring of several parts. One switch signal detected by the detection of multi-chip MC33993 switch to achieve, LIN LIN communication bus through the UART module and physical layer transceiver TJA1021 together to achieve, CAN communication module and the CAN bus through CAN physical layer transceiver TJA1055 together to achieve, through the intelligent power load control device implementation, smart power devices in addition to the load of the power drive to achieve, can also provide operating current mirror, so that its image through the work of current sampling ADC conversion can monitor the status of work load.

Figure 1 is based on BCM hardware implementation S12XS128 structure

1.3 switch signal detection

The design and implementation of the BCM, the switch changes state and state control of the load on the control of the trigger is the most common and most important type of control, as switching signal range, and the BCM of the control load in a 10-way multi- control, so that the IO pins in XS128 limited circumstances, and how to complete the monitoring of multiple switches state to become a major design challenge. At the same time for the battery-powered applications, automotive electronics, BCM itself has low power demand, when the low power conditions, a low-power mode, system shutdown unnecessary modules, lower power consumption; when the number of specific switch status changes, the system need to start the related modules, enter the normal operating mode, not only to achieve the normal operating mode of the switch state change of state capture and the capture, but also for low power mode wake-up function.

Some switching signal is collected by means of separation, the rest by Freescale programmable multi-switch detection interface chip MC33993 implementation, the hardware circuit shown in Figure 2.

Chart 2 hardware schematics

MC33993 and the processor communications through the SPI can be detected in 22 switch input signal, and which can be set to switch channels can trigger an interrupt. First XS128 through the SPI control commands sent word to the MC33993, the initial setup, set the MC33993s work, and make the switch to that channel interrupt can wake-up interrupt function. In normal operating mode through the SPI interface, XS128 MC33993 read cycle, the switch state, in the low-power mode, the switch can trigger the interrupt channel status changes, you can wake up XS128, enter the normal operating mode.

2 Software Design

2.1 Software Process Design

BCM software design loop with initialization + software architecture, software flow chart shown in Figure 3. First of all the global variables and the use of peripherals (including the IO, ADC, SPI, PWM, TIME-R, SCI) initialization, and then turn the switch in the body of the loop signal detection, LIN communication, RKE communications and load control. Control logic in terms of load, switching signals, LIN signal and RKE signals are triggered by the control operation of the input signal, and switch signals the need to fill a number of LIN frame, so the load control loop on the end of the order of software modules shown in Figure 3.

software flow chart in Figure 3

2.2 switch signal detection software

Switch control logic in the BCM, the switch signals and changes the state of a control logic is often used as the background conditions and the excitation signal, so the program design, on a single physical switch signals need to determine its current state and status of dance change (including the switch is closed to disconnect and switch off the changes to the closure). The BCM switch signal to be collected are more concise and logical order for the program clear, define a structure to unify separate ways switching signal, the use of variable characteristics of the bit structure variable space saving, the use of saving the unity of structure switching signal detection function code space. Design structure is as follows:

Switch in the above structure, said switching signal in the current state, Swon_event and Swoff_event, respectively, from the disconnect switch to the closed and disconnected from the closed to the change, CurSw and Detect_cnt for switching signal acquisition, the software debounce function . Design of a 10 ms timer, the cycle switch current state of reading, 3 confirmed to determine the Switch, Swon_event, Swoff_event. The code is as follows:

3 Conclusion

Designed and implemented by a body MC9S12XS128 central controller BCM, from the processor characteristics, hardware architecture, multi-way switch and the switch signal detection extended to describe the BCM hardware design, software process from design, switching signal condition monitoring and change the software to capture the BCM on the description of the software design. After loading the BCM test, stable, functional and reliable, has entered the low-volume pre-production stage, with high practical value.

TA31137FN datasheetTA31137FN suppliersTA31137FN Price

All right © 2010-2016 Certificate