KR20160148232A - Micro controller unit for vehicle and serial peripheral interface between micro controller units - Google Patents
Micro controller unit for vehicle and serial peripheral interface between micro controller units Download PDFInfo
- Publication number
- KR20160148232A KR20160148232A KR1020150084948A KR20150084948A KR20160148232A KR 20160148232 A KR20160148232 A KR 20160148232A KR 1020150084948 A KR1020150084948 A KR 1020150084948A KR 20150084948 A KR20150084948 A KR 20150084948A KR 20160148232 A KR20160148232 A KR 20160148232A
- Authority
- KR
- South Korea
- Prior art keywords
- slave
- microcontroller unit
- port
- master
- spi
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
- H04L12/40032—Details regarding a bus interface enhancer
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60R—VEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
- B60R16/00—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
- B60R16/02—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40169—Flexible bus arrangements
- H04L12/40176—Flexible bus arrangements involving redundancy
- H04L12/40182—Flexible bus arrangements involving redundancy by using a plurality of communication lines
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40267—Bus for use in transportation systems
- H04L2012/40273—Bus for use in transportation systems the transportation system being a vehicle
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mechanical Engineering (AREA)
- Information Transfer Systems (AREA)
Abstract
Description
BACKGROUND OF THE
As an example of a common electronic vehicle control device, the Electronic Stability Program (ESP) is a device for controlling the running posture of a vehicle and is a next generation device of an anti-lock brake system that prevents locking of a wheel at the same time. ESP is designed to independently control each of four wheels instantaneously to maintain stability when the vehicle is accelerating, braking, or when the vehicle slips when cornering. By exercising the vehicle in the direction desired by the driver, .
As another example of the electronic vehicle control device, a tire pressure monitoring system (TPMS) notifies the driver of the tire pressure of the vehicle in operation in real time, and informs the driver of the possibility of the tire becoming flat .
It is more preferable that the ESP ECU receives the tire inflation pressure information from the TMPS ECU and adds and controls the tire inflation pressure information together with the vehicle attitude information of the vehicle body.
To this end, an SPI communication module is required to enable SPI communication between the microcontroller units so that the ESP system and the TPMS system can share respective information with each other. Each system of the ESP system and the TPMS system is provided with an electronic control unit (ECU) for a vehicle that performs overall control. Each ECU is provided with a micro controller unit (MCU) including an SPI module ).
1 schematically shows an outline of SPI communication between conventional microcontroller units.
Definition of SPI (Serial Peripheral Interface) communication
- The SPI bus is a synchronous serial data standard named Motorola Architecture that operates in Full Duplex mode on architecture. Devices communicate in Master-Slave mode, master initializes data frame, and slaves operate together as SS (Slave Select) line.
SPI communication has several advantages.
(1) Full Duplex communication
(2) Complete protocol flexibility for transmitted bits
(3) no transmitter required
(4) Very simple hardware interface processing
(5) IC package uses only 4 pins, which is fewer than parallel interface.
In addition, SPI communication has the following disadvantages.
(1) H / W Slave recognition not required (Firmware processing required)
(2) No hardware flow control by slave
(3) Error checking protocol is not defined
(4) Tends to be affected by noise spikes (may cause communication problems)
(5) Operates at relatively shorter distances than RS-232, RS485, and CAN buses
(6) Only one master device is supported.
Communication between the
The Master 110 transmits the synchronized signal to the SCLK 125 via the
The
The SPI communication has many advantages as discussed above. Therefore, generally, when the MCU is operating as Master, while having several Valve Driver and Motor Driver as Slave, the MCU drops the command to Slave, the Slave executes the command, To the MCU.
Recent use of more than two MCUs in the ECU has led to a tendency to make the communication protocol between the two MCUs (eg, between the ESP system and the electronic control unit of the TPMS system) SPI.
Since communication between these MCUs is important for both of the MCUs (because the functions are separated), if the communication is not robust, the MCU loses its inherent functions. Since the MCU shares functions, if the communication is not made, the ECU inherent function is lost.
Fig. 2 shows the result of SPI communication between the microcontroller units (Fig. 2 (a)) when the master microcontroller unit in Fig. 1 is reset and the result of SPI communication between the microcontroller units when the slave microcontroller unit is reset (Fig. 2 (b)).
As can be seen from the disadvantage of SPI communication, it has a simple hardware structure and high-speed data transmission, but it is very vulnerable to EMC and Spark. Therefore, a structure for supplementing this is needed.
EMC or Spark, but MCUs are always at risk of being reset due to software structural problems or Software Watch Dogs and Hardware Watch Dogs. A short reset may not cause major problems. Also, there is a problem that SPI Communication may cause problems after reset rather than reset itself.
In SPI Communication, resetting the Master MCU is not a problem. This is because Master has absolute authority in SPI communication. Master determines the start and end of SPI communication and also determines the data length. Therefore, the SPI communication does not start when the Master MCU is in the reset state, so the slave does not start communication either.
All the SPI communication is normally maintained despite the reset of the master microcontroller unit as shown in FIG. 2 (a).
As can be seen from FIG. 2, the data value stored in the Master Data
However, when the slave is reset, the master can be problematic because it does not know the state of the slave at all.
Fig. 2 (b) shows the result when the slave microcontroller unit is reset. It shows that the order of the data does not coincide with the data of the master microcontroller unit in four out of 50 reset operations of the slave microcontroller unit.
When the slave microcontroller unit returns to normal from reset, it shows that the data of the master microcontroller unit and the data of the slave microcontroller unit are inverted by approximately 8%.
FIG. 3 is a data flow diagram showing the SPI communication result of FIG. 2 (b).
In the case of FIG. 2 (b), if the master microcontroller unit is normal and the SPI starts after the slave microcontroller unit is reset, the master microcontroller unit can not know the state of the slave microcontroller unit.
3, the
Therefore, the SPI communication starts from the
If the problem as shown in FIG. 3 occurs due to various causes, it is not possible to determine from which point the data checksum (CheckSum) is not matched, and therefore, the SPI communication can not return to normal unless two MCUs are reset at the same time.
The present invention is intended to solve the problem that the data does not coincide with the data of the master microcontroller unit when the SPI communication is performed after the slave microcontroller unit is specifically reset as described above. After reset, the master microcontroller unit and the slave microcontroller unit The SPI communication between the controller units is always performed normally so as to establish robust communication.
According to an embodiment of the vehicle microcontroller unit according to the present invention,
1. A vehicle microcontroller unit (MCU) connected to an SPI (Serial Peripheral Interface) communication interface,
SCK (Signal Clock) port for clock, MOSI (Master Out Slave In) port and MISO (Master In Slave Out) port for data input and output, SS (Slave Selection) port and Slave And a slave microcontroller unit including a Ready port,
And the Slave Ready port is a port for transmitting a slave SPI communication configuration completion status to the master microcontroller unit.
Preferably,
And a master microcontroller unit including an input port for receiving the output of the Slave Ready port.
Preferably,
And the input port is one of general purpose input / output ports provided in the master microcontroller unit.
Preferably,
And SPI communication is started between the master microcontroller unit and the slave microcontroller unit after the master microcontroller unit receives an ON signal from the slave ready port.
According to an embodiment of the SPI communication system between vehicle microcontroller units according to the present invention,
In an SPI (Serial Peripheral Interface) communication system between a vehicle microcontroller unit (MCU)
A master microcontroller unit and a slave microcontroller unit which commonly include an SCK (Signal Clock) port for clock, a MOSI (Master Out Slave In) port for inputting and outputting data and a MISO (Master In Slave Out) Including,
Wherein the slave microcontroller unit further comprises a slave selection port and a slave ready port for selection of the slave microcontroller unit,
The master microcontroller unit further includes a primary chip selection (PCS) port for selection of the slave microcontroller unit and a connection port for connection to the slave ready port,
And SPI communication is started between the master microcontroller unit and the slave microcontroller unit after the master microcontroller unit receives an ON signal from the slave ready port.
Preferably,
And the connection port with the slave ready port is one of general purpose input / output ports provided in the master microcontroller unit.
According to an embodiment of the SPI communication method between the vehicle microcontroller units (MCU) according to the present invention,
A method of communicating between a microcontroller unit (MCU) of a vehicle and an SPI (Serial Peripheral Interface)
Transmitting a signal indicating completion of slave SPI communication configuration through a slave ready port provided in the slave microcontroller unit;
Receiving the signal at a master microcontroller unit;
Providing a clock through a SCK (Signal Clock) port in the master microcontroller unit for synchronization between the master microcontroller unit and the slave microcontroller unit; And
And transmitting and receiving data between the master microcontroller unit and the slave microcontroller unit through a MOSI (Master Out Slave In) port and a MISO (Master In Slave Out) port.
Preferably,
And selecting the slave microcontroller unit from a plurality of slave microcontroller units through a PCS (Primary Chip Selection) port provided in the master microcontroller unit.
Preferably,
The SPI communication between the master microcontroller unit and the slave microcontroller unit is started by transmitting a signal indicating completion of the slave SPI communication configuration through the slave ready port after the slave microcontroller unit is reset .
According to the SPI communication system and method between the microcontroller unit for a vehicle and the microcontroller unit according to the present invention, SPI communication between MCUs can be normally operated even if a reset occurs due to malicious or external environmental factors.
According to the SPI communication system and method between the vehicle microcontroller unit and the microcontroller unit according to the present invention, since the SPI communication between the MCUs is robust, there is an effect of increasing the degree of freedom in designing an ECU having a 2MCU structure.
1 schematically shows an outline of SPI communication between conventional microcontroller units.
Fig. 2 shows the result of SPI communication between the microcontroller units (Fig. 2 (a)) when the master microcontroller unit in Fig. 1 is reset and the result of SPI communication between the microcontroller units when the slave microcontroller unit is reset (Fig. 2 (b)).
FIG. 3 is a data flow diagram showing the SPI communication result of FIG. 2 (b).
FIG. 4 is a block diagram of a microcontroller unit (MCU) connected to an SPI (Serial Peripheral Interface) communication interface according to the present invention.
5 is a diagram showing the results of SPI communication between a master microcontroller unit and a slave microcontroller unit performed by the microcontroller unit according to the present invention in FIG.
FIG. 6 is a flowchart showing a method of communicating SPI between vehicle microcontroller units (MCU) according to the present invention.
In order to fully understand the present invention, operational advantages of the present invention, and objects achieved by the practice of the present invention, reference should be made to the accompanying drawings and the accompanying drawings which illustrate preferred embodiments of the present invention.
Hereinafter, the present invention will be described in detail with reference to the preferred embodiments of the present invention with reference to the accompanying drawings. Like reference symbols in the drawings denote like elements.
FIG. 4 is a block diagram of a microcontroller unit (MCU) connected to an SPI (Serial Peripheral Interface) communication interface according to the present invention.
The
Specifically, the
The
The
After the master microcontroller unit receives the ON signal from the newly provided slave read
The
The
5 is a diagram showing the results of SPI communication between a master microcontroller unit and a slave microcontroller unit performed by the microcontroller unit according to the present invention in FIG.
5 is a diagram illustrating a result of performing SPI communication using the
And transmits a signal indicating completion of the slave SPI communication configuration transmitted from the
Thereafter, synchronization is established via the clock signal 520 and thereafter data is transmitted between the microcontroller units (540 and 550).
Even if the slave microcontroller unit is reset as shown in FIG. 5, after the
FIG. 6 is a flowchart showing a method of communicating SPI between vehicle microcontroller units (MCU) according to the present invention.
6 is a flowchart for performing an SPI (Serial Peripheral Interface) communication method between vehicle microcontroller units (MCU).
The slave microcontroller unit transmits a signal indicating completion of the slave SPI communication configuration through the slave ready port provided in the slave microcontroller unit (S670).
The master microcontroller unit receives a signal indicating completion of the SPI communication configuration transmitted from the slave microcontroller unit (S620).
To synchronize between the master microcontroller unit and the slave microcontroller unit, the master microcontroller unit provides the clock through the SCK (Signal Clock) port and through the Master Out Slave In (MOSI) port and the Master In Slave Out Data is transmitted and received between the master microcontroller unit and the slave microcontroller unit (S630).
The left part in Fig. 6 shows the operation of the master microcontroller unit, and the right part shows the operation of the slave microcontroller unit.
As shown in FIG. 6, since the master microcontroller unit performs SPI communication after checking whether the slave microcontroller unit is ready for SPI communication before starting the SPI communication, the conventional microcontroller unit performs SPI communication Problem no longer occurs.
If the master microcontroller unit does not receive a signal indicating completion of the slave SPI communication configuration through the slave read port of the slave microcontroller unit, it can send an MCU ERROR signal to notify that the SPI communication can not be normally performed.
The master microcontroller unit may further include a step of selecting a slave microcontroller unit among the plurality of slave microcontroller units through a primary chip selection (PCS) port provided in the master microcontroller unit.
The method shown in Fig. 6 has been described above more effective when it is desired to start the SPI communication after the slave microcontroller unit is reset.
SPI communication between the master microcontroller unit and the slave microcontroller unit is initiated by sending a signal from the slave microcontroller unit through the Slave Ready port indicating the slave SPI communication configuration completion status.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit and scope of the invention. It is.
Master microcontroller unit: 410
Slave microcontroller unit: 420
MISO Port: 423
MOSI Port: 424
SCK port: 425
Slave Ready Port: 427
SS Port: 426
Claims (9)
SCK (Signal Clock) port for clock, MOSI (Master Out Slave In) port and MISO (Master In Slave Out) port for data input and output, SS (Slave Selection) port and Slave And a slave microcontroller unit including a Ready port,
And the Slave Ready port is a port for transmitting a slave SPI communication configuration completion status to the master microcontroller unit.
And a master microcontroller unit including an input port for receiving the output of the Slave Ready port.
Wherein the input port is one of general purpose input / output ports provided in the master microcontroller unit.
SPI communication is initiated between the master microcontroller unit and the slave microcontroller unit after the master microcontroller unit receives an ON signal from the Slave Ready port.
A master microcontroller unit and a slave microcontroller unit which commonly include an SCK (Signal Clock) port for clock, a MOSI (Master Out Slave In) port for inputting and outputting data and a MISO (Master In Slave Out) Including,
Wherein the slave microcontroller unit further comprises a slave selection port and a slave ready port for selection of the slave microcontroller unit,
The master microcontroller unit further includes a primary chip selection (PCS) port for selection of the slave microcontroller unit and a connection port for connection to the slave ready port,
Characterized in that the SPI communication between the master microcontroller unit and the slave microcontroller unit is started after the master microcontroller unit receives an ON signal from the Slave Ready port. Communication system.
And the connection port with the slave ready port is one of general purpose input / output ports provided in the master microcontroller unit.
Transmitting a signal indicating completion of slave SPI communication configuration through a slave ready port provided in the slave microcontroller unit;
Receiving the signal at a master microcontroller unit;
Providing a clock through a SCK (Signal Clock) port in the master microcontroller unit for synchronization between the master microcontroller unit and the slave microcontroller unit; And
And transmitting and receiving data between the master microcontroller unit and the slave microcontroller unit through a MOSI (Master Out Slave In) port and a MISO (Master In Slave Out) port. SPI communication method.
Further comprising the step of selecting the slave microcontroller unit among a plurality of slave microcontroller units through a PCS (Primary Chip Selection) port provided in the master microcontroller unit.
The SPI communication between the master microcontroller unit and the slave microcontroller unit is started by transmitting a signal indicating completion of the slave SPI communication configuration through the slave ready port after the slave microcontroller unit is reset (SPU) communication method between a vehicle microcontroller unit (MCU).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150084948A KR20160148232A (en) | 2015-06-16 | 2015-06-16 | Micro controller unit for vehicle and serial peripheral interface between micro controller units |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150084948A KR20160148232A (en) | 2015-06-16 | 2015-06-16 | Micro controller unit for vehicle and serial peripheral interface between micro controller units |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20160148232A true KR20160148232A (en) | 2016-12-26 |
Family
ID=57733830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020150084948A KR20160148232A (en) | 2015-06-16 | 2015-06-16 | Micro controller unit for vehicle and serial peripheral interface between micro controller units |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20160148232A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951336A (en) * | 2017-03-24 | 2017-07-14 | 北京经纬恒润科技有限公司 | A kind of MCU repositioning method, apparatus and system |
CN108470013A (en) * | 2018-01-24 | 2018-08-31 | 中国科学院宁波材料技术与工程研究所 | A kind of SPI communication method for realizing double MCU data transmissions |
-
2015
- 2015-06-16 KR KR1020150084948A patent/KR20160148232A/en unknown
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951336A (en) * | 2017-03-24 | 2017-07-14 | 北京经纬恒润科技有限公司 | A kind of MCU repositioning method, apparatus and system |
CN106951336B (en) * | 2017-03-24 | 2020-02-04 | 北京经纬恒润科技有限公司 | MCU (microprogrammed control Unit) resetting method, device and system |
CN108470013A (en) * | 2018-01-24 | 2018-08-31 | 中国科学院宁波材料技术与工程研究所 | A kind of SPI communication method for realizing double MCU data transmissions |
CN108470013B (en) * | 2018-01-24 | 2020-04-21 | 中国科学院宁波材料技术与工程研究所 | SPI communication method for realizing double-MCU data transmission |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10552366B2 (en) | Method of communication for master device and slave device on synchronous data bus wherein master and slave devices are coupled in parallel | |
CN107832250B (en) | Master-slave communication time sequence method based on SPI | |
EP1672505A2 (en) | Fail-silent node architecture | |
US9298529B2 (en) | Indicating internal transmitter errors in a controller area network (CAN) | |
US8306004B2 (en) | Communication network system having high-ranking network and low-ranking networks, interchange terminal connecting high-ranking network and low-ranking network, microcomputer controlling connection between transmission line of low-ranking network and transmission line of high-ranking network, and communication transmitter-receiver connected with transmission line of low-ranking network and transmission line of high-ranking network | |
US20140254431A1 (en) | Advanced TDM Daisy-Chain Communication Systems and Devices | |
CN108139959A (en) | Vehicle safety electronic control system | |
JP2018531451A6 (en) | Vehicle safety electronic control system | |
KR20210050573A (en) | Vehicle control system | |
CN110663229B (en) | Method for communication between a microcontroller and a transceiver assembly, microcontroller and transceiver assembly | |
US10176128B2 (en) | Communication system for inter-chip communication | |
US11394726B2 (en) | Method and apparatus for transmitting a message sequence over a data bus and method and apparatus for detecting an attack on a message sequence thus transmitted | |
KR20160148232A (en) | Micro controller unit for vehicle and serial peripheral interface between micro controller units | |
JP6894043B2 (en) | A method for operating a sensor device in an automated vehicle based on the DSI protocol | |
JP6391373B2 (en) | Master / slave network device | |
US20130262610A1 (en) | Communication system and method for configuring programmable hardware | |
US12007919B2 (en) | In-vehicle communication device and vehicle communication method | |
JP2009302783A (en) | Failure detecting method and failure detection system of communication network | |
JP4737049B2 (en) | Communication system and electronic control device | |
US20150146745A1 (en) | Control unit for in-vehicle ethernet and method for controlling thereof | |
US10225099B2 (en) | Vehicle electronic computer compatible with the CAN-FD communication protocol | |
WO2021010166A1 (en) | Serial communication method and serial communication system | |
US11106619B2 (en) | Transmission of synchronous data via a serial data bus, in particular a SPI bus | |
TW201741888A (en) | Communication device, communication method, program, and communication system | |
US10565088B2 (en) | Monitoring device for recovering a stalled bus |