KR20220004317A - Mcu operation monitoring method and system thereof - Google Patents

Mcu operation monitoring method and system thereof Download PDF

Info

Publication number
KR20220004317A
KR20220004317A KR1020200081999A KR20200081999A KR20220004317A KR 20220004317 A KR20220004317 A KR 20220004317A KR 1020200081999 A KR1020200081999 A KR 1020200081999A KR 20200081999 A KR20200081999 A KR 20200081999A KR 20220004317 A KR20220004317 A KR 20220004317A
Authority
KR
South Korea
Prior art keywords
mcu
key value
monitoring
value
count
Prior art date
Application number
KR1020200081999A
Other languages
Korean (ko)
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 KR1020200081999A priority Critical patent/KR20220004317A/en
Publication of KR20220004317A publication Critical patent/KR20220004317A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3013Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a system for monitoring an operation of a micro controller unit (MCU) operation and a control method, and more specifically, to a system for monitoring an MCU operation that synchronizes an event count using a one-time password and a control method. A system for monitoring an MCU operation and a control method according to an embodiment of the present invention include: initializing the error count to a preset value; receiving a seed value and an event count from an MCU; calculating a monitoring key value using a preset hash function, the seed value, and the event count; receiving an MCU key value corresponding to the seed value and the event count from the MCU; and determining an operating state of the MCU by comparing the MCU key value received from the MCU with the monitoring key value.

Description

MCU 동작 감시 방법 및 시스템{MCU OPERATION MONITORING METHOD AND SYSTEM THEREOF}MCU operation monitoring method and system

본 발명은 MCU 동작 감시 시스템 및 제어방법에 관한 것으로, 상세하게는 일회성 비밀번호를 사용하여 이벤트 카운트를 동기화하는 MCU 동작 감시 시스템 및 제어 방법에 관한 것이다.The present invention relates to an MCU operation monitoring system and control method, and more particularly, to an MCU operation monitoring system and control method for synchronizing event counts using a one-time password.

임베디드 시스템은 제어를 수행하기 위한 MCU(Micro Controller Unit) 및 MCU의 동작을 감시하는 워치독 타이머(Watchdog Timer, WDT)를 포함하는 것이 일반적이다. 워치독 타이머는 컴퓨터 또는 임베디드 시스템의 오작동을 탐지하고 복구하기 위해 쓰이는 전자 타이머이다.An embedded system generally includes a microcontroller unit (MCU) for performing control and a watchdog timer (WDT) for monitoring the operation of the MCU. A watchdog timer is an electronic timer used to detect and recover from malfunctions in a computer or embedded system.

정상 작동 중인 시스템은 워치독 타이머의 에러 카운트 증가로 인한 타임 아웃이 발생하는 것을 막기 위해 미리 설정된 주기에 따라 워치독 타이머를 리셋시킨다. 즉, 의도치 않은 오류로 인해 시스템이 비정상적으로 동작할 경우, 워치독 타이머의 카운트는 리셋되지 않고 미리 설정된 카운트에 도달하여 타임 아웃이 발생하게 된다. 이때 워치독 타이머는 시스템의 오작동이 발생한 것으로 판단하여 해당 시스템을 정지시키거나 리셋(Reset) 시킬 수 있다.A system in normal operation resets the watchdog timer according to a preset period to prevent a timeout from occurring due to an increase in the error count of the watchdog timer. That is, when the system operates abnormally due to an unintentional error, the count of the watchdog timer is not reset but reaches a preset count and a timeout occurs. At this time, the watchdog timer may determine that a malfunction of the system has occurred and stop or reset the corresponding system.

기존의 워치독 타이머는 모노펄스 방식, 질의/응답 방식 또는 시드/키 전송 방식 등을 사용한다. 도 1은 질의/응답 방식을 사용하는 기존의 워치독 타이머의 감시 동작 과정을 나타낸 것이다.The existing watchdog timer uses a monopulse method, a query/response method, or a seed/key transmission method. 1 shows a monitoring operation process of a conventional watchdog timer using a question/answer method.

도 1을 참조하면, 질의/응답 방식을 사용하는 기존의 워치독 타이머(12)는 에러 카운트를 초기화한 이후(101), 질의(Query)를 순차적으로 생성한다(102). 이때 질의는 질의에 대한 응답과 1대1로 대응되며, 워치독 타이머(12)는 질의에 대한 MCU(10)의 응답의 정답 여부를 판단하여 MCU의 정상 동작 여부를 확인할 수 있다.Referring to FIG. 1 , the existing watchdog timer 12 using a query/response method initializes an error count ( 101 ) and sequentially generates queries ( 102 ). In this case, the query is one-to-one with the response to the query, and the watchdog timer 12 may determine whether the response of the MCU 10 to the query is correct, thereby confirming whether the MCU is operating normally.

워치독 타이머(12)는 생성한 질의를 MCU(10)에게 전송한다(103). MCU(10)는 워치독 타이머(12)로부터 제1 질의를 수신한뒤(104), 제1 질의에 대한 제1 응답을 생성한다(105). 이와 같은 제1 응답 생성은 MCU에 미리 포함된 질의/응답 시스템을 통해 이루어질 수 있다. MCU(10)는 생성한 제1 응답을 워치독 타이머(12)에게 전송한다(106).The watchdog timer 12 transmits the generated query to the MCU 10 ( 103 ). After receiving the first query from the watchdog timer 12 ( 104 ), the MCU 10 generates a first response to the first query ( 105 ). Such first response generation may be performed through a question/answer system included in the MCU in advance. The MCU 10 transmits the generated first response to the watchdog timer 12 ( 106 ).

MCU(10)로부터 제1 응답을 수신(107)한 워치독 타이머는 제1 응답의 정답 여부를 확인한다(108). 확인(108) 결과, 제1 응답이 정답인 경우, 워치독 타이머는 다음 질의를 위한 제2 질의를 생성한다(110). 확인(108) 결과, 만약 제1 응답이 정답이 아닌 경우, 워치독 타이머의 에러 카운트는 증가한다(109).Upon receiving the first response from the MCU 10 ( 107 ), the watchdog timer checks whether the first response is correct ( 108 ). As a result of the check (108), if the first response is the correct answer, the watchdog timer generates a second query for the next query (110). As a result of checking (108), if the first response is not correct, the error count of the watchdog timer is incremented (step 109).

이처럼 질의/응답 방식을 사용하는 기존의 워치독 타이머(12)는 질의에 대한 응답의 정답 여부를 확인하여 에러 카운트의 증가 여부를 결정한다. 이러한 질의/응답 방식을 사용하는 워치독 타이머(12)의 문제점은, 오실레이터의 이상 또는 마이크로프로세서(CPU)의 이상으로 인하여 질의/응답에 불규칙적인 시간 지연이 발생할 경우 에러 카운트가 누적되어 에러 카운트의 오차로 인해 시스템이 리셋될 수 있다는 것이다. 이와 유사하게, 질의/응답에 대한 불규칙적인 시간 지연이 발생할 경우 에러 카운트가 일시적으로 증가 및 감소되어 에러 자체가 판별되지 않을 수 있는 문제점도 존재한다.As described above, the existing watchdog timer 12 using the question/answer method determines whether the error count is increased by checking whether the answer to the query is correct or not. The problem with the watchdog timer 12 using this question/answer method is that when an irregular time delay occurs in the query/response due to an oscillator or microprocessor (CPU) error, an error count is accumulated and the error count An error can cause the system to reset. Similarly, when an irregular time delay for a query/response occurs, the error count is temporarily increased and decreased, so that the error itself may not be determined.

한편, 도 1에 도시된 것과 같이 질의/응답 방식을 사용하는 기존의 워치독 타이머(12)의 MCU(10) 감시 과정에서 워치독 타이머(12)는 제1 질의를 MCU(10)에게 전송하고(103), MCU(10)는 제1 질의에 대한 제1 응답을 워치독 타이머(12)에게 전송한다(106). 즉, MCU(10)는 워치독 타이머(12)의 각각의 질의에 대해 연산 동작을 수행하고 응답을 송신하는 연산 과정을 반복해야 하며, 워치독 타이머(12)와 MCU(10)가 제1 질의 및 제1 응답을 주고받는 과정(103, 106)은 양방향 통신 수단의 사용을 필요로 한다.Meanwhile, as shown in FIG. 1 , in the process of monitoring the MCU 10 of the existing watchdog timer 12 using the query/response method, the watchdog timer 12 transmits a first query to the MCU 10 and (103), the MCU 10 transmits a first response to the first query to the watchdog timer 12 (106). That is, the MCU 10 must repeat the operation process of performing an operation operation for each query of the watchdog timer 12 and transmitting a response, and the watchdog timer 12 and the MCU 10 perform the first query And the process of sending and receiving the first response (103, 106) requires the use of a two-way communication means.

따라서, 질의/응답 방식을 사용하는 워치독 타이머(12)는 질의 및 응답을 주고받는 통신을 수행하는 통신 수단 및 마이크로프로세서의 연산 부담이 비교적 크다는 단점이 존재한다. 또한, 이와 같은 연산 부담은 전술한 것과 같은 응답 시간의 지연을 초래할 수도 있다.Accordingly, the watchdog timer 12 using the query/response method has a disadvantage in that the computational burden on the communication means and the microprocessor for performing the communication for sending and receiving the query and response is relatively large. In addition, such a computational burden may lead to a delay in response time as described above.

본 발명은 MCU의 응답 시간 지연이 생기는 경우, 응답 시간 오차를 측정하여 에러 카운트를 보정함으로써 MCU 감시 동작의 신뢰성을 높일 수 있는 MCU 동작 감시 시스템 및 제어 방법을 제공하는 것을 목적으로 한다.An object of the present invention is to provide an MCU operation monitoring system and control method capable of increasing the reliability of the MCU monitoring operation by measuring the response time error and correcting the error count when the response time delay of the MCU occurs.

또한 본 발명은 키값을 전송하는 단방향 통신을 사용함으로써 통신 수단 및 마이크로프로세서의 연산 부담을 줄일 수 있는 MCU 동작 감시 시스템 및 제어 방법을 제공하는 것을 목적으로 한다.Another object of the present invention is to provide an MCU operation monitoring system and control method capable of reducing the computational burden of communication means and microprocessors by using one-way communication for transmitting a key value.

본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention not mentioned may be understood by the following description, and will be more clearly understood by the examples of the present invention. It will also be readily apparent that the objects and advantages of the present invention may be realized by the means and combinations thereof indicated in the appended claims.

이러한 목적을 달성하기 위한 본 발명의 일 측면은, 에러 카운트를 미리 설정된 값으로 초기화하는 단계, MCU로부터 시드값 및 이벤트 카운트를 수신하는 단계, 미리 설정된 해시함수 및 상기 시드값과 상기 이벤트 카운트를 사용하여 감시 키값을 산출하는 단계, 상기 MCU로부터 상기 시드값 및 상기 이벤트 카운트에 대응되는 MCU 키값을 수신하는 단계 및 상기 MCU로부터 수신한 MCU 키값과 상기 감시 키값을 비교하여 상기 MCU의 동작 상태를 판단하는 단계를 포함하는 MCU 동작 감시 시스템의 제어방법을 제공할 수 있다.One aspect of the present invention for achieving this object includes the steps of initializing an error count to a preset value, receiving a seed value and an event count from the MCU, using a preset hash function and the seed value and the event count calculating a monitoring key value, receiving an MCU key value corresponding to the seed value and the event count from the MCU, and comparing the MCU key value received from the MCU with the monitoring key value to determine the operating state of the MCU It is possible to provide a control method of an MCU operation monitoring system including the steps.

상기 MCU 키값은 상기 미리 설정된 해시함수 및 상기 시드값과 상기 이벤트 카운트를 기초로 상기 MCU에 의해서 산출될 수 있다.The MCU key value may be calculated by the MCU based on the preset hash function, the seed value, and the event count.

또한 본 발명의 상기 MCU의 동작 상태를 판단하는 단계는, 상기 MCU 키값과 상기 감시 키값이 동일할 경우, 상기 에러 카운트를 감소시키고 상기 이벤트 카운트를 증가시키는 단계 및 상기 MCU 키값과 상기 감시 키값이 동일하지 않을 경우, 상기 에러 카운트를 증가시키고 상기 이벤트 카운트를 증가시키는 단계를 포함할 수 있다.In addition, the step of determining the operation state of the MCU of the present invention includes, when the MCU key value and the monitoring key value are the same, decreasing the error count and increasing the event count, and the MCU key value and the monitoring key value are the same If not, incrementing the error count and incrementing the event count.

또한, 본 발명은 상기 에러 카운트가 미리 설정된 에러 카운트 기준값 이상일 경우 상기 MCU에 문제가 발생한 것으로 판단하는 단계를 더 포함할 수 있다.Also, the present invention may further include determining that a problem has occurred in the MCU when the error count is equal to or greater than a preset error count reference value.

또한, 본 발명의 상기 감시 키값을 산출하는 단계는 현재 이벤트 카운트에 대응되는 감시 키값을 포함하는 다수의 감시 키값을 생성하는 단계를 포함하고, 상기 MCU 키값과 상기 감시 키값을 비교하는 단계는 상기 MCU 키값을 상기 다수의 감시 키값과 비교하는 단계를 포함할 수 있다.In addition, the step of calculating the monitoring key value of the present invention includes generating a plurality of monitoring key values including the monitoring key value corresponding to the current event count, and comparing the MCU key value with the monitoring key value is the MCU It may include comparing a key value with the plurality of monitoring key values.

또한, 본 발명은 상기 다수의 감시 키값 중 상기 MCU 키값과 동일한 감시 키값이 존재할 경우, 상기 MCU 키값과 동일한 감시 키값에 대응되는 이벤트 카운트 및 상기 현재 이벤트 카운트의 차이를 기초로 상기 MCU의 응답 시간 오차를 계산하는 단계, 상기 응답 시간 오차를 기초로 상기 이벤트 카운트를 보정하거나 상기 MCU에 이벤트 카운트 보정 신호를 전송하는 단계를 더 포함할 수 있다.Also, in the present invention, when a monitoring key value identical to the MCU key value exists among the plurality of monitoring key values, the response time error of the MCU is based on the difference between the event count corresponding to the monitoring key value identical to the MCU key value and the current event count The method may further include calculating , correcting the event count based on the response time error or transmitting an event count correction signal to the MCU.

한편, 이러한 목적을 달성하기 위한 본 발명의 다른 측면은, 에러 카운트를 미리 설정된 값으로 초기화하는 제어부, MCU로부터 시드값 및 이벤트 카운트를 수신하고, 미리 설정된 해시함수 및 상기 시드값과 상기 이벤트 카운트를 사용하여 감시 키값을 산출하는 키값 생성부 및 상기 MCU로부터 수신한 MCU 키값과 상기 감시 키값을 비교하여 상기 MCU의 동작 상태를 판단하는 키값 비교부를 포함하는 MCU 동작 감시 시스템을 제공할 수 있다.On the other hand, another aspect of the present invention for achieving this object is a control unit that initializes the error count to a preset value, receives a seed value and an event count from the MCU, and receives a preset hash function and the seed value and the event count It is possible to provide an MCU operation monitoring system including a key value generator for calculating a monitoring key value using the key value generation unit and a key value comparison unit for determining the operating state of the MCU by comparing the MCU key value received from the MCU with the monitoring key value.

상기 MCU 키값은 상기 미리 설정된 해시함수 및 상기 시드값과 상기 이벤트 카운트를 기초로 상기 MCU에 의해서 산출될 수 있다.The MCU key value may be calculated by the MCU based on the preset hash function, the seed value, and the event count.

또한, 상기 제어부는 상기 MCU 키값과 상기 감시 키값이 동일할 경우, 상기 에러 카운트를 감소시키고 상기 이벤트 카운트를 증가시키고, 상기 MCU 키값과 상기 감시 키값이 동일하지 않을 경우, 상기 에러 카운트를 증가시키고 상기 이벤트 카운트를 증가시킬 수 있다.In addition, when the MCU key value and the monitoring key value are the same, the control unit decrements the error count and increments the event count, and when the MCU key value and the monitoring key value are not the same, increases the error count and the You can increment the event count.

또한, 상기 제어부는 상기 에러 카운트가 미리 설정된 에러 카운트 기준값 이상일 경우 상기 MCU에 문제가 발생한 것으로 판단할 수 있다.Also, when the error count is equal to or greater than a preset error count reference value, the controller may determine that a problem has occurred in the MCU.

또한, 상기 키값 생성부는 현재 이벤트 카운트에 대응되는 감시 키값을 포함하는 다수의 감시 키값을 생성하고, 상기 키값 비교부는 상기 MCU 키값을 상기 다수의 감시 키값과 비교할 수 있다.In addition, the key value generator may generate a plurality of monitoring key values including a monitoring key value corresponding to the current event count, and the key value comparison unit may compare the MCU key value with the plurality of monitoring key values.

또한, 상기 제어부는 상기 다수의 감시 키값 중 상기 MCU 키값과 동일한 감시 키값이 존재할 경우, 상기 MCU 키값과 동일한 감시 키값에 대응되는 이벤트 카운트 및 상기 현재 이벤트 카운트의 차이를 기초로 상기 MCU의 응답 시간 오차를 계산하고, 상기 응답 시간 오차를 기초로 상기 이벤트 카운트를 보정하거나 상기 MCU에 이벤트 카운트 보정 신호를 전송할 수 있다.In addition, when a monitoring key value identical to the MCU key value exists among the plurality of monitoring key values, the control unit is a response time error of the MCU based on a difference between the event count corresponding to the monitoring key value identical to the MCU key value and the current event count , and correcting the event count based on the response time error or transmitting an event count correction signal to the MCU.

전술한 바와 같은 본 발명에 의하면, MCU의 응답에 지연이 생기는 경우, 지연 시간을 측정하여 에러 카운트를 보정함으로써 MCU 감시 동작의 신뢰성을 높일 수 있는 MCU 동작 감시 시스템 및 제어 방법을 제공할 수 있는 장점이 있다.According to the present invention as described above, when there is a delay in the response of the MCU, it is possible to provide an MCU operation monitoring system and control method that can increase the reliability of the MCU monitoring operation by measuring the delay time and correcting the error count. There is this.

또한 본 발명에 의하면, 키값을 전송하는 단방향 통신을 사용함으로써 통신 수단 및 마이크로프로세서의 연산 부담을 줄일 수 있는 MCU 동작 감시 시스템 및 제어 방법을 제공할 수 있는 장점이 있다.In addition, according to the present invention, there is an advantage in that it is possible to provide an MCU operation monitoring system and control method that can reduce the computational burden of the communication means and the microprocessor by using one-way communication for transmitting a key value.

도 1은 질의/응답 방식을 사용하는 기존의 워치독 타이머의 감시 동작 과정을 나타낸 것이다.
도 2는 본 발명의 일 실시예에 따른 MCU 동작 감시 시스템의 구성을 개략적으로 나타낸 블록도이다.
도 3은 본 발명의 일 실시예에 따른 MCU 동작 감시 시스템이 해시함수를 사용하여 MCU 키값 및 감시 키값을 생성하는 과정을 나타낸 것이다.
도 4는 본 발명의 일 실시예에 따른 MCU 동작 감시 시스템이 MCU 키값 및 감시 키값을 비교하는 과정을 나타낸 것이다.
도 5는 본 발명에 따른 MCU 동작 감시 시스템이 MCU 키값을 다수의 감시 키값과 비교하여 이벤트 카운트를 보정하는 과정을 나타낸 것이다.
1 shows a monitoring operation process of a conventional watchdog timer using a question/answer method.
2 is a block diagram schematically showing the configuration of an MCU operation monitoring system according to an embodiment of the present invention.
3 is a diagram illustrating a process in which the MCU operation monitoring system generates an MCU key value and a monitoring key value using a hash function according to an embodiment of the present invention.
4 illustrates a process in which the MCU operation monitoring system compares the MCU key value and the monitoring key value according to an embodiment of the present invention.
5 is a diagram illustrating a process in which the MCU operation monitoring system according to the present invention compares the MCU key value with a plurality of monitoring key values to correct the event count.

전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용된다.The above-described objects, features and advantages will be described below in detail with reference to the accompanying drawings, and accordingly, those of ordinary skill in the art to which the present invention pertains will be able to easily implement the technical idea of the present invention. In describing the present invention, if it is determined that a detailed description of a known technology related to the present invention may unnecessarily obscure the gist of the present invention, the detailed description will be omitted. Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to indicate the same or similar components.

도 2는 본 발명의 일 실시예에 따른 MCU 동작 감시 시스템의 구성을 개략적으로 나타낸 블록도이다.2 is a block diagram schematically showing the configuration of an MCU operation monitoring system according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 일 실시예에 따른 MCU 동작 감시 시스템(2)은 제어부(22), 키값 생성부(24) 및 키값 비교부(26)를 포함한다.Referring to FIG. 2 , the MCU operation monitoring system 2 according to an embodiment of the present invention includes a control unit 22 , a key value generation unit 24 , and a key value comparison unit 26 .

제어부(22)는 에러 카운트를 미리 설정된 값으로 초기화한다.The control unit 22 initializes the error count to a preset value.

본 발명의 MCU 동작 감시 시스템(2)에서 사용되는 에러 카운트는 기존의 워치독 타이머에서 사용되는 에러 카운트와 동일한 역할을 수행한다. 즉, MCU 동작 감시 시스템(2)의 에러 카운트는 MCU로부터 수신한 키값의 비교 판단 결과에 따라 증가되거나 감소된다.The error count used in the MCU operation monitoring system 2 of the present invention performs the same role as the error count used in the existing watchdog timer. That is, the error count of the MCU operation monitoring system 2 is increased or decreased according to the comparison determination result of the key value received from the MCU.

제어부(22)는 에러 카운트가 미리 설정된 에러 카운트 기준값 이상일 경우 MCU에 문제가 발생한 것으로 판단한다.When the error count is equal to or greater than a preset error count reference value, the controller 22 determines that a problem has occurred in the MCU.

본 발명의 일 실시예에서, 제어부(22)는 에러 카운트가 미리 설정된 에러 카운트 기준값 이상이 될 경우 MCU에 문제가 생긴 것으로 판단할 수 있으며, 이때 미리 설정되는 에러 카운트 기준값은 MCU의 종류 및 MCU 동작 방식에 따라 달라질 수 있다.In an embodiment of the present invention, the controller 22 may determine that a problem has occurred in the MCU when the error count becomes greater than or equal to a preset error count reference value. It may vary depending on the method.

제어부(22)는 MCU 키값과 감시 키값이 동일할 경우, 에러 카운트를 감소시키고 이벤트 카운트를 증가시킨다. 반면, 제어부(22)는 MCU 키값과 감시 키값이 동일하지 않을 경우 에러 카운트를 증가시키고 이벤트 카운트를 증가시킨다.When the MCU key value and the monitoring key value are the same, the control unit 22 decreases the error count and increases the event count. On the other hand, when the MCU key value and the monitoring key value are not the same, the control unit 22 increases the error count and increases the event count.

본 발명의 MCU 동작 감시 시스템(2)은 에러 카운트를 증가시키거나 감소시키기 위한 기준으로 MCU 키값과 감시 키값을 사용한다. 즉, 기존의 워치독 타이머가 질의/응답 방식 등을 사용하는 것과 달리, 본 발명의 MCU 동작 감시 시스템(2)은 MCU 및 MCU 동작 감시 시스템(2)이 각자 생성한 키값을 비교하는 방식을 사용한다. 이때 MCU가 MCU 키값을 생성하는 과정 및 MCU 동작 감시 시스템(2)이 감시 키값을 생성하는 과정은 키값 생성부(24) 및 키값 비교부(26)에 대한 설명을 통해 후술한다.The MCU operation monitoring system 2 of the present invention uses the MCU key value and the monitoring key value as a reference for increasing or decreasing the error count. That is, unlike the existing watchdog timer that uses a question/response method, etc., the MCU operation monitoring system 2 of the present invention uses a method of comparing the key values generated by the MCU and the MCU operation monitoring system 2 respectively. do. At this time, a process in which the MCU generates the MCU key value and the process in which the MCU operation monitoring system 2 generates the monitoring key value will be described later with reference to the key value generator 24 and the key value comparison unit 26 .

본 발명의 일 실시예에서, 이벤트 카운트는 MCU에서 MCU 키값을 생성하는 이벤트 및 MCU 동작 감시 시스템(2)이 감시 키값을 생성하는 이벤트의 발생에 따라 증가한다. 이때 MCU 및 MCU 동작 감시 시스템(2)은 독립적으로 이벤트 카운트를 증가시키고 저장한다. MCU 및 MCU 동작 감시 시스템(2)이 각각 증가시킨 이벤트 카운트는 후술할 키값 비교 과정에서 비교의 대상이 되거나 보정의 대상이 될 수 있다.In one embodiment of the present invention, the event count is increased according to the occurrence of an event for generating an MCU key value in the MCU and an event for generating the monitoring key value by the MCU operation monitoring system 2 . At this time, the MCU and the MCU operation monitoring system 2 independently increment and store the event count. The event counts respectively increased by the MCU and the MCU operation monitoring system 2 may be compared or corrected in a key value comparison process to be described later.

키값 생성부(24)는 MCU로부터 시드값 및 이벤트 카운트를 수신하고, 미리 설정된 해시함수 및 시드값과 이벤트 카운트를 사용하여 감시 키값을 산출한다.The key value generator 24 receives the seed value and the event count from the MCU, and calculates the monitoring key value using a preset hash function, the seed value, and the event count.

키값 생성부(24)가 MCU로부터 수신하는 시드값 및 이벤트 카운트는 MCU에서 생성되며, MCU 키값을 생성하는데 사용되는 시드값 및 이벤트 카운트와 동일한 값을 갖는다. 즉, MCU 동작 감시 시스템(2)의 MCU 동작 감시의 시작과 함께 키값 생성부(24)와 MCU의 시드값 및 이벤트 카운트는 동기화된다.The seed value and event count that the key value generator 24 receives from the MCU are generated by the MCU, and have the same values as the seed value and event count used to generate the MCU key value. That is, the seed value and event count of the key value generator 24 and the MCU are synchronized with the start of the MCU operation monitoring of the MCU operation monitoring system 2 .

시드값은 MCU의 MCU 키값 생성 과정과 MCU 동작 감시 시스템(2)의 감시 키값 생성 과정에서 모두 동일하게 사용되므로, MCU는 키값을 생성하고 비교하는 하나의 이벤트가 발생할 때마다 매번 MCU 동작 감시 시스템(2)에 시드값을 전송하지 않아도 된다.Since the seed value is used equally in both the MCU key value generation process and the monitoring key value generation process of the MCU operation monitoring system (2), the MCU generates and compares the key value every time an event occurs, the MCU operation monitoring system ( There is no need to transmit the seed value to 2).

마찬가지로, 후술할 키값 생성 과정에서 사용되는 이벤트 카운트는 MCU와 MCU 동작 감시 시스템(2)에 모두 동일하게 적용된다. 후술할 키값 비교 과정에서 키값의 불일치가 발견될 경우, 제어부(22)는 MCU와 MCU 동작 감시 시스템(2)의 이벤트 카운트 비교를 통해 MCU의 응답 시간의 오차 발생 여부를 판단할 수 있다.Similarly, the event count used in the key value generation process, which will be described later, is equally applied to both the MCU and the MCU operation monitoring system 2 . When a key value discrepancy is found in a key value comparison process to be described later, the control unit 22 may determine whether an error occurs in the response time of the MCU by comparing the event counts between the MCU and the MCU operation monitoring system 2 .

본 발명의 일 실시예에서, 감시 키값 및 MCU 키값은 해시함수를 통해 생성될 수 있다. 즉, MCU가 MCU 키값을 생성하기 위해 사용하는 해시함수와 후술할 키값 생성부(24)가 감시 키값을 생성하기 위해 사용하는 해시함수는 동일한 함수이다. 해시함수는 임의의 데이터를 입력받아 고정된 길이값을 출력하며 같은 입력값에 대해서는 항상 같은 출력값을 산출해 낼 수 있으므로, 동일한 시드값 및 동일한 이벤트 카운트에 대해 항상 동일한 키값을 출력할 수 있다.In an embodiment of the present invention, the monitoring key value and the MCU key value may be generated through a hash function. That is, the hash function used by the MCU to generate the MCU key value and the hash function used by the key value generator 24 to be described later to generate the monitoring key value are the same function. Since the hash function receives arbitrary data and outputs a fixed length value and can always produce the same output value for the same input value, it can always output the same key value for the same seed value and the same event count.

키값 생성부(24)는 현재 이벤트 카운트에 대응되는 감시 키값을 포함하는 다수의 감시 키값을 생성한다.The key value generator 24 generates a plurality of monitoring key values including the monitoring key value corresponding to the current event count.

본 발명의 일 실시예에서, 키값 생성부(24)는 순차적으로 다수의 감시 키값을 생성하고 저장할 수 있다. 즉, 이벤트 카운트의 증가와 함께 순차적으로 생성되는 다수의 감시 키값은 키값 생성부(24)에 저장될 수 있으며, 다수의 감시 키값에 포함된 각각의 감시 키값은 후술할 키값 비교 과정에서 MCU 키값과 비교될 수 있다.In an embodiment of the present invention, the key value generation unit 24 may sequentially generate and store a plurality of monitoring key values. That is, a plurality of monitoring key values sequentially generated with an increase in the event count may be stored in the key value generating unit 24, and each monitoring key value included in the plurality of monitoring key values may be compared with an MCU key value in a key value comparison process to be described later. can be compared.

키값 비교부(26)는 MCU로부터 수신한 MCU 키값과 감시 키값을 비교한다. MCU 키값은 미리 설정된 해시함수 및 시드값과 이벤트 카운트를 기초로 MCU에서 산출된다.The key value comparison unit 26 compares the MCU key value received from the MCU with the monitoring key value. The MCU key value is calculated in the MCU based on a preset hash function, seed value, and event count.

전술한 것과 같이, 시드값 및 이벤트 카운트는 MCU에서 생성되고 키값 생성부(24)로 전달되어 동기화된다. 또한 MCU 키값에 사용되는 해시함수는 MCU 동작 감시 시스템(2)의 키값 생성부(24)에서 사용되는 해시함수와 동일한 함수이다. 따라서 MCU가 정상 동작 할 경우, 동일한 이벤트 카운트에 대해 MCU에서 생성되는 MCU 키값과 키값 생성부(24)에서 생성되는 감시 키값은 동일하다. 이때 제어부(22)는 키값 비교부(26)의 MCU 키값 및 감시 키값을 비교 결과를 기초로 MCU의 동작 상태를 판단할 수 있다.As described above, the seed value and the event count are generated by the MCU and transmitted to the key value generator 24 for synchronization. In addition, the hash function used for the MCU key value is the same function as the hash function used in the key value generator 24 of the MCU operation monitoring system 2 . Therefore, when the MCU operates normally, the MCU key value generated by the MCU for the same event count and the monitoring key value generated by the key value generator 24 are the same. In this case, the control unit 22 may determine the operating state of the MCU based on the result of comparing the MCU key value and the monitoring key value of the key value comparison unit 26 .

이와 같은 키값 비교 동작은 MCU로부터 수신한 MCU 키값과 키값 생성부(24)가 생성한 감시 키값이 모두 동일한 이벤트 카운트를 기초로 생성되었음을 전제로 이루어진다. 즉, 제어부(22)는 동일한 이벤트 카운트를 기초로 생성된 MCU 키값과 감시 키값이 서로 일치하지 않을 경우, MCU의 MCU 키값에 문제가 있는 것으로 판단할 수 있다.This key value comparison operation is performed on the premise that both the MCU key value received from the MCU and the monitoring key value generated by the key value generator 24 are generated based on the same event count. That is, when the MCU key value and the monitoring key value generated based on the same event count do not match, the controller 22 may determine that there is a problem in the MCU key value of the MCU.

키값 비교부(26)는 MCU 키값을 다수의 감시 키값과 비교한다.The key value comparison unit 26 compares the MCU key value with a plurality of monitoring key values.

본 발명의 일 실시예에서 키값 생성부(24)는 순차적으로 다수의 감시 키값을 생성하고 저장할 수 있으며, 키값 비교부(26)는 다수의 감시 키값에 포함된 각각의 감시 키값과 MCU 키값을 비교할 수 있다.In an embodiment of the present invention, the key value generation unit 24 may sequentially generate and store a plurality of monitoring key values, and the key value comparison unit 26 compares each monitoring key value included in the plurality of monitoring key values with the MCU key value. can

전술한 키값 비교 과정은 MCU로부터 수신한 MCU 키값과 키값 생성부(24)가 생성한 감시 키값이 모두 동일한 이벤트 카운트를 기초로 생성되었음을 전제로 이루어지지만, MCU의 응답 시간 지연이 발생할 경우 서로 다른 이벤트 카운트를 기초로 생성된 MCU 키값 및 감시 키값 사이의 비교가 이루어질 수 있다.The above-mentioned key value comparison process is made on the premise that the MCU key value received from the MCU and the monitoring key value generated by the key value generator 24 are both generated based on the same event count, but when the response time delay of the MCU occurs, different events A comparison may be made between the MCU key value generated based on the count and the monitoring key value.

따라서, MCU 키값과 감시 키값이 서로 일치하지 않을 경우 제어부(22)는 에러 카운트 및 이벤트 카운트를 증가시킴과 동시에, MCU의 응답 시간 지연으로 인해 키값 불일치가 발생하였는지 여부를 확인하기 위해 키값 비교부(26)를 통해 다수의 감시 키값과 MCU 키값을 비교할 수 있다.Therefore, when the MCU key value and the monitoring key value do not match each other, the control unit 22 increases the error count and the event count, and at the same time, the key value comparison unit ( 26), multiple monitoring key values and MCU key values can be compared.

제어부(22)는 다수의 감시 키값 중 MCU로부터 수신한 MCU 키값과 동일한 감시 키값이 존재할 경우, MCU 키값과 동일한 감시 키값에 대응되는 이벤트 카운트 및 현재 이벤트 카운트의 차이를 기초로 MCU의 응답 시간 오차를 계산한다.When there is a monitoring key value identical to the MCU key value received from the MCU among the plurality of monitoring key values, the control unit 22 determines the response time error of the MCU based on the difference between the event count and the current event count corresponding to the same monitoring key value as the MCU key value. Calculate.

제어부(22)는 응답 시간 오차를 기초로, 이벤트 카운트를 보정하거나 MCU에 이벤트 카운트 보정 신호를 전송한다. 이와 같은 이벤트 카운트 보정 과정은 도 5를 통해 상세히 후술한다.The control unit 22 corrects the event count or transmits an event count correction signal to the MCU based on the response time error. Such an event count correction process will be described later in detail with reference to FIG. 5 .

도 2에 도시되지 않았으나, 본 발명의 일 실시예에 따른 MCU 동작 감시 시스템(2)은 MCU 키값을 수신하기 위한 통신부를 더 포함할 수 있다. 즉, MCU 동작 감시 시스템(2)은 MCU로 질의 등을 송신할 필요 없이 단방향 통신을 통해 MCU로부터 MCU 키값을 수신하여 MCU의 동작 감시를 수행할 수 있으므로, 통신 수단의 연산 부담을 줄일 수 있는 효과를 갖는다.Although not shown in FIG. 2 , the MCU operation monitoring system 2 according to an embodiment of the present invention may further include a communication unit for receiving the MCU key value. That is, the MCU operation monitoring system 2 can receive the MCU key value from the MCU through one-way communication without the need to transmit a query to the MCU and perform operation monitoring of the MCU, thereby reducing the computational burden of the communication means. has

이하에서는 도 3 내지 도 5를 통해 본 발명의 MCU 동작 감시 시스템의 동작 과정을 상세히 설명한다.Hereinafter, an operation process of the MCU operation monitoring system of the present invention will be described in detail with reference to FIGS. 3 to 5 .

도 3은 본 발명의 일 실시예에 따른 MCU 동작 감시 시스템이 해시함수를 사용하여 MCU 키값 및 감시 키값을 생성하는 과정을 나타낸 것이다.3 is a diagram illustrating a process in which the MCU operation monitoring system generates an MCU key value and a monitoring key value using a hash function according to an embodiment of the present invention.

도 3을 참조하면, MCU 동작 감시 시스템은 제어부를 통해 에러 카운트를 미리 설정된 값으로 초기화한다(301).Referring to FIG. 3 , the MCU operation monitoring system initializes the error count to a preset value through the control unit ( 301 ).

본 발명의 MCU 동작 감시 시스템(2)에서 사용되는 에러 카운트는 기존의 워치독 타이머에서 사용되는 에러 카운트와 동일한 역할을 수행한다. 즉, MCU 동작 감시 시스템(2)의 에러 카운트는 MCU(3)로부터 수신한 키값의 비교 판단 결과에 따라 증가되거나 감소되며, 제어부는 에러 카운트가 미리 설정된 에러 카운트 기준값 이상이 될 경우 MCU(3)에 문제가 생긴 것으로 판단할 수 있다.The error count used in the MCU operation monitoring system 2 of the present invention performs the same role as the error count used in the existing watchdog timer. That is, the error count of the MCU operation monitoring system 2 is increased or decreased according to the comparison determination result of the key value received from the MCU 3 , and the controller controls the MCU 3 when the error count is greater than or equal to a preset error count reference value. It can be concluded that there is a problem in

본 발명의 일 실시예에서, 에러 카운트는 0이 아닌 수로 초기화 될 수 있다. 즉, 키값 비교 과정에서 키값의 불일치가 발견될 경우 에러 카운트는 감소되나, 키값의 일치가 발견될 경우 에러 카운트는 증가될 수 있다. 이와 같은 에러 카운트의 초기화에 사용되는 초기값은 감시 대상이 되는 MCU(3)의 종류 등에 따라 다르게 설정될 수 있다.In one embodiment of the present invention, the error count may be initialized to a non-zero number. That is, when a key value mismatch is found in the key value comparison process, the error count is decreased, but when a key value match is found, the error count can be increased. The initial value used to initialize the error count may be set differently depending on the type of the MCU 3 to be monitored.

다음으로, MCU 동작 감시 시스템(2)의 키값 생성부는 MCU(3)로부터 시드값 및 이벤트 카운트를 수신한다(303). 이때 키값 생성부는 수신한 MCU(3)의 시드값 및 이벤트 카운트를 키값 생성부의 시드값 및 이벤트 카운트로 설정한다(304).Next, the key value generator of the MCU operation monitoring system 2 receives the seed value and the event count from the MCU 3 (303). At this time, the key value generator sets the received seed value and event count of the MCU 3 as the seed value and event count of the key value generator ( 304 ).

전술한 것과 같이, MCU(3)는 MCU 키값을 생성하기 위한 시드값 및 이벤트 카운트를 설정하고(302), 설정된 시드값 및 이벤트 카운트값을 키값 생성부에게 전송한다. 즉, 키값 생성부가 MCU(3)로부터 수신하는 시드값 및 이벤트 카운트는 MCU(3)에서 생성되며, MCU 키값을 생성하는데 사용되는 시드값 및 이벤트 카운트와 동일한 값을 갖는다.As described above, the MCU 3 sets a seed value and an event count for generating an MCU key value ( 302 ), and transmits the set seed value and event count value to the key value generator. That is, the seed value and the event count that the key value generator receives from the MCU 3 are generated by the MCU 3 and have the same values as the seed value and the event count used to generate the MCU key value.

결국, MCU(3)와 MCU 동작 감시 시스템(2)의 키값 생성 과정에서 모두 동일한 시드값이 사용되므로, MCU(3)는 키값을 비교하는 하나의 이벤트가 발생할 때마다 MCU 동작 감시 시스템(2)에 시드값을 전송하지 않아도 된다.After all, since the same seed value is used in both the key value generation process of the MCU (3) and the MCU operation monitoring system (2), the MCU (3) generates an event that compares the key values in the MCU operation monitoring system (2) There is no need to send the seed value to

결국 본 발명의 MCU 동작 감시 시스템은 MCU로 질의 등을 송신할 필요 없이 단방향 통신을 통해 MCU로부터 MCU 키값을 수신하여 MCU의 동작 감시를 수행할 수 있으므로, 통신 수단의 연산 부담을 줄일 수 있는 효과를 갖는다.As a result, the MCU operation monitoring system of the present invention can perform operation monitoring of the MCU by receiving the MCU key value from the MCU through one-way communication without the need to send a query to the MCU, thereby reducing the computational burden of the communication means. have

마찬가지로, 후술할 키값 생성 과정에서 사용되는 이벤트 카운트는 MCU와 MCU 동작 감시 시스템(2)에 모두 동일하게 적용된다. 후술할 키값 비교 과정에서 키값의 불일치가 발견될 경우, 제어부는 MCU와 MCU 동작 감시 시스템(2)의 이벤트 카운트 비교를 통해 MCU의 응답 시간의 오차 발생 여부를 판단할 수 있다.Similarly, the event count used in the key value generation process, which will be described later, is equally applied to both the MCU and the MCU operation monitoring system 2 . When a key value discrepancy is found in a key value comparison process, which will be described later, the control unit may determine whether an error occurs in the response time of the MCU by comparing the event counts between the MCU and the MCU operation monitoring system 2 .

이후, MCU 동작 감시 시스템(2)의 키값 생성부는 미리 설정된 해시함수 및 시드값과 이벤트 카운트를 사용하여 감시 키값을 산출한다(306).Thereafter, the key value generator of the MCU operation monitoring system 2 calculates a monitoring key value using a preset hash function, a seed value, and an event count ( 306 ).

본 발명의 일 실시예에서, 감시 키값 및 MCU 키값은 해시함수를 통해 생성될 수 있다. 즉, MCU가 MCU 키값을 생성하기 위해 사용하는 해시함수와 키값 생성부가 감시 키값을 생성하기 위해 사용하는 해시함수는 동일한 함수이다. 해시함수는 임의의 데이터를 입력받아 고정된 길이값을 출력하며 같은 입력값에 대해서는 항상 같은 출력값을 산출해 낼 수 있으므로, 동일한 시드값 및 동일한 이벤트 카운트에 대해 항상 동일한 키값을 출력할 수 있다.In an embodiment of the present invention, the monitoring key value and the MCU key value may be generated through a hash function. That is, the hash function used by the MCU to generate the MCU key value and the hash function used by the key value generator to generate the monitoring key value are the same function. Since the hash function receives arbitrary data and outputs a fixed length value and can always produce the same output value for the same input value, it can always output the same key value for the same seed value and the same event count.

본 발명의 일 실시예에서 감시 키값은 하기 [수학식 1]과 같이 산출될 수 있다.In an embodiment of the present invention, the monitoring key value may be calculated as in [Equation 1] below.

[수학식 1][Equation 1]

감시 키값 = f(시드값 + 이벤트 카운트)Watch key value = f (seed value + event count)

[수학식 1]에서 f는 해시함수를 의미한다. [수학식 1]을 참조하면, 감시 키값은 해시함수에 시드값 및 이벤트 카운트를 대입하여 얻어진다. 즉, 각 시드값 및 이벤트 카운트에 의해 얻어지는 감시 키값은 해시함수의 해시값에 해당한다. 따라서 키값 생성부는 동일한 시드값 및 이벤트 카운트값에 대해 항상 동일한 감시 키값을 산출할 수 있다.In [Equation 1], f means a hash function. Referring to [Equation 1], the monitoring key value is obtained by substituting the seed value and the event count into the hash function. That is, the monitoring key value obtained by each seed value and the event count corresponds to the hash value of the hash function. Therefore, the key value generator can always calculate the same monitoring key value for the same seed value and event count value.

다음으로, MCU 동작 감시 시스템(2)의 키값 비교부는 MCU(3)로부터 시드값 및 이벤트 카운트에 대응되는 MCU 키값을 수신한다(308).Next, the key value comparison unit of the MCU operation monitoring system 2 receives the MCU key value corresponding to the seed value and the event count from the MCU 3 ( 308 ).

다시 도 3을 참조하면, MCU(3)는 키값 생성부에서 사용된 시드값 및 이벤트 카운트와 동일한 시드값 및 이벤트 카운트를 사용하여 MCU 키값을 산출한다(305). 이때 MCU 키값에 사용되는 해시함수 또한 MCU 동작 감시 시스템(2)의 키값 생성부에서 사용되는 해시함수와 동일한 함수이다. 따라서 MCU(3)가 정상 동작 할 경우, 동일한 이벤트 카운트에 대해 MCU(3)에서 생성되는 MCU 키값과 키값 생성부에서 생성되는 감시 키값은 동일하다.Referring back to FIG. 3 , the MCU 3 calculates the MCU key value using the same seed value and event count as the seed value and event count used in the key value generator ( 305 ). At this time, the hash function used for the MCU key value is also the same function as the hash function used in the key value generator of the MCU operation monitoring system 2 . Therefore, when the MCU 3 operates normally, the MCU key value generated by the MCU 3 and the monitoring key value generated by the key value generator for the same event count are the same.

마지막으로, MCU 동작 감시 시스템(2)은 키값 비교부를 통해 MCU(3)로부터 수신한 MCU 키값과 감시 키값을 비교한다(307).Finally, the MCU operation monitoring system 2 compares the MCU key value received from the MCU 3 through the key value comparison unit and the monitoring key value ( 307 ).

도 4는 본 발명의 일 실시예에 따른 MCU 동작 감시 시스템이 MCU 키값 및 감시 키값을 비교하는 과정을 나타낸 것이다.4 is a diagram illustrating a process in which the MCU operation monitoring system compares the MCU key value and the monitoring key value according to an embodiment of the present invention.

도 4를 참조하면, 본 발명의 MCU 동작 감시 시스템의 제어부는 MCU 키값과 감시 키값을 비교한다(401). 본 발명의 MCU 동작 감시 시스템은 에러 카운트를 증가시키거나 감소시키기 위한 기준으로 MCU 키값과 감시 키값을 사용한다. 즉, 기존의 워치독 타이머가 질의/응답 방식 등을 사용하는 것과 달리, 본 발명의 MCU 동작 감시 시스템은 MCU 및 MCU 동작 감시 시스템이 각자 생성한 키값을 비교하는 방식을 사용한다.4, the control unit of the MCU operation monitoring system of the present invention compares the MCU key value and the monitoring key value (401). The MCU operation monitoring system of the present invention uses the MCU key value and the monitoring key value as a reference for increasing or decreasing the error count. That is, unlike the conventional watchdog timer that uses a query/response method, etc., the MCU operation monitoring system of the present invention uses a method of comparing the key values generated by the MCU and the MCU operation monitoring system respectively.

본 발명의 MCU 동작 감시 시스템은 미리 설정된 동일한 해시함수를 사용하여 키값을 생성하며, 이러한 해시함수는 MCU가 MCU 키값을 생성하는데 동일하게 사용된다. 따라서 본 발명의 MCU 동작 감시 시스템은 질의를 전송하고 응답을 수신하는 과정을 반복하지 않고, 단방향 통신 수단을 통해 MCU 키값을 수신하여 비교 동작을 수행할 수 있는 장점이 있다.The MCU operation monitoring system of the present invention generates a key value using the same preset hash function, and this hash function is equally used for the MCU to generate the MCU key value. Therefore, the MCU operation monitoring system of the present invention has the advantage of being able to perform a comparison operation by receiving the MCU key value through a one-way communication means without repeating the process of transmitting a query and receiving a response.

비교(401) 결과, MCU 키값과 감시 키값이 동일할 경우 제어부는 에러 카운트를 감소시키고 이벤트 카운트를 증가시킨다(402).As a result of the comparison (401), when the MCU key value and the monitoring key value are the same, the control unit decreases the error count and increases the event count (402).

반면, 비교(401) 결과 MCU 키값과 감시 키값이 동일하지 않을 경우, 제어부는 에러 카운트를 증가시키고 이벤트 카운트를 증가시킨다(403).On the other hand, when the comparison 401 result is not the same as the MCU key value and the monitoring key value, the control unit increases the error count and increases the event count ( 403 ).

본 발명의 일 실시예에서, 이벤트 카운트는 MCU에서 MCU 동작 감시 시스템으로 키값을 전송하는 이벤트의 발생에 따라 증가한다. 이때 MCU 및 MCU 동작 감시 시스템은 각각 이벤트 카운트를 저장하고 증가시킨다. MCU 및 MCU 동작 감시 시스템이 각각 증가시킨 이벤트 카운트는 이후의 키값 비교 과정에서 비교의 대상이 되거나 보정의 대상이 될 수 있다.In one embodiment of the present invention, the event count is increased according to the occurrence of an event that transmits a key value from the MCU to the MCU operation monitoring system. At this time, the MCU and the MCU operation monitoring system store and increment the event count, respectively. The event counts respectively increased by the MCU and the MCU operation monitoring system may be compared or corrected in a subsequent key value comparison process.

다음으로, 제어부는 에러 카운트가 미리 설정된 에러 카운트 기준값 이상인지 여부를 확인한다(404).Next, the controller determines whether the error count is equal to or greater than a preset error count reference value ( 404 ).

확인(404) 결과, 에러 카운트가 미리 설정된 에러 카운트 기준값 이상일 경우 제어부는 MCU에 문제가 발생한 것으로 판단할 수 있다(405).As a result of the check 404 , when the error count is equal to or greater than a preset error count reference value, the controller may determine that a problem has occurred in the MCU ( 405 ).

반면, 확인(404) 결과 에러 카운트가 미리 설정된 에러 카운트 기준값 이상이 아닐 경우, 제어부는 계속해서 MCU 키값과 감시 키값을 비교한다.On the other hand, when the error count as a result of the check 404 is not equal to or greater than the preset error count reference value, the control unit continuously compares the MCU key value and the monitoring key value.

도 5는 본 발명에 따른 MCU 동작 감시 시스템이 MCU 키값을 다수의 감시 키값과 비교하여 이벤트 카운트를 보정하는 과정을 나타낸 것이다.5 shows a process in which the MCU operation monitoring system according to the present invention compares the MCU key value with a plurality of monitoring key values to correct the event count.

도 5를 참조하면, 키값 생성부는 현재 이벤트 카운트에 대응되는 감시 키값을 포함하는 다수의 감시 키값(52)을 생성한다. 본 발명의 일 실시예에서 키값 생성부는 현재 이벤트 카운트를 기준으로 현재 이벤트 카운트 이전의 이벤트 카운트에 대응되는 감시 키값과, 현재 이벤트 카운트 이후의 이벤트 카운트에 대응되는 감시 키값을 생성할 수 있다. 예를 들어 도 5에 도시된 다수의 감시 키값(52)을 참조하면, 현재 이벤트 카운트(n), 현재 이벤트 카운트 이전의 이벤트 카운트(n-3, n-2, n-1), 현재 이벤트 카운트 이후의 이벤트 카운트(n+1, n+2, n+3)에 각각 대응되는 감시 키값들, 즉 F, C, G, W, Z, I 및 J가 순차적으로 나열되어 있다.Referring to FIG. 5 , the key value generator generates a plurality of monitoring key values 52 including monitoring key values corresponding to the current event count. In an embodiment of the present invention, the key value generator may generate a monitoring key value corresponding to the event count before the current event count and a monitoring key value corresponding to the event count after the current event count based on the current event count. For example, referring to the plurality of monitoring key values 52 shown in FIG. 5 , the current event count (n), the event count before the current event count (n-3, n-2, n-1), and the current event count The monitoring key values corresponding to the subsequent event counts (n+1, n+2, n+3), that is, F, C, G, W, Z, I, and J are sequentially listed.

본 발명의 일 실시예에서, 키값 생성부는 순차적으로 다수의 감시 키값(52)을 생성하고 저장할 수 있다. 즉, 이벤트 카운트의 증가와 함께 순차적으로 생성되는 다수의 감시 키값은 키값 생성부에 저장되고 관리될 수 있으며, 각각의 감시 키값은 후술할 키값 비교 과정에서 MCU 키값(53)과 비교될 수 있다. 도 5를 참조하면, MCU(3)가 생성한 MCU 키값(53)은 이벤트 카운트 m에 대해 C의 키값을 갖는다. MCU 동작 감시 시스템(2)의 키값 비교부는 MCU(3)로부터 MCU 키값(53)을 수신한다(504).In an embodiment of the present invention, the key value generator may sequentially generate and store a plurality of monitoring key values 52 . That is, a plurality of monitoring key values sequentially generated with an increase in the event count may be stored and managed by the key value generator, and each monitoring key value may be compared with the MCU key value 53 in a key value comparison process to be described later. Referring to FIG. 5 , the MCU key value 53 generated by the MCU 3 has a key value of C for the event count m. The key value comparison unit of the MCU operation monitoring system 2 receives the MCU key value 53 from the MCU 3 ( 504 ).

다음으로, 키값 비교부는 MCU 키값(53)과 다수의 감시 키값(52)을 비교한다(505).Next, the key value comparison unit compares the MCU key value 53 and the plurality of monitoring key values 52 ( 505 ).

전술한 것과 같이, 본 발명의 MCU 키값(53)은 MCU(3)에서 생성되며 시드값 및 이벤트 카운트는 MCU(3)에서 생성되고 키값 생성부로 전달되어 동기화된다. 또한 MCU 키값의 생성에 사용되는 해시함수는 MCU 동작 감시 시스템(2)의 키값 생성부에서 사용되는 해시함수와 동일한 함수이다. 따라서 MCU(3)가 정상 동작 할 경우, 동일한 이벤트 카운트에 대해 MCU(3)에서 생성되는 MCU 키값과 키값 생성부에서 생성되는 감시 키값은 동일하다. 이때 제어부는 키값 비교부의 MCU 키값 및 감시 키값을 비교 결과를 통해 MCU(3)의 동작 상태를 판단할 수 있다.As described above, the MCU key value 53 of the present invention is generated in the MCU 3 , and the seed value and event count are generated in the MCU 3 and transmitted to the key value generator for synchronization. In addition, the hash function used to generate the MCU key value is the same function as the hash function used in the key value generation unit of the MCU operation monitoring system 2 . Therefore, when the MCU 3 operates normally, the MCU key value generated by the MCU 3 and the monitoring key value generated by the key value generator for the same event count are the same. In this case, the control unit may determine the operating state of the MCU 3 through the comparison result of the MCU key value and the monitoring key value of the key value comparison unit.

이와 같은 키값 비교 동작은 MCU(3)로부터 수신한 MCU 키값과 키값 생성부가 생성한 감시 키값이 모두 동일한 이벤트 카운트를 기초로 생성되었음을 전제로 이루어진다. 즉, 제어부는 동일한 이벤트 카운트를 기초로 생성된 MCU 키값과 감시 키값이 서로 일치하지 않을 경우, MCU(3)의 MCU 키값에 문제가 있는 것으로 판단할 수 있다.This key value comparison operation is performed on the premise that both the MCU key value received from the MCU 3 and the monitoring key value generated by the key value generator are generated based on the same event count. That is, when the MCU key value generated based on the same event count and the monitoring key value do not match, the controller may determine that there is a problem in the MCU key value of the MCU 3 .

다시 도 5를 참조하면, MCU(3)로부터 수신한 MCU 키값 C와 현재 이벤트 카운트 n에 대응하는 감시 키값 W은 일치하지 않는다. 키값 비교부가 MCU 키값과 감시 키값의 불일치함을 확인할 경우, 제어부는 MCU 키값 C를 생성하는데 사용된 이벤트 카운트와 감시 키값 W를 생성하는데 사용된 이벤트 카운트가 서로 다른 이벤트 카운트인지 여부를 확인한다. 즉, 제어부는 키값 비교부를 통해 MCU 키값(53)과 다수의 감시 키값(52)에 포함된 나머지 감시 키값을 비교하여 이벤트 카운트의 일치 여부를 확인한다.Referring back to FIG. 5 , the MCU key value C received from the MCU 3 and the monitoring key value W corresponding to the current event count n do not match. When the key value comparison unit determines that the MCU key value and the monitoring key value do not match, the control unit checks whether the event count used to generate the MCU key value C and the event count used to generate the monitoring key value W are different event counts. That is, the control unit compares the MCU key value 53 with the remaining monitoring key values included in the plurality of monitoring key values 52 through the key value comparison unit to check whether the event counts match.

예를 들어, 도 5에 도시된 것과 같이 다수의 감시 키값(52)에 포함된 감시 키값 중 이벤트 카운트 n-2에 대응하는 감시 키값 C는 MCU(3)가 생성한 MCU 키값 C와 동일하다. 즉, 키값 비교부는 MCU 키값 C를 생성하는데 사용된 MCU의 이벤트 카운트 m과 감시 키값 W를 생성하는데 사용된 키값 생성부의 현재 이벤트 카운트 n이 서로 다른 이벤트 카운트임을 확인할 수 있다. 또한 키값 비교부는 MCU 키값 C를 생성하는데 사용된 MCU의 이벤트 카운트 m이 감시 키값 C를 생성하는데 사용된 키값 생성부의 이벤트 카운트 n-2와 동일한 이벤트 카운트임을 확인할 수 있다.For example, as shown in FIG. 5 , the monitoring key value C corresponding to the event count n-2 among the monitoring key values included in the plurality of monitoring key values 52 is the same as the MCU key value C generated by the MCU 3 . That is, the key value comparison unit may confirm that the event count m of the MCU used to generate the MCU key value C and the current event count n of the key value generation unit used to generate the monitoring key value W are different event counts. In addition, the key value comparison unit may confirm that the event count m of the MCU used to generate the MCU key value C is the same event count as the event count n-2 of the key value generation unit used to generate the monitoring key value C.

이처럼 다수의 감시 키값(52)에 포함된 감시 키값 중 MCU(3)로부터 수신한 MCU 키값(53)과 동일한 감시 키값이 존재할 경우, 제어부는 MCU 키값(53)과 동일한 감시 키값에 대응되는 이벤트 카운트 및 현재 이벤트 카운트의 차이를 기초로 MCU(3)의 응답 시간 오차를 계산한다(506).As such, when the same monitoring key value as the MCU key value 53 received from the MCU 3 exists among the monitoring key values included in the plurality of monitoring key values 52 , the control unit counts the event corresponding to the monitoring key value identical to the MCU key value 53 . and calculating a response time error of the MCU 3 based on the difference between the current event counts ( 506 ).

다시 도 5를 참조하면, MCU(3)로부터 수신한 MCU 키값 C와 다수의 감시 키값(52)에 포함된 감시 키값 중 이벤트 카운트 n-2에 대응되는 감시 키값 C가 동일하므로, 제어부는 감시 키값 C에 대응되는 이벤트 카운트 n-2와 현재 이벤트 카운트 n의 차이인 2를 기초로 MCU(3)의 응답 시간 오차를 계산할 수 있다. 즉, 제어부는 키값이 2번 카운트되는데 소요되는 시간만큼 MCU(3)의 응답 시간이 지연된 것으로 판단할 수 있다.Referring back to FIG. 5 , since the MCU key value C received from the MCU 3 and the monitoring key value C corresponding to the event count n-2 among the monitoring key values included in the plurality of monitoring key values 52 are the same, the control unit controls the monitoring key value The response time error of the MCU 3 may be calculated based on 2, which is the difference between the event count n-2 corresponding to C and the current event count n. That is, the controller may determine that the response time of the MCU 3 is delayed by the time it takes for the key value to be counted twice.

본 발명의 일 실시예에서, 제어부는 응답 시간 오차의 계산을 기초로 키값 생성부의 이벤트 카운트를 자체 보정하거나(507), MCU(3)에 이벤트 카운트 보정 신호를 전송하여 MCU의 이벤트 카운트를 보정할 수 있다(508).In one embodiment of the present invention, the control unit self-corrects the event count of the key value generator based on the calculation of the response time error (507), or transmits an event count correction signal to the MCU 3 to correct the event count of the MCU. may (508).

즉, 본 발명의 MCU 동작 감시 시스템은 MCU의 응답에 지연으로 인한 키값 불일치가 발생하는 경우 키값 비교를 통해 응답 지연 발생 여부를 확인할 수 있으며, 다수의 감시 키값을 사용하여 MCU의 응답 시간 오차를 계산하고 MCU의 이벤트 카운트 또는 MCU 동작 감시 시스템 자체의 이벤트 카운트를 보정할 수 있다.That is, the MCU operation monitoring system of the present invention can check whether a response delay occurs through key value comparison when a key value mismatch due to delay occurs in the response of the MCU, and calculates the response time error of the MCU using a plurality of monitoring key values and calibrate the event count of the MCU or the event count of the MCU operation monitoring system itself.

이와 같은 보정을 통해 MCU 및 MCU 동작 감시 시스템의 이벤트 카운트는 다시 동기화 될 수 있으므로, MCU 동작 감시 시스템은 MCU의 응답 시간 지연 발생으로 인한 키값 불일치가 지속되는 것을 방지할 수 있다.Through this correction, the event counts of the MCU and the MCU operation monitoring system can be synchronized again, so the MCU operation monitoring system can prevent the key value mismatch caused by the response time delay of the MCU from continuing.

따라서, 본 발명의 MCU 동작 감시 시스템은 오실레이터의 이상 또는 마이크로프로세서 등의 이상으로 인해 MCU의 응답에 불규칙적인 시간 지연이 발생할 경우, 이벤트 카운트를 보정함으로써 잘못된 에러 카운트가 누적되어 에러 카운트의 오차로 인해 시스템이 리셋되는 현상이 발생하는 것을 방지할 수 있다.Therefore, in the MCU operation monitoring system of the present invention, when an irregular time delay occurs in the response of the MCU due to an error in the oscillator or an error in the microprocessor, an incorrect error count is accumulated by correcting the event count, It is possible to prevent the phenomenon of system reset from occurring.

마찬가지로, 본 발명의 MCU 동작 감시 시스템은 에러 카운트를 보정함으로써 에러 카운트가 일시적으로 증가 및 감소되어 MCU의 에러 자체가 판별되지 않는 현상이 발생하는 것을 방지할 수 있다.Similarly, the MCU operation monitoring system of the present invention can prevent a phenomenon in which the error count of the MCU is not determined because the error count is temporarily increased and decreased by correcting the error count.

전술한 본 발명은, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하므로 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니다.For those of ordinary skill in the art to which the present invention pertains, various substitutions, modifications and changes are possible within the scope of the present invention without departing from the technical spirit of the present invention. is not limited by

Claims (1)

에러 카운트를 미리 설정된 값으로 초기화하는 단계;
MCU로부터 시드값 및 이벤트 카운트를 수신하는 단계;
미리 설정된 해시함수 및 상기 시드값과 상기 이벤트 카운트를 사용하여 감시 키값을 산출하는 단계;
상기 MCU로부터 상기 시드값 및 상기 이벤트 카운트에 대응되는 MCU 키값을 수신하는 단계; 및
상기 MCU로부터 수신한 MCU 키값과 상기 감시 키값을 비교하여 상기 MCU의 동작 상태를 판단하는 단계를 포함하는 MCU 동작 감시 방법.
initializing the error count to a preset value;
receiving a seed value and an event count from the MCU;
calculating a monitoring key value using a preset hash function, the seed value, and the event count;
receiving an MCU key value corresponding to the seed value and the event count from the MCU; and
and determining an operation state of the MCU by comparing the MCU key value received from the MCU with the monitoring key value.
KR1020200081999A 2020-07-03 2020-07-03 Mcu operation monitoring method and system thereof KR20220004317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200081999A KR20220004317A (en) 2020-07-03 2020-07-03 Mcu operation monitoring method and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200081999A KR20220004317A (en) 2020-07-03 2020-07-03 Mcu operation monitoring method and system thereof

Publications (1)

Publication Number Publication Date
KR20220004317A true KR20220004317A (en) 2022-01-11

Family

ID=79355672

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200081999A KR20220004317A (en) 2020-07-03 2020-07-03 Mcu operation monitoring method and system thereof

Country Status (1)

Country Link
KR (1) KR20220004317A (en)

Similar Documents

Publication Publication Date Title
EP2490357B1 (en) A method of time synchronization of free running nodes in an avionics network
US6199169B1 (en) System and method for synchronizing time across a computer cluster
AU2006200299B2 (en) Synchronization of multiple operational flight programs
US8949648B2 (en) System and method to overcome wander accumulation to achieve precision clock distribution over large networks
US7551702B2 (en) Method and circuit arrangement for synchronizing a function unit with a predetermined clock frequency
US20160087738A1 (en) Time synchronization slave apparatus capable of adjusting time synchronization period, and method of determining time synchronization period
US11303376B2 (en) Information processing apparatus and time synchronization method
EP1228412B1 (en) System and method for fault-tolerant clock synchronization using interactive convergence
CN106059697B (en) Method for time synchronization
JPH04363926A (en) Circuit and method for detecting digital data
US10771229B2 (en) Synchronizing method and system
US20200267046A1 (en) Method for synchronizing a set of devices, associated computer program and synchronization system
KR20220004317A (en) Mcu operation monitoring method and system thereof
KR101988723B1 (en) Mcu operation monitoring system and controlling method thereof
US5295257A (en) Distributed multiple clock system and a method for the synchronization of a distributed multiple system
US7359367B2 (en) Device for preventing erroneous synchronization in wireless communication apparatus
US6915471B2 (en) Encoder and method for encoding data
US10313374B2 (en) Electronic apparatus and method
Puhm et al. Synchronizing an ieee 1588 slave clock over both paths of a redundant ethernet system
KR102129617B1 (en) Control apparatus for Distributed Control System with protection ability for impersonation attack and error of clock synchronization and clock synchronization method thereof
US20070165760A1 (en) Apparatus and method for checking network synchronization clock signal in communication system
US20030079054A1 (en) Time synchronisation system and method
JP6780493B2 (en) Dependent synchronization circuit
US20050172167A1 (en) Communication fault containment via indirect detection
CN115622654B (en) Clock synchronization method, root node, child node and daisy chain chip system

Legal Events

Date Code Title Description
WITB Written withdrawal of application