KR20140055519A - System and method for stuck bit error occurrence distinction or serial peripheral interconnect receiver buffer - Google Patents

System and method for stuck bit error occurrence distinction or serial peripheral interconnect receiver buffer Download PDF

Info

Publication number
KR20140055519A
KR20140055519A KR1020120122520A KR20120122520A KR20140055519A KR 20140055519 A KR20140055519 A KR 20140055519A KR 1020120122520 A KR1020120122520 A KR 1020120122520A KR 20120122520 A KR20120122520 A KR 20120122520A KR 20140055519 A KR20140055519 A KR 20140055519A
Authority
KR
South Korea
Prior art keywords
data pattern
pattern value
received data
equal
value
Prior art date
Application number
KR1020120122520A
Other languages
Korean (ko)
Other versions
KR102008996B1 (en
Inventor
이민수
Original Assignee
콘티넨탈 오토모티브 시스템 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 콘티넨탈 오토모티브 시스템 주식회사 filed Critical 콘티넨탈 오토모티브 시스템 주식회사
Priority to KR1020120122520A priority Critical patent/KR102008996B1/en
Publication of KR20140055519A publication Critical patent/KR20140055519A/en
Application granted granted Critical
Publication of KR102008996B1 publication Critical patent/KR102008996B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/2832Specific tests of electronic circuits not provided for elsewhere
    • G01R31/2836Fault-finding or characterising
    • G01R31/2837Characterising or performance testing, e.g. of frequency response
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/317Testing of digital circuits
    • G01R31/3181Functional testing
    • G01R31/3183Generation of test inputs, e.g. test vectors, patterns or sequences

Abstract

A method of determining occurrence of a stuck bit error of an SPI receiver buffer includes determining whether a second reception data pattern value is the same as a first transmission data pattern value; if the second reception data pattern value is not the same as the first transmission data pattern value, recognizing that an error is generated in an SPI bus line; if the second reception data pattern value is the same as the first transmission data pattern value, determining whether a first reception data pattern value is an initialized register value; if the first reception data pattern value is not the initialized register value, recognizing that an initialization error is generated in the SPI receiver buffer; if the first reception data pattern value is the initialized register value, determining whether a third reception data pattern value is the same as a second transmission data pattern value; if the third reception data pattern value is not the same as the second transmission data pattern value, recognizing that a stuck bit error is generated in the SPI receiver buffer; if the third reception data pattern value is the same as the second transmission data pattern value, determining whether a fourth reception data pattern value is the same as a third transmission data pattern value; and if the fourth reception data pattern value is the same as the third transmission data pattern value, recognizing that a stuck bit error is generated in the SPI receiver buffer.

Description

SPI 수신 버퍼의 스턱비트 에러발생 판별방법{SYSTEM AND METHOD FOR STUCK BIT ERROR OCCURRENCE DISTINCTION OR SERIAL PERIPHERAL INTERCONNECT RECEIVER BUFFER}BACKGROUND OF THE INVENTION 1. Field of the Invention [0001] The present invention relates to a system and method for determining a stuck-

본 발명은 SPI 수신 버퍼의 스턱비트 에러발생 판별방법에 관한 것으로, 더욱 상세하게는 SPI 통신을 사용하는 마이크로 컨트롤러에서 수신 버퍼의 스턱비트 에러발생 판별방법에 관한 것이다.
The present invention relates to a method for determining the occurrence of a stuck bit error in an SPI reception buffer, and more particularly, to a method for determining a stuck bit error occurrence in a reception buffer in a microcontroller using SPI communication.

종래에는 마이크로 컨트롤러에서 데이터를 송신할 때 PCB 패턴 체크를 위해 지정된 패턴 하나만을 송수신하도록 되어 있었다. 이 방식은 PCB 패턴에 이상이 없고 노이즈 등으로 인한 신호왜곡이 없는 경우에 송신 데이터 패턴값이 수신 버퍼에 동일하게 수신되는 것을 원리로 하여 PCB 패턴의 이상 유무를 확인하였다.Conventionally, when transmitting data from the microcontroller, only one designated pattern is required to be transmitted and received for the PCB pattern check. In this method, if there is no abnormality in the PCB pattern and there is no signal distortion due to noise or the like, the transmission data pattern value is received in the receiving buffer in the same manner.

그러나, SPI 수신 버퍼에 스턱 비트가 생겨 특정 비트가 변경되지 않는 경우가 발생하는데, 변경되지 않는 데이터 패턴값이 송신 데이터 패턴값과 일치하는 경우에는 비정상적인 상태를 감지하는 것이 불가능하게 된다.However, a stuck bit is generated in the SPI reception buffer and a specific bit is not changed. When the unchanged data pattern value matches the transmission data pattern value, it becomes impossible to detect the abnormal state.

도 1은 종래의 송수신 데이터 패턴값을 나타낸 개략도이다. 도 1을 참조하면, 수신 버퍼의 4번째 비트가 1로 스턱된 경우에 송신 데이터 패턴값인 0xAAAA와 동일한 패턴값이 되어 에러 여부를 판별할 수 없고, 송신 데이터 패턴값이 수신되었을 경우 이를 판별할 수 없으므로 시스템이 정상적으로 동작할 수 없게 된다.1 is a schematic diagram showing a conventional transmit / receive data pattern value. Referring to FIG. 1, if the fourth bit of the receiving buffer is stuck to 1, it becomes a pattern value equal to 0xAAAA, which is a transmission data pattern value, so that it can not be determined whether an error has occurred. If a transmission data pattern value is received, The system will not be able to operate normally.

본 발명은 이와 같은 문제점을 해결하기 위해 창출된 것으로, 본 발명의 목적은 SPI 버스라인 상의 PCB 패턴 이상 여부를 체크함과 동시에 SPI 수신 버퍼에 스턱비트가 발생하였는지 판별할 수 있는 SPI 수신 버퍼의 스턱비트 에러발생 판별방법을 제공함에 있다.
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and it is an object of the present invention to provide a method and apparatus for checking whether a PCB pattern on a SPI bus line is abnormal or not, And to provide a method of determining occurrence of a bit error.

상기 목적을 달성하기 위한 본 발명의 관점에 따른 SPI 수신 버퍼의 스턱비트 에러발생 판별방법은, 패턴값 판단부에서 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한지를 판단하는 단계; 상기 제2 수신 데이터 패턴값이 상기 제1 송신 데이터 패턴값과 동일하지 않은 경우, 버스라인 에러발생 인식부에서 SPI(Serial Peripheral Interconnect) 버스라인(bus line)에 에러가 발생한 것을 인식하는 단계; 상기 제2 수신 데이터 패턴값이 상기 제1 송신 데이터 패턴값과 동일한 경우, 상기 패턴값 판단부에서 제1 수신 데이터 패턴값이 초기화된 레지스터 값인지를 판단하는 단계; 상기 제1 수신 데이터 패턴값이 상기 초기화된 레지스터 값이 아닌 경우, 초기화 에러발생 인식부에서 상기 SPI 수신 버퍼에 초기화 에러가 발생한 것을 인식하는 단계; 상기 제1 수신 데이터 패턴값이 상기 초기화된 레지스터 값인 경우, 상기 패턴값 판단부에서 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한지를 판단하는 단계; 상기 제3 수신 데이터 패턴값이 상기 제2 송신 데이터 패턴값과 동일하지 않은 경우, 스턱비트 에러발생 인식부에서 상기 SPI 수신 버퍼에 스턱비트 에러(stuck bit error)가 발생한 것을 인식하는 단계; 상기 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한 경우, 상기 패턴값 판단부에서 상기 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일한지를 판단하는 단계; 및 상기 제4 수신 데이터 패턴값이 상기 제3 송신 데이터 패턴값과 동일하지 경우, 상기 스턱비트 에러발생 인식부에서 상기 SPI 수신 버퍼에 스턱비트 에러가 발생한 것을 인식하는 단계;를 포함하는 것을 특징으로 한다.
According to an aspect of the present invention, there is provided a method for determining a stuck-bit error occurrence in an SPI receiving buffer, the method comprising: determining whether a second received data pattern value is equal to a first transmitted data pattern value; Recognizing that an error has occurred in an SPI (Serial Peripheral Interconnect) bus line when the second received data pattern value is not equal to the first transmission data pattern value; Determining whether the first received data pattern value is an initialized register value if the second received data pattern value is equal to the first transmitted data pattern value; Recognizing that an initialization error has occurred in the SPI reception buffer in the initialization error occurrence recognition unit if the first received data pattern value is not the initialized register value; Determining whether the third received data pattern value is equal to a second transmitted data pattern value in the pattern value determining unit when the first received data pattern value is the initialized register value; Recognizing that a stuck bit error has occurred in the SPI reception buffer in the stuck bit error occurrence recognition unit when the third received data pattern value is not equal to the second transmission data pattern value; Determining whether the fourth received data pattern value is equal to a third transmitted data pattern value if the third received data pattern value is equal to a second transmitted data pattern value; And recognizing that a stuck-bit error has occurred in the SPI reception buffer in the stuck-bit error generation recognition unit when the fourth received data pattern value is not equal to the third transmission data pattern value. do.

한편, 본 발명의 바람직한 실시 예에 따르면, 패턴값 판단부에서 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한지를 판단하는 단계; 상기 제2 수신 데이터 패턴값이 상기 제1 송신 데이터 패턴값과 동일하지 않은 경우, 버스라인 에러발생 인식부에서 SPI(Serial Peripheral Interconnect) 버스라인(bus line)에 에러가 발생한 것을 인식하는 단계; 상기 제2 수신 데이터 패턴값이 상기 제1 송신 데이터 패턴값과 동일한 경우, 명령응답 인식부에서 제1 수신 데이터 패턴값이 무효한 명령에 대한 응답인지를 판단하는 단계; 상기 제1 수신 데이터 패턴값이 상기 무효한 명령에 대한 응답이 아닌 경우, 동작에러 인식부에서 SPI 수신 버퍼의 동작이 에러인 것을 인식하는 단계; 상기 제1 수신 데이터 패턴값이 상기 무효한 명령에 대한 응답인 경우, 상기 패턴값 판단부에서 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한지를 판단하는 단계; 상기 제3 수신 데이터 패턴값이 상기 제2 송신 데이터 패턴값과 동일하지 않은 경우, 스턱비트 에러발생 인식부에서 상기 SPI 수신 버퍼에 스턱비트 에러(stuck bit error)가 발생한 것을 인식하는 단계; 상기 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한 경우, 상기 패턴값 판단부에서 상기 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일한지를 판단하는 단계; 및 상기 제4 수신 데이터 패턴값이 상기 제3 송신 데이터 패턴값과 동일하지 경우, 상기 스턱비트 에러발생 인식부에서 상기 SPI 수신 버퍼에 스턱비트 에러가 발생한 것을 인식하는 단계;를 포함하는 것을 특징으로 한다.
According to another aspect of the present invention, there is provided a method of transmitting data, the method comprising: determining whether a second received data pattern value is equal to a first transmitted data pattern value; Recognizing that an error has occurred in an SPI (Serial Peripheral Interconnect) bus line when the second received data pattern value is not equal to the first transmission data pattern value; Determining whether the first received data pattern value is a response to an invalid command if the second received data pattern value is equal to the first transmitted data pattern value; Recognizing that the operation of the SPI reception buffer is an error in the operation error recognition unit when the first received data pattern value is not a response to the invalid instruction; Determining whether the third received data pattern value is equal to a second transmitted data pattern value if the first received data pattern value is a response to the invalid command; Recognizing that a stuck bit error has occurred in the SPI reception buffer in the stuck bit error occurrence recognition unit when the third received data pattern value is not equal to the second transmission data pattern value; Determining whether the fourth received data pattern value is equal to a third transmitted data pattern value if the third received data pattern value is equal to a second transmitted data pattern value; And recognizing that a stuck-bit error has occurred in the SPI reception buffer in the stuck-bit error generation recognition unit when the fourth received data pattern value is not equal to the third transmission data pattern value. do.

본 발명에서 제시하는 SPI 수신 버퍼의 스턱비트 에러발생 판별방법은, SPI 버스라인 상의 PCB 패턴 이상 여부를 체크함과 동시에 SPI 수신 버퍼에 스턱비트가 발생하였는지 판별하기 때문에, 안정적인 통신 환경을 구현할 수 있는 효과를 갖는다.
The stuck bit error occurrence determination method of the SPI reception buffer according to the present invention checks whether the PCB pattern on the SPI bus line is abnormal or not, and determines whether a stuck bit is generated in the SPI reception buffer. Effect.

도 1은 종래의 송수신 데이터 패턴값을 나타낸 개략도이다.
도 2는 본 발명의 일 실시예에 따른 SPI 수신 버퍼의 스턱비트 에러발생 판별시스템의 구성도이다.
도 3은 본 발명의 일 실시예에 따른 첫 번째 통신을 개시하는 경우 SPI 수신 버퍼의 스턱비트 에러발생 판별방법의 흐름도이다.
도 4는 본 발명의 일 실시예에 따른 첫 번째 통신 이후의 경우 SPI 수신 버퍼의 스턱비트 에러발생 판별방법의 흐름도이다.
도 5는 본 발명의 일 실시예에 따른 송수신 데이터 패턴값을 나타낸 개략도이다.
1 is a schematic diagram showing a conventional transmit / receive data pattern value.
2 is a configuration diagram of a stuck-bit error occurrence determination system of an SPI reception buffer according to an embodiment of the present invention.
3 is a flowchart of a stuck-bit error occurrence determination method of an SPI reception buffer when a first communication is started according to an embodiment of the present invention.
4 is a flowchart of a stuck-bit error occurrence determination method of an SPI reception buffer after a first communication according to an embodiment of the present invention.
5 is a schematic diagram illustrating transmit / receive data pattern values according to an embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 실시형태를 설명한다. 그러나, 본 발명의 실시형태는 여러 가지의 다른 형태로 변형될 수 있으며, 본 발명의 범위가 이하 설명하는 실시형태로만 한정되는 것은 아니다. 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있으며, 도면상의 동일한 부호로 표시되는 요소는 동일한 요소이다.
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, the embodiments of the present invention may be modified into various other forms, and the scope of the present invention is not limited to the embodiments described below. The shape and the size of the elements in the drawings may be exaggerated for clarity and the same elements are denoted by the same reference numerals in the drawings.

도 2는 본 발명의 일 실시예에 따른 SPI 수신 버퍼의 스턱비트 에러발생 판별시스템의 구성도이다. 도 2를 참조하면, 본 발명의 일 실시예에 따른 SPI 수신 버퍼의 스턱비트 에러발생 판별시스템은, 패턴값 판단부(100), 버스라인 에러발생 인식부(200), 초기화 에러발생 인식부(300), 및 스턱비트 에러발생 인식부(400), 명령응답 인식부(500), 및 동작에러 인식부(600)를 포함한다.2 is a configuration diagram of a stuck-bit error occurrence determination system of an SPI reception buffer according to an embodiment of the present invention. 2, a stuck-bit error occurrence determination system of an SPI reception buffer according to an embodiment of the present invention includes a pattern value determination unit 100, a bus line error occurrence recognition unit 200, an initialization error occurrence recognition unit 300, and stuck bit error recognition unit 400, command response recognition unit 500, and operation error recognition unit 600.

먼저, 첫 번째 통신을 개시하는 경우 및 첫 번째 통신 이후의 경우에 모두 적용되는 SPI 수신 버퍼의 스턱비트 에러발생 판별시스템의 구성은 다음과 같다.First, the structure of the stuck-bit error occurrence determination system of the SPI reception buffer, which is applied both in the case of starting the first communication and after the first communication, is as follows.

패턴값 판단부(100)는 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한지를 판단한다. 또한, 패턴값 판단부(100)는 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한 경우, 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일한지를 판단한다.The pattern value determination unit 100 determines whether the second received data pattern value is equal to the first transmitted data pattern value. The pattern value determination unit 100 determines whether the fourth received data pattern value is equal to the third transmitted data pattern value when the third received data pattern value is equal to the second transmitted data pattern value.

버스라인 에러발생 인식부(200)는 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일하지 않은 경우, SPI(Serial Peripheral Interconnect) 버스라인(bus line)에 에러가 발생한 것을 인식한다.The bus line error occurrence recognition unit 200 recognizes that an error has occurred in an SPI (Serial Peripheral Interconnect) bus line when the second received data pattern value is not equal to the first transmission data pattern value.

스턱비트 에러발생 인식부(400)는 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일하지 않은 경우, SPI 수신 버퍼에 스턱비트 에러(stuck bit error)가 발생한 것을 인식한다. 그리고, 스턱비트 에러발생 인식부(400)는 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일하지 경우, SPI 수신 버퍼에 스턱비트 에러가 발생한 것을 인식한다.The stuck bit error occurrence recognition unit 400 recognizes that a stuck bit error has occurred in the SPI reception buffer when the third received data pattern value is not equal to the second transmission data pattern value. The stuck-bit error occurrence recognition unit 400 recognizes that a stuck-bit error has occurred in the SPI reception buffer when the fourth received data pattern value is not equal to the third transmission data pattern value.

한편, 첫 번째 통신을 개시하는 경우에만 적용되는 SPI 수신 버퍼의 스턱비트 에러발생 판별시스템의 구성은 다음과 같다.The configuration of the stuck-bit error occurrence determination system of the SPI reception buffer, which is applied only when the first communication is started, is as follows.

초기화 에러발생 인식부(300)는 제1 수신 데이터 패턴값이 초기화된 레지스터 값이 아닌 경우, SPI 수신 버퍼에 초기화 에러가 발생한 것을 인식한다.The initialization error occurrence recognition unit 300 recognizes that an initialization error has occurred in the SPI reception buffer when the first reception data pattern value is not the initialized register value.

패턴값 판단부(100)는 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한 경우, 제1 수신 데이터 패턴값이 초기화된 레지스터 값인지를 판단한다. 또한, 패턴값 판단부(100)는 제1 수신 데이터 패턴값이 초기화된 레지스터 값인 경우, 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한지를 판단한다. The pattern value determination unit 100 determines whether the first received data pattern value is an initialized register value when the second received data pattern value is equal to the first transmitted data pattern value. If the first received data pattern value is the initialized register value, the pattern value determining unit 100 determines whether the third received data pattern value is equal to the second transmitted data pattern value.

또 한편, 첫 번째 통신 이후의 경우에 모두 적용되는 SPI 수신 버퍼의 스턱비트 에러발생 판별시스템의 구성은 다음과 같다.On the other hand, the structure of the stuck-bit error occurrence discrimination system of the SPI reception buffer applied after the first communication is as follows.

명령응답 인식부(500)는 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한 경우, 제1 수신 데이터 패턴값이 무효한 명령에 대한 응답인지를 판단한다.The command response recognizing unit 500 determines whether the first received data pattern value is a response to an invalid command when the second received data pattern value is equal to the first transmitted data pattern value.

동작에러 인식부(600)는 제1 수신 데이터 패턴값이 무효한 명령에 대한 응답이 아닌 경우, SPI 수신 버퍼의 동작이 에러인 것을 인식한다.The operation error recognition unit 600 recognizes that the operation of the SPI reception buffer is an error when the first received data pattern value is not a response to an invalid instruction.

패턴값 판단부(100)는 제1 수신 데이터 패턴값이 무효한 명령에 대한 응답인 경우, 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한지를 판단한다.
The pattern value determination unit 100 determines whether the third received data pattern value is equal to the second transmitted data pattern value when the first received data pattern value is a response to an invalid command.

도 3은 본 발명의 일 실시예에 따른 첫 번째 통신을 개시하는 경우 SPI 수신 버퍼의 스턱비트 에러발생 판별방법의 흐름도이다. 도 2 및 도 3을 참조하면, 본 발명의 일 실시예에 따른 첫 번째 통신을 개시하는 경우 SPI 수신 버퍼의 스턱비트 에러발생 판별방법은 다음과 같다.3 is a flowchart of a stuck-bit error occurrence determination method of an SPI reception buffer when a first communication is started according to an embodiment of the present invention. Referring to FIG. 2 and FIG. 3, a method for determining occurrence of a stuck-bit error in an SPI reception buffer when starting a first communication according to an embodiment of the present invention is as follows.

먼저, 패턴값 판단부(100)에서 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한지를 판단한다(S110).First, the pattern value determination unit 100 determines whether the second received data pattern value is equal to the first transmitted data pattern value (S110).

S110 단계 이후, 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일하지 않은 경우, 버스라인 에러발생 인식부(200)에서 SPI(Serial Peripheral Interconnect) 버스라인(bus line)에 에러가 발생한 것을 인식한다(S120).If the second reception data pattern value is not equal to the first transmission data pattern value after step S110, the bus line error occurrence recognition unit 200 determines that an error has occurred in the SPI (Serial Peripheral Interconnect) bus line (S120).

그러나, S110 단계 이후, 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한 경우, 패턴값 판단부(100)에서 제1 수신 데이터 패턴값이 초기화된 레지스터 값인지를 판단한다(S130).However, if the second received data pattern value is equal to the first transmitted data pattern value after step S110, the pattern value determination unit 100 determines whether the first received data pattern value is an initialized register value (S130).

S130 단계 이후, 제1 수신 데이터 패턴값이 초기화된 레지스터 값이 아닌 경우, 초기화 에러발생 인식부(300)에서 SPI 수신 버퍼에 초기화 에러가 발생한 것을 인식한다(S140).If the first received data pattern value is not the initialized register value after step S130, the initialization error occurrence recognition unit 300 recognizes that an initialization error has occurred in the SPI reception buffer (S140).

그러나, S130 단계 이후, 제1 수신 데이터 패턴값이 초기화된 레지스터 값인 경우, 패턴값 판단부(100)에서 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한지를 판단한다(S150).However, if it is determined in step S130 that the first received data pattern value is the initialized register value, the pattern value determination unit 100 determines whether the third received data pattern value is equal to the second transmitted data pattern value in step S150.

S150 단계 이후, 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일하지 않은 경우, 스턱비트 에러발생 인식부(400)에서 SPI 수신 버퍼에 스턱비트 에러(stuck bit error)가 발생한 것을 인식한다(S160).After step S150, if the third received data pattern value is not equal to the second transmitted data pattern value, the stuck bit error recognition unit 400 recognizes that a stuck bit error has occurred in the SPI receiving buffer (S160).

그러나, S150 단계 이후, 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한 경우, 패턴값 판단부(100)에서 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일한지를 판단한다(S170).However, if it is determined in step S150 that the third received data pattern value is equal to the second transmitted data pattern value, the pattern value determination unit 100 determines whether the fourth received data pattern value is equal to the third transmitted data pattern value S170).

S170 단계 이후, 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일하지 경우, 스턱비트 에러발생 인식부(400)에서 SPI 수신 버퍼에 스턱비트 에러가 발생한 것을 인식한다(S180).
If the fourth received data pattern value is not equal to the third transmit data pattern value after step S170, the stuck bit error recognition unit 400 recognizes that a stuck bit error has occurred in the SPI receive buffer at step S180.

도 4는 본 발명의 일 실시예에 따른 첫 번째 통신 이후의 경우 SPI 수신 버퍼의 스턱비트 에러발생 판별방법의 흐름도이다. 도 2 및 도 4를 참조하면, 본 발명의 일 실시예에 따른 첫 번째 통신 이후의 경우 SPI 수신 버퍼의 스턱비트 에러발생 판별방법은 다음과 같다.4 is a flowchart of a stuck-bit error occurrence determination method of an SPI reception buffer after a first communication according to an embodiment of the present invention. Referring to FIG. 2 and FIG. 4, a method for determining occurrence of a stuck-bit error in an SPI reception buffer after a first communication according to an embodiment of the present invention is as follows.

먼저, 패턴값 판단부(100)에서 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한지를 판단한다(S210).First, the pattern value determination unit 100 determines whether the second received data pattern value is equal to the first transmitted data pattern value (S210).

S210 단계 이후, 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일하지 않은 경우, 버스라인 에러발생 인식부(200)에서 SPI(Serial Peripheral Interconnect) 버스라인(bus line)에 에러가 발생한 것을 인식한다(S220).If the second reception data pattern value is not equal to the first transmission data pattern value after step S210, it is determined that an error has occurred in the SPI (Serial Peripheral Interconnect) bus line in the bus line error occurrence recognition unit 200 (S220).

S210 단계 이후, 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한 경우, 명령응답 인식부(500)에서 제1 수신 데이터 패턴값이 무효한 명령에 대한 응답인지를 판단한다(S230).If the second received data pattern value is equal to the first transmitted data pattern value in step S210, the command response recognition unit 500 determines whether the first received data pattern value is a response to an invalid command in step S230.

S230 단계 이후, 제1 수신 데이터 패턴값이 무효한 명령에 대한 응답이 아닌 경우, 동작에러 인식부(600)에서 SPI 수신 버퍼의 동작이 에러인 것을 인식한다(S240).If the first received data pattern value is not a response to an invalid instruction, the operation error recognition unit 600 recognizes that the operation of the SPI reception buffer is an error at step S240.

S230 단계 이후, 제1 수신 데이터 패턴값이 무효한 명령에 대한 응답인 경우, 패턴값 판단부(100)에서 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한지를 판단한다(S250).In step S250, if the first received data pattern value is a response to an invalid command, the pattern value determining unit 100 determines whether the third received data pattern value is equal to the second transmitted data pattern value in step S250.

S250 단계 이후, 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일하지 않은 경우, 스턱비트 에러발생 인식부(400)에서 SPI 수신 버퍼에 스턱비트 에러(stuck bit error)가 발생한 것을 인식한다(S260).After step S250, if the third received data pattern value is not equal to the second transmitted data pattern value, the stuck bit error recognition unit 400 recognizes that a stuck bit error has occurred in the SPI receiving buffer (S260).

S250 단계 이후, 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한 경우, 패턴값 판단부(100)에서 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일한지를 판단한다(S270).If the third received data pattern value is equal to the second transmitted data pattern value in step S250, the pattern value determination unit 100 determines whether the fourth received data pattern value is equal to the third transmitted data pattern value (step S270) .

S270 단계 이후, 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일하지 경우, 스턱비트 에러발생 인식부(400)에서 SPI 수신 버퍼에 스턱비트 에러가 발생한 것을 인식한다(S280).
If the fourth received data pattern value is not equal to the third transmitted data pattern value in step S270, the stuck bit error recognition unit 400 recognizes that a stuck bit error has occurred in the SPI receiving buffer in step S280.

도 5는 본 발명의 일 실시예에 따른 송수신 데이터 패턴값을 나타낸 개략도이다. 도 5를 참조하면, 본 발명의 일 실시예에 따른 송수신 데이터 패턴값은 (i)첫 번째 통신을 개시하는 경우와, (ii) 첫 번째 통신 이후의 경우로 구분하여 설명할 수 있다.5 is a schematic diagram illustrating transmit / receive data pattern values according to an embodiment of the present invention. Referring to FIG. 5, a transmission / reception data pattern value according to an embodiment of the present invention can be divided into (i) a case where a first communication is started and (ii) a case after a first communication.

(i) 첫 번째 통신을 개시하는 경우(i) when starting the first communication

송신측에서 0xAAAA를 송신하고 있을 때, 수신측의 SPI 수신 버퍼에는 0x0000이 수신됨을 알 수 있다. 이 수신된 패턴값은 초기화된 상태를 의미하며, 첫 번째로 0xAAAA를 송신한 후 수신한 SPI 수신 버퍼의 값을 읽었을 때 이 값이 0x0000이 아닌 경우 초기화에 이상이 있거나 SPI 버스라인에 문제가 있다는 것을 판별할 수 있다.When 0xAAAA is being transmitted on the transmitting side, it can be seen that 0x0000 is received on the receiving side SPI receiving buffer. The received pattern value indicates the initialized state. If the value is not 0x0000 when reading the value of the SPI reception buffer received after the first transmission of 0xAAAA, the initialization is abnormal or there is a problem in the SPI bus line Can be determined.

이후에, 송신측에서 송신한 0xAAAA가 그대로 수신되면 SPI 버스라인에는 이상이 없다는 것이 판별된다.Thereafter, when the 0xAAAA transmitted from the transmitting side is received intact, it is determined that there is no abnormality in the SPI bus line.

이후에, SPI 수신 버퍼의 스턱비트를 확인하기 위해 송신측에서 송신한 데이터 패턴값 0xAAAA, 0x5555, 0xAAAA에 따라 수신 버퍼에 수신된 데이터 패턴값이 그대로 변경되면 수신 버퍼에 스턱비트가 없음을 판별할 수 있다.Thereafter, when the data pattern value received in the receive buffer is directly changed according to the data pattern values 0xAAAA, 0x5555, and 0xAAAA transmitted from the transmitting side in order to check the stuck bit of the SPI receive buffer, it is determined that there is no stuck bit in the receive buffer .

마지막으로, 무효한 명령(Invalid Command)을 송신한 후 다음 리커런스 타임(recurrence time)에 통신을 통해 읽은 데이터 패턴값이 무효한 명령에 대한 응답을 갖는 데이터 패턴값일 경우 무효한 명령에 대해서도 인식하여 처리되었음을 알 수 있다.Finally, if the data pattern value read through communication at the next recurrence time after transmitting an invalid command is a data pattern value having a response to an invalid command, the invalid command is recognized It can be seen that it has been processed.

(ii) 첫 번째 통신 이후의 경우(ii) after the first communication

무효한 명령을 수신한 경우 송신 데이터 패턴값은 대부분의 경우에는 정해져 있는 것이므로, 이를 이용하여 통신할 경우 명령을 수신하고 이에 대해 무효한 명령의 수신에 대한 판별하였다는 것을 의미한다. 그러므로, 통신의 정확도와 정상 동작여부에 대한 신뢰를 높일 수 있다. 무효한 명령에 대한 응답이 정확하면 그 이후에는 초기에 통신할 때와는 같은 방식으로 수신 버퍼의 스턱비트 에러를 체크하기 위해 0xAAAA, 0x5555, 0xAAAA의 순서로 데이터 패턴값을 송신하여 스턱비트 에러를 판별한다.When an invalid command is received, the transmission data pattern value is determined in most cases. Therefore, when communication is performed using this command, it means that the command is received and the reception of an invalid command is discriminated. Therefore, it is possible to increase the reliability of communication accuracy and normal operation. If the response to the invalid command is correct, the data pattern value is transmitted in the order of 0xAAAA, 0x5555, and 0xAAAA in order to check the stuck bit error of the reception buffer in the same manner as the initial communication, .

본 발명의 일 실시예와 관련하여, 종래에는 수신 버퍼의 4번째 비트가 1로 스턱된 경우에 송신 데이터 패턴값인 0xAAAA와 동일한 패턴값이 되어 에러 여부를 판별할 수 없고, 송신 데이터 패턴값이 수신되었을 경우 이를 판별할 수 없으므로 시스템이 정상적으로 동작할 수 없었다. 그러나, 본 발명의 일 실시예에서는 SPI 버스라인 상의 PCB 패턴 이상 여부를 체크함과 동시에 SPI 수신 버퍼에 스턱비트가 발생하였는지 판별할 수 있다.
According to the embodiment of the present invention, when the fourth bit of the receiving buffer is stuck to 1, the pattern value becomes the same as 0xAAAA, which is the transmission data pattern value, If it was received, it could not be determined and the system could not operate normally. However, in one embodiment of the present invention, it is possible to check whether the PCB pattern on the SPI bus line is abnormal or not and whether a stuck bit is generated in the SPI receiving buffer.

본 발명은 상술한 실시형태 및 첨부된 도면에 의해 한정되지 아니한다. 첨부된 특허청구범위에 의해 권리범위를 한정하고자 하며, 특허청구범위에 기재된 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 다양한 형태의 치환, 변형 및 변경이 가능하다는 것은 당 기술분야의 통상의 지식을 가진 자에게 자명할 것이다.
The present invention is not limited to the above-described embodiments and the accompanying drawings. It will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined in the appended claims. It will be clear to those who have it.

100 : 패턴값 판단부 200 : 버스라인 에러발생 인신부
300 : 초기화 에러발생 인식부 400 : 스턱비트 에러발생 인식부
500 : 명령응답 인식부 600 : 동작에러 인식부
100: pattern value determination unit 200: bus line error occurrence
300: initialization error occurrence recognition unit 400: stuck bit error occurrence recognition unit
500: Command response recognizing unit 600: Operation error recognizing unit

Claims (2)

패턴값 판단부에서 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한지를 판단하는 단계;
상기 제2 수신 데이터 패턴값이 상기 제1 송신 데이터 패턴값과 동일하지 않은 경우, 버스라인 에러발생 인식부에서 SPI(Serial Peripheral Interconnect) 버스라인(bus line)에 에러가 발생한 것을 인식하는 단계;
상기 제2 수신 데이터 패턴값이 상기 제1 송신 데이터 패턴값과 동일한 경우, 상기 패턴값 판단부에서 제1 수신 데이터 패턴값이 초기화된 레지스터 값인지를 판단하는 단계;
상기 제1 수신 데이터 패턴값이 상기 초기화된 레지스터 값이 아닌 경우, 초기화 에러발생 인식부에서 상기 SPI 수신 버퍼에 초기화 에러가 발생한 것을 인식하는 단계;
상기 제1 수신 데이터 패턴값이 상기 초기화된 레지스터 값인 경우, 상기 패턴값 판단부에서 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한지를 판단하는 단계;
상기 제3 수신 데이터 패턴값이 상기 제2 송신 데이터 패턴값과 동일하지 않은 경우, 스턱비트 에러발생 인식부에서 상기 SPI 수신 버퍼에 스턱비트 에러 (stuck bit error)가 발생한 것을 인식하는 단계;
상기 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한 경우, 상기 패턴값 판단부에서 상기 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일한지를 판단하는 단계; 및
상기 제4 수신 데이터 패턴값이 상기 제3 송신 데이터 패턴값과 동일하지 경우, 상기 스턱비트 에러발생 인식부에서 상기 SPI 수신 버퍼에 스턱비트 에러가 발생한 것을 인식하는 단계;를 포함하는 것을 특징으로 하는 SPI 수신 버퍼의 스턱비트 에러발생 판별방법.
Determining whether the second received data pattern value is equal to the first transmitted data pattern value in the pattern value determining unit;
Recognizing that an error has occurred in an SPI (Serial Peripheral Interconnect) bus line when the second received data pattern value is not equal to the first transmission data pattern value;
Determining whether the first received data pattern value is an initialized register value if the second received data pattern value is equal to the first transmitted data pattern value;
Recognizing that an initialization error has occurred in the SPI reception buffer in the initialization error occurrence recognition unit if the first received data pattern value is not the initialized register value;
Determining whether the third received data pattern value is equal to a second transmitted data pattern value in the pattern value determining unit when the first received data pattern value is the initialized register value;
Recognizing that a stuck bit error has occurred in the SPI reception buffer in the stuck bit error occurrence recognition unit when the third received data pattern value is not equal to the second transmission data pattern value;
Determining whether the fourth received data pattern value is equal to a third transmitted data pattern value if the third received data pattern value is equal to a second transmitted data pattern value; And
And recognizing that a stuck-bit error has occurred in the SPI reception buffer in the stuck-bit error generation recognition unit when the fourth received data pattern value is not equal to the third transmission data pattern value A method for determining occurrence of a stuck bit error in an SPI receive buffer.
패턴값 판단부에서 제2 수신 데이터 패턴값이 제1 송신 데이터 패턴값과 동일한지를 판단하는 단계;
상기 제2 수신 데이터 패턴값이 상기 제1 송신 데이터 패턴값과 동일하지 않은 경우, 버스라인 에러발생 인식부에서 SPI(Serial Peripheral Interconnect) 버스라인(bus line)에 에러가 발생한 것을 인식하는 단계;
상기 제2 수신 데이터 패턴값이 상기 제1 송신 데이터 패턴값과 동일한 경우, 명령응답 인식부에서 제1 수신 데이터 패턴값이 무효한 명령에 대한 응답인지를 판단하는 단계;
상기 제1 수신 데이터 패턴값이 상기 무효한 명령에 대한 응답이 아닌 경우, 동작에러 인식부에서 SPI 수신 버퍼의 동작이 에러인 것을 인식하는 단계;
상기 제1 수신 데이터 패턴값이 상기 무효한 명령에 대한 응답인 경우, 상기 패턴값 판단부에서 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한지를 판단하는 단계;
상기 제3 수신 데이터 패턴값이 상기 제2 송신 데이터 패턴값과 동일하지 않은 경우, 스턱비트 에러발생 인식부에서 상기 SPI 수신 버퍼에 스턱비트 에러(stuck bit error)가 발생한 것을 인식하는 단계;
상기 제3 수신 데이터 패턴값이 제2 송신 데이터 패턴값과 동일한 경우, 상기 패턴값 판단부에서 상기 제4 수신 데이터 패턴값이 제3 송신 데이터 패턴값과 동일한지를 판단하는 단계; 및
상기 제4 수신 데이터 패턴값이 상기 제3 송신 데이터 패턴값과 동일하지 경우, 상기 스턱비트 에러발생 인식부에서 상기 SPI 수신 버퍼에 스턱비트 에러가 발생한 것을 인식하는 단계;를 포함하는 것을 특징으로 하는 SPI 수신 버퍼의 스턱비트 에러발생 판별방법.
Determining whether the second received data pattern value is equal to the first transmitted data pattern value in the pattern value determining unit;
Recognizing that an error has occurred in an SPI (Serial Peripheral Interconnect) bus line when the second received data pattern value is not equal to the first transmission data pattern value;
Determining whether the first received data pattern value is a response to an invalid command if the second received data pattern value is equal to the first transmitted data pattern value;
Recognizing that the operation of the SPI reception buffer is an error in the operation error recognition unit when the first received data pattern value is not a response to the invalid instruction;
Determining whether the third received data pattern value is equal to a second transmitted data pattern value if the first received data pattern value is a response to the invalid command;
Recognizing that a stuck bit error has occurred in the SPI reception buffer in the stuck bit error occurrence recognition unit when the third received data pattern value is not equal to the second transmission data pattern value;
Determining whether the fourth received data pattern value is equal to a third transmitted data pattern value if the third received data pattern value is equal to a second transmitted data pattern value; And
And recognizing that a stuck-bit error has occurred in the SPI reception buffer in the stuck-bit error generation recognition unit when the fourth received data pattern value is not equal to the third transmission data pattern value A method for determining occurrence of a stuck bit error in an SPI receive buffer.
KR1020120122520A 2012-10-31 2012-10-31 System and method for stuck bit error occurrence distinction or serial peripheral interconnect receiver buffer KR102008996B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020120122520A KR102008996B1 (en) 2012-10-31 2012-10-31 System and method for stuck bit error occurrence distinction or serial peripheral interconnect receiver buffer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120122520A KR102008996B1 (en) 2012-10-31 2012-10-31 System and method for stuck bit error occurrence distinction or serial peripheral interconnect receiver buffer

Publications (2)

Publication Number Publication Date
KR20140055519A true KR20140055519A (en) 2014-05-09
KR102008996B1 KR102008996B1 (en) 2019-08-08

Family

ID=50887152

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120122520A KR102008996B1 (en) 2012-10-31 2012-10-31 System and method for stuck bit error occurrence distinction or serial peripheral interconnect receiver buffer

Country Status (1)

Country Link
KR (1) KR102008996B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3644183A4 (en) * 2017-12-21 2020-10-21 Lg Chem, Ltd. Apparatus and method for diagnosing communication abnormality

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080104159A (en) * 2006-03-28 2008-12-01 로베르트 보쉬 게엠베하 Method for testing at least one computation unit which is installed in a control device
WO2009123943A1 (en) * 2008-04-02 2009-10-08 Baxter International Inc. Patient-controlled analgesic pump with serial connection to bolus button
KR20100073520A (en) * 2008-12-23 2010-07-01 엘지노텔 주식회사 Spi communication system and method for communicating between main board and expansion board
US20120066696A1 (en) * 2010-09-09 2012-03-15 Sattam Dasgupta Generic hardware and software platform for electronic devices in multimedia, graphics, and computing applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080104159A (en) * 2006-03-28 2008-12-01 로베르트 보쉬 게엠베하 Method for testing at least one computation unit which is installed in a control device
WO2009123943A1 (en) * 2008-04-02 2009-10-08 Baxter International Inc. Patient-controlled analgesic pump with serial connection to bolus button
KR20100073520A (en) * 2008-12-23 2010-07-01 엘지노텔 주식회사 Spi communication system and method for communicating between main board and expansion board
US20120066696A1 (en) * 2010-09-09 2012-03-15 Sattam Dasgupta Generic hardware and software platform for electronic devices in multimedia, graphics, and computing applications

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3644183A4 (en) * 2017-12-21 2020-10-21 Lg Chem, Ltd. Apparatus and method for diagnosing communication abnormality
US11449381B2 (en) 2017-12-21 2022-09-20 Lg Energy Solution, Ltd. Apparatus and method for diagnosing communication fault

Also Published As

Publication number Publication date
KR102008996B1 (en) 2019-08-08

Similar Documents

Publication Publication Date Title
CN104699576B (en) Serial communication testing device, system comprising same and method thereof
US9783138B2 (en) Vehicle control device
US20150286607A1 (en) Determination of the state of an i2c bus
WO2012046634A1 (en) Electronic device and serial data communication method
CN109217922B (en) Method and device for reporting loss alarm of received signal by optical module
US20190215100A1 (en) Communication apparatus, communication method, program, and communication system
CN109154925A (en) Communication equipment, communication means, program and communication system
US8074004B2 (en) Electronic device for contention detection of bidirectional bus and related method
US20200167301A1 (en) Communication apparatus, communication method, program, and communication system
KR20140055519A (en) System and method for stuck bit error occurrence distinction or serial peripheral interconnect receiver buffer
US20210048861A1 (en) START-AND-STOP DETECTING APPARATUS AND METHOD FOR I+hu 3+l C BUS
JP4954249B2 (en) Electronic terminal device and electronic interlocking device
TWI581104B (en) Host devices and methods for transmitting data
JP5161196B2 (en) Clock error detection system
JP4822171B2 (en) Transmitting apparatus and image data transmission system
US7702054B2 (en) Detecting errors in transmitted data
US20110289246A1 (en) Super i/o module, computer system and control method thereof
KR20080013973A (en) Method for communication between at least two subscribers of a communication system
KR20190008198A (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, PROGRAM, AND COMMUNICATION SYSTEM
KR20190008196A (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, PROGRAM, AND COMMUNICATION SYSTEM
CN116185936B (en) SPI communication data receiving and transmitting abnormity detection control system and detection method
JP6241256B2 (en) Electronic device, control device, and communication method
JP2005267580A (en) Method for checking abnormality in synchronous serial communication
JP2016115045A (en) Communication module and module testing system
KR101583090B1 (en) Method for reading data of micro controller

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right