KR102451821B1 - Bidirectional microcomputer monitoring method - Google Patents
Bidirectional microcomputer monitoring method Download PDFInfo
- Publication number
- KR102451821B1 KR102451821B1 KR1020200174598A KR20200174598A KR102451821B1 KR 102451821 B1 KR102451821 B1 KR 102451821B1 KR 1020200174598 A KR1020200174598 A KR 1020200174598A KR 20200174598 A KR20200174598 A KR 20200174598A KR 102451821 B1 KR102451821 B1 KR 102451821B1
- Authority
- KR
- South Korea
- Prior art keywords
- microcomputer
- task
- monitoring
- state
- period
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/2236—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
- G06F11/27—Built-in tests
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
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)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Debugging And Monitoring (AREA)
- Microcomputers (AREA)
Abstract
양방향 마이컴 모니터링 방법이 개시된다. 본 발명의 양방향 마이컴 모니터링 방법은 제1 마이컴이 MC 태스크(Monitoring Controller Task, MC Task)를 수행하고 제2 마이컴이 MU 태스크(Monotoring Unit Task, MU Task)를 수행하는 단계; 제2 마이컴이 제1 마이컴의 MC 태스크 수행 주기를 모니터링하여 모니터링 결과에 따라 제2 마이컴의 MC 태스크 수행 시점에 대한 옵셋값을 산출하는 단계; 및 제2 마이컴이 옵셋값에 따라 MC 태스크를 수행하는 단계를 포함하는 것을 특징으로 한다.A two-way microcomputer monitoring method is disclosed. The two-way microcomputer monitoring method of the present invention comprises the steps of: a first microcomputer performing an MC task (Monitoring Controller Task, MC Task) and a second microcomputer performing an MU task (Monitoring Unit Task, MU Task); calculating, by the second microcomputer, an MC task execution period of the first microcomputer, and calculating an offset value for the MC task execution time of the second microcomputer according to the monitoring result; and performing, by the second microcomputer, the MC task according to the offset value.
Description
본 발명은 양방향 마이컴 모니터링 방법에 관한 것으로서, 더욱 상세하게는 2개의 마이컴이 서로 간에 모니터링을 수행하는 양방향 마이컴 모니터링 방법에 관한 것이다. The present invention relates to a two-way microcomputer monitoring method, and more particularly, to a two-way microcomputer monitoring method in which two microcomputers monitor each other.
일반적으로, 전자기기는 다수 개의 마이컴을 구비한다. 각각의 마이컴은 이상 상태를 모니터링하여 리셋을 수행하여 시스템을 초기화한다. 모니터링 방식에는 독립된 2개의 마이컴 중 어느 하나가 다른 하나의 마이컴을 모니터링하는 단방향 모니터링 방식 및 독립된 2개의 마이컴이 상호 모니터링하는 양방향 모니터링 방식이 있다. In general, an electronic device includes a plurality of microcomputers. Each microcomputer initializes the system by performing a reset by monitoring an abnormal state. The monitoring method includes a one-way monitoring method in which one of two independent microcomputers monitors the other microcomputer and a two-way monitoring method in which two independent microcomputers monitor each other.
단방향 모니터링 방식은 모니터링 마이컴의 이상 유무에 대한 판단을 할 수 없다. 이를 개선하기 위해 양방향 모니터링이 도입되었다. The unidirectional monitoring method cannot determine whether the monitoring microcomputer is abnormal. To improve this, two-way monitoring was introduced.
그러나, 종래의 양방향 모니터링 방식의 경우 2세트의 SPI 채널(Serial Peripheral Interface Channel)과 하드웨어 핀(디지털 핀)을 필요로 한다. 따라서, 양방향 모니터링 방식은 하드웨어 자원이 제한적이거나 이미 하드웨어가 결정된 상황에서는 적용하기가 어렵다. However, in the case of the conventional bidirectional monitoring method, two sets of SPI channels (Serial Peripheral Interface Channel) and hardware pins (digital pins) are required. Therefore, the bidirectional monitoring method is difficult to apply in a situation in which hardware resources are limited or hardware has already been determined.
또한 종래의 양방향 모니터링의 경우 단순 태스크 흐름과 연산에 관한 모니터링만 진행하기 때문에 모든 기능 안전 요구 사항을 만족시키지 못할 수도 있다. In addition, in the case of the conventional bidirectional monitoring, it may not satisfy all functional safety requirements because only monitoring of simple task flow and operation is performed.
본 발명의 배경기술은 대한민국 등록특허공보 10-1020889호(2011.03.02)의 '하이브리드 자동차의 제어기간 상호 감시방법'에 개시되어 있다.The background technology of the present invention is disclosed in 'Method for mutual monitoring between control periods of a hybrid vehicle' of Korean Patent No. 10-1020889 (March 02, 2011).
본 발명은 전술한 문제점을 개선하기 위해 창안된 것으로서, 본 발명의 일 측면에 따른 목적은 하나의 직렬 통신 포트를 통해서도 직렬 통신 충돌없이 양방향 모니터링을 수행할 수 있도록 한 양방향 마이컴 모니터링 방법을 제공하는 데 있다.The present invention has been devised to improve the above problems, and an object of one aspect of the present invention is to provide a bidirectional microcomputer monitoring method that enables bidirectional monitoring without serial communication collision even through one serial communication port. have.
본 발명의 일 측면에 따른 양방향 마이컴 모니터링 방법은 제1 마이컴이 MC 태스크(Monitoring Controller Task, MC Task)를 수행하는 단계; 상기 제2 마이컴이 상기 제1 마이컴의 MC 태스크 수행 주기를 모니터링하여 모니터링 결과에 따라 상기 제2 마이컴의 MC 태스크 수행 시점에 대한 옵셋값을 산출하는 단계; 및 상기 제2 마이컴이 상기 옵셋값에 따라 MC 태스크를 수행하는 단계를 포함하는 것을 특징으로 한다.A two-way microcomputer monitoring method according to an aspect of the present invention comprises the steps of: a first microcomputer performing an MC task (Monitoring Controller Task, MC Task); calculating, by the second microcomputer, an MC task execution period of the first microcomputer, and calculating an offset value for the MC task execution time of the second microcomputer according to a monitoring result; and performing, by the second microcomputer, an MC task according to the offset value.
본 발명은 상기 제1 마이컴이 MC 태스크를 수행하면, 상기 제2 마이컴이 상기 제1 마이컴으로부터 SPI 채널(Serial Peripheral Interface Channel)을 통해 전달된 연산 결과를 토대로 MU 태스크(Monotoring Unit Task, MU Task)를 수행하여 제1 마이컴의 정상 동작 여부를 판정하는 단계를 더 포함하는 것을 특징으로 한다.According to the present invention, when the first microcomputer performs the MC task, the second microcomputer performs a MU task (Monotoring Unit Task) based on the operation result transmitted from the first microcomputer through an SPI channel (Serial Peripheral Interface Channel). It characterized in that it further comprises the step of determining whether the normal operation of the first microcomputer by performing.
본 발명의 상기 제1 마이컴의 정상 동작 여부를 판정하는 단계는, 상기 제1 마이컴과 스테이트 동기를 맞추는 이닛 스테이트(Init State), 상기 제1 마이컴의 소프트웨어 버전을 확인하고 상기 제1 마이컴의 소프트웨어가 유효한지를 판단하는 크로스 체크 스테이트(Cross Check State), 파워 스토리지를 차단할 수 있는 셧-오프 패스에 대한 기능 이상 유무를 검사하는 프리드라이브 스테이트(Predrive State), 및 ADC(AD Converter) 기능 이상 유무, 인스트럭션(Instruction) 정상 유무, PFM(Program Flow Monitoring) 기능 이상 유무 중 적어도 하나를 검사하는 드라이빙 스테이트를 포함하는 것을 특징으로 한다.The step of determining whether the first microcomputer operates normally may include checking an init state that synchronizes the state with the first microcomputer, a software version of the first microcomputer, and the software of the first microcomputer. Cross Check State, which determines whether or not it is valid, Predrive State, which checks whether there is an abnormality in the shut-off path that can block power storage, and whether there is an abnormality in the ADC (AD Converter) function, instruction (Instruction) It is characterized in that it includes a driving state for checking at least one of whether there is a normal or not and whether there is an abnormality in the program flow monitoring (PFM) function.
본 발명은 상기 제2 마이컴이 MC 태스크를 수행하면, 상기 제1 마이컴이 상기 제2 마이컴으로부터 SPI 채널을 통해 전달된 연산 결과를 토대로 MU 태스크를 수행하여 상기 제2 마이컴의 정상 동작 여부를 판정하는 단계를 더 포함하는 것을 특징으로 한다. According to the present invention, when the second microcomputer performs the MC task, the first microcomputer performs the MU task based on the operation result transmitted from the second microcomputer through the SPI channel to determine whether the second microcomputer operates normally. It is characterized in that it further comprises a step.
본 발명의 상기 제2 마이컴의 정상 동작 여부를 판정하는 단계는, 상기 제2 마이컴과 스테이트 동기를 맞추는 이닛 스테이트, 상기 제2 마이컴의 소프트웨어 버전을 확인하고 상기 제2 마이컴의 소프트웨어가 유효한지를 판단하는 크로스 체크 스테이트, 파워 스토리지를 차단할 수 있는 셧-오프 패스에 대한 기능 이상 유무를 검사하는 프리드라이브 스테이트, 및 ADC 기능 이상 유무, 인스트럭션 정상 유무, PFM 기능 이상 유무 중 적어도 하나를 검사하는 드라이빙 스테이트를 포함하는 것을 특징으로 한다.The step of determining whether the second microcomputer operates normally may include checking an init state that synchronizes with the second microcomputer, a software version of the second microcomputer, and determining whether the software of the second microcomputer is valid. Includes a cross check state, a free drive state that checks whether there is an abnormality in the shut-off pass that can block power storage, and a driving state that inspects at least one of whether there is an abnormality in the ADC function, whether the instruction is normal or not, and whether there is an abnormality in the PFM function. characterized in that
본 발명의 상기 제2 마이컴의 MU 태스크 수행 주기는 상기 제1 마이컴의 MC 태스크 수행 주기보다 짧은 것을 특징으로 한다.According to the present invention, the MU task execution period of the second microcomputer is shorter than the MC task execution period of the first microcomputer.
본 발명의 상기 제2 마이컴이 상기 옵셋값에 따라 MC 태스크를 수행하는 단계에서, 상기 제2 마이컴은 상기 제1 마이컴의 MC 태스크의 주기 오차를 산출하고 상기 주기 오차를 토대로 상기 옵셋값을 보정하는 것을 특징으로 한다.In the step of the second microcomputer of the present invention performing the MC task according to the offset value, the second microcomputer calculates a periodic error of the MC task of the first microcomputer and corrects the offset value based on the periodic error characterized in that
본 발명의 상기 제2 마이컴은 상기 제1 마이컴이 MC 태스크 수행을 완료하여 상기 싱크 핀을 토글할 때마다 타이머 카운트값을 기록하고, 상기 타이머 카운트값을 이용하여 상기 제1 마이컴의 MC 태스크 수행 주기를 산출하고, 상기 제1 마이컴의 MC 태스크 수행 주기를 토대로 상기 주기 오차를 산출하는 단계를 포함하는 것을 특징으로 한다.The second microcomputer of the present invention records a timer count value whenever the first microcomputer completes the MC task execution and toggles the sync pin, and uses the timer count value to perform the MC task cycle of the first microcomputer , and calculating the period error based on the MC task execution period of the first microcomputer.
본 발명의 상기 제2 마이컴은 상기 주기 오차와 기 설정된 임계값을 비교하여 비교 결과에 따라 상기 옵셋값을 보정하는 것을 특징으로 한다.The second microcomputer of the present invention compares the period error with a preset threshold value and corrects the offset value according to the comparison result.
본 발명의 상기 제2 마이컴은 상기 주기 오차에 따라 상기 제2 마이컴의 MC 태스크 수행 시점을 변경하는 것을 특징으로 한다. The second microcomputer of the present invention is characterized in that the MC task execution time of the second microcomputer is changed according to the period error.
본 발명의 다른 측면에 따른 양방향 마이컴 모니터링 방법은 제1 마이컴이 MC 태스크(Monitoring Controller Task, MC Task)를 수행하는 단계; 상기 제2 마이컴이 상기 제1 마이컴으로부터 SPI 채널(Serial Peripheral Interface Channel)을 통해 전달된 연산 결과를 토대로 MU 태스크(Monotoring Unit Task, MU Task)를 수행하여 상기 제1 마이컴의 정상 동작 여부를 판정하고, 상기 제1 마이컴의 MC 태스크 수행 주기를 모니터링하여 모니터링 결과에 따라 상기 제2 마이컴의 MC 태스크 수행 시점에 대한 옵셋값을 산출하는 단계; 상기 제2 마이컴이 상기 옵셋값에 따라 MC 태스크를 수행하는 단계; 및 상기 제2 마이컴이 MC 태스크를 수행하면, 상기 제1 마이컴이 상기 제2 마이컴으로부터 SPI 채널을 통해 전달된 연산 결과를 토대로 MU 태스크를 수행하여 상기 제2 마이컴의 정상 동작 여부를 판정하는 단계를 포함하는 것을 특징으로 한다.A two-way microcomputer monitoring method according to another aspect of the present invention comprises the steps of: performing, by a first microcomputer, an MC task (Monitoring Controller Task, MC Task); The second micom performs a Monotoring Unit Task (MU Task) based on the operation result transmitted from the first micom through an SPI channel (Serial Peripheral Interface Channel) to determine whether the first micom operates normally, and , monitoring the MC task execution period of the first microcomputer and calculating an offset value for the MC task execution time of the second microcomputer according to the monitoring result; performing, by the second microcomputer, an MC task according to the offset value; and when the second microcomputer performs the MC task, the first microcomputer performs the MU task based on the operation result transmitted from the second microcomputer through the SPI channel to determine whether the second microcomputer operates normally. characterized by including.
본 발명의 상기 제2 마이컴의 MU 태스크 수행 주기는 상기 제1 마이컴의 MC 태스크 수행 주기보다 짧은 것을 특징으로 한다.According to the present invention, the MU task execution period of the second microcomputer is shorter than the MC task execution period of the first microcomputer.
본 발명의 상기 제2 마이컴이 상기 옵셋값에 따라 MC 태스크를 수행하는 단계에서, 상기 제2 마이컴은 상기 제1 마이컴의 MC 태스크의 주기 오차를 산출하고 상기 주기 오차를 토대로 상기 옵셋값을 보정하는 것을 특징으로 한다.In the step of the second microcomputer of the present invention performing the MC task according to the offset value, the second microcomputer calculates a periodic error of the MC task of the first microcomputer and corrects the offset value based on the periodic error characterized in that
본 발명의 상기 제2 마이컴은 상기 제1 마이컴이 MC 태스크 수행을 완료하여 상기 싱크 핀을 토글할 때마다 타이머 카운트값을 기록하고, 상기 타이머 카운트값을 이용하여 상기 제1 마이컴의 MC 태스크 수행 주기를 산출하고, 상기 제1 마이컴의 MC 태스크 수행 주기를 토대로 상기 주기 오차를 산출하는 단계를 포함하는 것을 특징으로 한다.The second microcomputer of the present invention records a timer count value whenever the first microcomputer completes the MC task execution and toggles the sync pin, and uses the timer count value to perform the MC task cycle of the first microcomputer , and calculating the period error based on the MC task execution period of the first microcomputer.
본 발명의 상기 제2 마이컴은 상기 주기 오차와 기 설정된 임계값을 비교하여 비교 결과에 따라 상기 옵셋값을 보정하는 것을 특징으로 한다.The second microcomputer of the present invention compares the period error with a preset threshold value and corrects the offset value according to the comparison result.
본 발명의 상기 제2 마이컴은 상기 주기 오차에 따라 상기 제2 마이컴의 MC 태스크 수행 시점을 변경하는 것을 특징으로 한다. The second microcomputer of the present invention is characterized in that the MC task execution time of the second microcomputer is changed according to the period error.
본 발명의 일 측면에 따른 양방향 마이컴 모니터링 방법은 마이컴의 MC 태스크를 기 설정된 옵셋에 따라 설정된 간격으로 동작함으로써, 하나의 직렬 통신 포트를 통해서도 직렬 통신 충돌없이 양방향 모니터링을 수행할 수 있다. The bidirectional microcomputer monitoring method according to an aspect of the present invention operates the MC task of the microcomputer at set intervals according to a preset offset, so that bidirectional monitoring can be performed without a serial communication collision even through one serial communication port.
본 발명의 다른 측면에 따른 양방향 마이컴 모니터링 방법은 소프트웨어적인 기법으로 기존 하드웨어가 결정된 상태나 하드웨어 자원이 제한적인 제어기에서도 양방향 모니터링에 관한 기능 안전을 만족시킬 수 있다. The bidirectional microcomputer monitoring method according to another aspect of the present invention can satisfy functional safety related to bidirectional monitoring even in a state in which existing hardware is determined or a controller having limited hardware resources using a software technique.
본 발명의 또 다른 측면에 따른 양방향 마이컴 모니터링 방법은 독립된 타임 윈도우(Time Window)의 두 마이컴의 태스크를 동기화시켜 보다 안정적으로 동작할 수 있도록 한다. The two-way microcomputer monitoring method according to another aspect of the present invention synchronizes the tasks of two microcomputers with independent time windows so that they can operate more stably.
도 1 은 본 발명의 일 실시예에 따른 양방향 마이컴 모니터링 장치의 블럭 구성도이다.
도 2 는 본 발명의 일 실시예에 따른 MMU 스테이트 다이어그램을 나타낸 도면이다.
도 3 은 본 발명의 일 실시예에 따른 MMC 스테이트 다이어그램을 나타낸 도면이다.
도 4 는 본 발명의 일 실시예에 따른 양방향 모니터링을 위한 MC 태스크와 MU 태스크의 주기를 나타낸 도면이다.
도 5 는 본 발명의 일 실시예에 따른 옵셋 보정 순서도이다.
도 6 은 본 발명의 일 실시예에 따른 옵셋이 보상된 MC 태스크와 MU 태스크의 주기를 나타낸 도면이다.
도 7 은 본 발명의 일 실시예에 따른 옵셋이 보상된 MC 태스크와 MU 태스크의 주기를 나타낸 도면이다.
도 8 은 본 발명의 일 실시예에 따른 이닛 스테이트 수행 과정을 나타낸 도면이다.
도 9 는 본 발명의 일 실시예에 따른 크로스 체크 스테이트 수행 과정을 나타낸 도면이다.
도 10 은 본 발명의 일 실시예에 따른 프리드라이브 스텝1 스테이트 수행 과정을 나타낸 도면이다.
도 11 은 본 발명의 일 실시예에 따른 프리드라이브 스텝2 스테이트 수행 과정을 나타낸 도면이다.
도 12 는 본 발명의 일 실시예에 따른 드라이빙 스테이트 수행 과정을 나타낸 도면이다. 1 is a block diagram of a bidirectional microcomputer monitoring apparatus according to an embodiment of the present invention.
2 is a diagram illustrating an MMU state diagram according to an embodiment of the present invention.
3 is a diagram illustrating an MMC state diagram according to an embodiment of the present invention.
4 is a diagram illustrating a cycle of an MC task and an MU task for interactive monitoring according to an embodiment of the present invention.
5 is a flowchart of offset correction according to an embodiment of the present invention.
6 is a diagram illustrating a cycle of an MC task and an MU task for which an offset is compensated according to an embodiment of the present invention.
7 is a diagram illustrating periods of an MC task and an MU task for which an offset is compensated according to an embodiment of the present invention.
8 is a diagram illustrating a process of performing an init state according to an embodiment of the present invention.
9 is a diagram illustrating a cross check state execution process according to an embodiment of the present invention.
10 is a diagram illustrating a process of performing a
11 is a diagram illustrating a process of performing a
12 is a diagram illustrating a driving state execution process according to an embodiment of the present invention.
이하에서는 본 발명의 일 실시예에 따른 양방향 마이컴 모니터링 방법을 첨부된 도면들을 참조하여 상세하게 설명한다. 이러한 과정에서 도면에 도시된 선들의 두께나 구성요소의 크기 등은 설명의 명료성과 편의상 과장되게 도시되어 있을 수 있다. 또한 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서, 이는 이용자, 운용자의 의도 또는 관례에 따라 달라질 수 있다. 그러므로 이러한 용어들에 대한 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다. Hereinafter, a bidirectional microcomputer monitoring method according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings. In this process, the thickness of the lines or the size of the components shown in the drawings may be exaggerated for clarity and convenience of explanation. In addition, the terms to be described later are terms defined in consideration of functions in the present invention, which may vary according to intentions or customs of users and operators. Therefore, definitions of these terms should be made based on the content throughout this specification.
도 1 은 본 발명의 일 실시예에 따른 양방향 마이컴 모니터링 장치의 블럭 구성도이다.1 is a block diagram of a bidirectional microcomputer monitoring apparatus according to an embodiment of the present invention.
도 1 을 참조하면, 본 발명의 일 실시예에 따른 양방향 마이컴 모니터링 장치는 제1 마이컴(10)과 제2 마이컴(20)을 포함한다. 제1 마이컴(10)과 제2 마이컴(20)은 독립적으로 구비된다. Referring to FIG. 1 , an apparatus for monitoring a two-way microcomputer according to an embodiment of the present invention includes a
제1 마이컴(10)과 제2 마이컴(20)은 SPI 채널(Serial Peripheral Interface Channel)을 통해 연결된다. The
SPI 채널은 제1 마이컴(10)과 제2 마이컴(20)의 상호 모니터링을 위한 데이터를 송수신한다. SPI 채널을 통해 송수신되는 데이터는 제1 마이컴(10)과 제2 마이컴(20) 각각의 기능 안전에서 요구하는 데이터, 즉 마이컴 기능들과 관련된 결과값이 포함될 수 있으며, 특별히 한정되는 것은 아니다. The SPI channel transmits and receives data for mutual monitoring of the
일반적으로 메인 마이컴이 정상 동작을 하는지 체크하기 위해서는 서로 다른 타임 윈도우(Time window)를 가진 독립적인 마이컴이 모니터링을 해야 한다. 이에, 제1 마이컴(10)과 제2 마이컴(20)은 전원이 인가된 뒤 각자 독립적으로 5개의 스테이트(State)를 천이하며 기능 이상 유무를 체크한다. In general, in order to check whether the main microcomputer is operating normally, independent microcomputers with different time windows should monitor. Accordingly, the
본 실시예에서, 기존 단방향 모니터링을 위해 사용되고 있던 1개의 SPI 채널과 태스크(Task) 동기화를 위해 디지털 핀(Digital Pin) 2개를 그대로 사용될 수 있다. In this embodiment, one SPI channel used for existing one-way monitoring and two digital pins for task synchronization may be used as it is.
더욱이, 상호 모니터링을 위한 태스크(Task)는 제1 마이컴(10)과 제2 마이컴(20)의 태스크 동기화를 이용하여 충돌없이 1개의 SPI 채널을 통해 데이터를 송수신한다. Moreover, the task for mutual monitoring transmits and receives data through one SPI channel without collision by using task synchronization of the
제1 마이컴(10)과 제2 마이컴(20) 각각에 대한 단방향 모니터링의 경우 기존 방식과 동일하지만, 이들은 단방향 모니터링을 시작함과 동시에 옵셋(Offset)을 두고 반대방향 모니터링도 시작한다. In the case of unidirectional monitoring for each of the
1개의 SPI 채널을 공유하기 위해 제1 마이컴(10)과 제2 마이컴(20) 간의 태스크 동기화는 중요하다. 싱크(Sync) 핀을 활용한 제1 마이컴(10)의 통신 요청에 따라, 제2 마이컴(20)은 옵셋 시간을 두고 모니터링하는 제1 마이컴(10)에 대한 정상 동작 유무를 담은 데이터를 송수신한다.In order to share one SPI channel, task synchronization between the
제2 마이컴(20)에서는 대상 마이컴과 태스크 동기화하기 위해 주기적으로 제1 마이컴(10)의 태스크의 싱크 핀을 활용하여, 태스크의 옵셋을 보정하여 통신 채널의 간섭을 제거한다. In order to synchronize the task with the target microcomputer, the
즉, 제1 마이컴(10)과 제2 마이컴(20)은 상호 모니터링 기능을 수행하지만 기존의 단방향 마이컴 모니터링의 하드웨어 자원만으로 상호 모니터링을 수행할 수 있다. 이하 상세하게 설명한다.That is, the
제1 마이컴(10)은 MC 태스크(Monitoring Controller Task, MC Task), ISR(Interrupt Service Routine), 및 MU 태스크(Monotoring Unit Task, MU Task)를 수행한다. 제1 마이컴(10)은 제2 마이컴(20)과 싱크 핀을 통해 연결된다. The
제1 마이컴(10)의 MC 태스크는 ADC(AD Converter)과 PFC(Program Flow Check) 등의 기능 안전에서 요하는 마이컴 기능들과 관련된 결과값을 연산하며, 제1 마이컴(10)으로 연산 결과를 송출하기 위한 준비가 완료되면 싱크 핀을 토글한다. The MC task of the
제1 마이컴(10)의 MU 태스크는 제2 마이컴(20)으로부터 전송받은 연산 결과를 기대값과 비교하여 제1 마이컴(10)의 기능의 정상 동작 여부를 판정한다. 또한, 제1 마이컴(10)의 MU 태스크는 제2 마이컴(20)의 기능 고장을 감지한 경우 고장 케이스 별로 정해진 리액션을 수행하여 연쇄 고장을 방지한다. The MU task of the
제1 마이컴(10)의 MU 태스크 수행 주기는 MC 태스크 수행 주기보다 더 빨라야 하며, 일반적으로 MU 태스크의 수행 주기는 MC 태스크 수행 주기의 1/10 정도로 설정될 수 있다. The MU task execution period of the
제1 마이컴(10)의 ISR은 싱크 핀의 토글을 감지하여 SPI 채널의 통신을 활성화하는 것으로서, 제1 마이컴(10)에 제2 마이컴(20)의 MC 태스크가 수행되었음을 알리고 제1 마이컴(10)의 MU 태스크가 다음 주기에 SPI 통신을 하도록 한다. 또한, 제1 마이컴(10)의 ISR은 주기 오차를 계산하고 옵셋값(Offset)을 보정하며, SPI 채널을 통해 송신된 데이터가 제2 마이컴(20)의 데이터임을 표시한다. 또한, 제1 마이컴(10)의 ISR은 제2 마이컴(20)의 MC 태스크가 보내는 싱크 핀의 입력에 따라 수행되며, 타이머 카운트를 이용하여 제2 마이컴(20)의 MC 태스크 수행 주기를 측정하고 제1 마이컴(10)의 MC 태스크 활성화 타이밍을 계산한다. The ISR of the
제2 마이컴(20)은 MC 태스크, ISR(Interrupt Service Routine), 및 MU 태스크를 수행한다. 제2 마이컴(20)은 제1 마이컴(10)과 싱크 핀을 통해 연결된다. The
제2 마이컴(20)의 MC 태스크는 ADC(AD Converter)과 PFC(Program Flow Check) 등의 기능 안전에서 요구하는 마이컴 기능들과 관련된 결과값을 연산하며, 제1 마이컴(10)으로 연산 결과 송출하기 위한 준비가 완료되면 싱크 핀을 토글한다. The MC task of the
제2 마이컴(20)의 MU 태스크는 제2 마이컴(20)으로부터 전송받은 연산 결과를 기대 값과 비교하여 제2 마이컴(20)의 기능의 정상 동작 여부를 판정한다. 또한, 제2 마이컴(20)의 MU 태스크는 제2 마이컴(20)의 기능의 고장을 감지한 경우 고장 케이스 별로 정해진 리액션을 수행하여 연쇄 고장을 방지한다. The MU task of the
제2 마이컴(20)의 MU 태스크 수행 주기는 MC 태스크 수행 주기보다 더 빨라야 하며, 일반적으로 MU 태스크의 수행 주기는 MC 태스크 수행 주기의 1/10 정도로 설정될 수 있다. The MU task execution period of the
제2 마이컴(20)의 ISR은 싱크 핀의 토글을 감지하여 SPI 채널의 통신을 활성화하는 것으로서, 제2 마이컴(20)에 제1 마이컴(10)의 MC 태스크가 수행되었음을 알리고 제2 마이컴(20)의 MU 태스크가 다음 주기에 SPI 통신을 하도록 한다. 또한, 제2 마이컴(20)의 ISR은 주기 오차를 계산하고 옵셋값(Offset)을 보정하며, SPI 채널을 통해 송신된 데이터가 제1 마이컴(10)의 데이터임을 표시한다. 또한, 제2 마이컴(20)의 ISR은 제1 마이컴(10)의 MC 태스크가 보내는 싱크 핀의 입력에 따라 수행되며, 타이머 카운트를 이용하여 제1 마이컴(10)의 MC 태스크 주기를 측정하고 제2 마이컴(20)의 MC 태스크 활성화를 위한 타이밍을 계산한다. The ISR of the
즉, 제1 마이컴(10)과 제2 마이컴(20)은 동일한 하드웨어 구성 및 프로세서를 구비하며, 동일한 기능을 수행할 수 있다. 다만, 제1 마이컴(10)과 제2 마이컴(20) 각각은 독립적으로 동작을 수행하되, 모니터링을 수행하는지 또는 모니터링 대상이 되는지에 따라 상호 간에 신호 또는 데이터를 송수신하면서 상기한 기능을 선택적으로 수행한다. That is, the
한편, 제1 마이컴(10)과 제2 마이컴(20)은 서로 간에 정상 동작 여부를 판정할 수 있다. 즉, 제2 마이컴(20)은 제1 마이컴(10)으로부터 SPI 채널을 통해 전달된 데이터를 토대로 제1 마이컴(10)의 정상 동작 여부를 판정하고, 제1 마이컴(10)은 제2 마이컴(20)으로부터 SPI 채널을 통해 전달된 데이터를 토대로 제2 마이컴(20)의 정상 동작 여부를 판정한다. Meanwhile, the
도 2 는 본 발명의 일 실시예에 따른 MMU 스테이트 다이어그램을 나타낸 도면이고, 도 3 은 본 발명의 일 실시예에 따른 MMC 스테이트 다이어그램을 나타낸 도면이다.2 is a diagram illustrating an MMU state diagram according to an embodiment of the present invention, and FIG. 3 is a diagram illustrating an MMC state diagram according to an embodiment of the present invention.
도 2 및 도 3 을 참조하면, 정상 동작 여부를 판정하는 모니터링 기능에는 5가지의 스테이트가 포함될 수 있다. 스테이트에는 이닛 스테이트(Init State), 크로스 체크 스테이트(Cross Check State), 프리드라이브 스테이트(Predrive State), 및 드라이빙 스테이트(Drving State)가 포함된다. 2 and 3 , the monitoring function for determining whether a normal operation is performed may include five states. States include Init State, Cross Check State, Predrive State, and Driving State.
이닛 스테이트는 제1 마이컴(10)과 제2 마이컴(20)의 스테이트 동기를 맞추기 위한 스테이트이다. 이닛 스테이트에서는 제1 마이컴(10)과 제2 마이컴(20)에 전원이 인가되는 시점이 다른 경우 물리적인 디지털 핀을 이용하여 스테이트를 서로 동기화시킨다. The init state is a state for synchronizing the states of the
크로스 체크 스테이트는 모니터링 이전에 제1 마이컴(10)과 제2 마이컴(20) 서로의 소프트웨어 버전을 확인하고 모니터링하고자 하는 대상 마이컴의 소프트웨어가 유효한지를 판단하는 스테이트이다. The cross check state is a state in which the
프리드라이브 스테이트는 파워 스토리지(Power Storage)를 차단할 수 있는 셧-오프 패스(Shut-Off Path)에 대한 기능 이상 유무를 검사하는 스테이트이다. The free drive state is a state that checks whether there is an abnormality in the shut-off path that can block the power storage.
드라이브 스테이트는 ADC(AD Converter) 기능 이상 유무, 인스트럭션(Instruction) 정상 유무, PFM(Program Flow Monitoring) 기능 이상 유무 중 적어도 하나를 검사하는 스테이트이다. 드라이브 스테이트에서 검사되는 기능들은 상기한 실시예에 한정되는 것은 아니다. The drive state is a state that checks at least one of whether an ADC (AD Converter) function is abnormal, an instruction is normal, or a PFM (Program Flow Monitoring) function is abnormal. The functions tested in the drive state are not limited to the above-described embodiment.
한편, 본 발명의 일 실시예에 따른 양방향 마이컴 모니터링 방법은 직렬 통신 포트를 통해 제1 마이컴(10)과 제2 마이컴(20) 간에 데이터를 송수신해야 하므로, 직렬 통신의 충돌 방지를 위해서 제1 마이컴(10)과 제2 마이컴(20)의 MC 태스크 간 옵셋을 두고 양방향 모니터링을 수행한다. On the other hand, in the bidirectional microcomputer monitoring method according to an embodiment of the present invention, data must be transmitted and received between the
이 경우, 옵셋은 MC 태스크 수행 주기의 1/2로 설정될 수 있다. 예를 들어, 제1 마이컴(10)의 MC 태스크 수행 주기가 10ms인 경우, 즉 제1 마이컴(10)의 MC 태스크가 10ms 주기로 수행될 경우, 제2 마이컴(20)의 MC 태스크는 제1 마이컴(10)의 MC 태스크 대비 5ms의 옵셋을 갖고 10ms 주기로 동작한다. 이 때, 제2 마이컴(20)의 MC 태스크의 옵셋은 제1 마이컴(10)의 첫번째 싱크 핀 토글로부터 계산 및 반영될 수 있다. 제2 마이컴(20)의 MC 태스크 수행 주기는 제1 마이컴(10)의 MC 태스크 주기와 동일하다. In this case, the offset may be set to 1/2 of the MC task execution period. For example, when the MC task execution period of the
통신 리퀘스트 요청은 MC 태스크의 시작에서 수행하며, 타 마이컴과 연결된 디지털 출력 핀을 토글시켜 줌으로써 통신을 요청한다. 제1 마이컴(10)과 제2 마이컴(20) 중 MC 태스크를 수행하는 마이컴은 다른 마이컴에 의한 싱크 핀 토글을 감지하면, 인터럽트를 발생시키며, 해당 ISR은 다른 마이컴의 MC 태스크 수행 주기를 측정하고, 측정된 MC 태스크 수행 주기로 주기 오차를 계산하다. 아울러, ISR은 주기 오차를 다음 수행될 MC 태스크의 옵셋에 반영한다. 여기서, 직렬 통신을 위한 클럭 송출은 옵셋값이 반영된 MC 태스크가 시작될 때 수행한다.The communication request request is performed at the start of the MC task, and the communication is requested by toggling the digital output pin connected to the other microcomputer. Among the
이하, 본 발명의 일 실시예에 따른 양방향 마이컴 모니터링 방법을 도 4 내지 도 7 을 참조하여 상세하게 설명한다. Hereinafter, a bidirectional microcomputer monitoring method according to an embodiment of the present invention will be described in detail with reference to FIGS. 4 to 7 .
도 4 는 본 발명의 일 실시예에 따른 양방향 모니터링을 위한 MC 태스크와 MU 태스크의 주기를 나타낸 도면이다.4 is a diagram illustrating a cycle of an MC task and an MU task for interactive monitoring according to an embodiment of the present invention.
먼저, 도 4 를 참조하면, 제어기에 전원이 인가된 후 제1 마이컴(10)의 MC 태스크와 제2 마이컴(20)의 MU 태스크가 우선적으로 수행된다. First, referring to FIG. 4 , after power is applied to the controller, the MC task of the
제2 마이컴(20)은 제1 마이컴(10)의 싱크 핀의 토글을 감지하여 타임 카운터를 통해 제1 마이컴(10)의 MC 태스크 수행 주기를 기록한다. The
제2 마이컴(20)에 의해 기록된 제1 마이컴(10)의 MC 태스크 수행 주기는 이후 주기 오차를 계산하는데 사용될 수 있다. The MC task execution cycle of the
예를 들어, 제1 마이컴(10)의 MC 태스크가 10ms 주기로 동작한다고 가정하면, 제2 마이컴(20)은 제1 마이컴(10)이 MC 태스크를 시작하는 시점에서 싱크 핀을 토글할 때, 인터럽트를 띄워 카운터 타이머 값을 기록한다. For example, if it is assumed that the MC task of the
이어, 제2 마이컴(20)은 가장 최근에 기록했던 타이머 카운터값과 그 이전 기록했던 타이머 카운터값의 차를 구해 제1 마이컴(10)의 주기 오차를 산출할 수 있다. Next, the
한편, 제1 마이컴(10)의 MC 태스크는 싱크 핀을 토글함에 따라 기능 안전에 부합하는 요소들을 점검하여 해당 데이터를 기 설정된 주기, 예를 들어 1ms 주기로 SPI 채널을 통해 전달한다. Meanwhile, as the sync pin is toggled, the MC task of the
이때, 제2 마이컴(20)의 ISR은 SPI 채널을 통해 송신되는 데이터가 제1 마이컴(10)의 데이터임을 알리고, 제2 마이컴(20)의 MU 태스크가 제1 마이컴(10)으로부터 전송된 데이터를 이용하여 제1 마이컴(10)의 정상 동작 여부를 판정한다. At this time, the ISR of the
이 과정에서, 제2 마이컴(20)의 MC 태스크는 제1 마이컴(10)으로부터 MC 태스크의 토글이 감지된 후 상기한 옵셋이 경과하는 시점에, 기능 안전에서 요구하는 마이컴 기능들과 관련된 데이터를 연산하여 연산 결과를 준비하고, 이를 제1 마이컴(10)으로 전송하기 위해 싱크 핀을 토글한다.In this process, the MC task of the
이어, 제1 마이컴(10)은 SPI 채널을 통해 상기한 데이터를 기 설정된 주기, 예를 들어 1ms 주기로 SPI 채널을 통해 전달한다. 이때, 제1 마이컴(10)의 ISR은 SPI 채널을 통해 송신되는 데이터가 제2 마이컴(20)의 데이터임을 알리고, 제1 마이컴(10)의 MU 태스크가 제2 마이컴(20)으로부터 전송된 데이터를 이용하여 제2 마이컴(20)의 정상 동작 여부를 판정한다. Then, the
여기서, 제1 마이컴(10) 또는 제2 마이컴(20) 각각은 MC 태스크가 기 설정된 수행 주기인 10ms보다 지연되거나 일찍 실행된 경우 그에 해당하는 주기 오차를 설정하여, 이 주기 오차를 다음 수행될 MC 태스크의 옵셋에 반영한다. 이는 도 5 내지 도 7 을 참조하여 설명한다.Here, each of the
도 5 는 본 발명의 일 실시예에 따른 옵셋 보정 순서도이며, 도 6 은 본 발명의 일 실시예에 따른 옵셋이 보상된 MC 태스크와 MU 태스크의 주기를 나타낸 도면이며, 도 7 은 본 발명의 일 실시예에 따른 옵셋이 보상된 MC 태스크와 MU 태스크의 주기를 나타낸 도면이다.5 is a flowchart showing an offset correction according to an embodiment of the present invention, FIG. 6 is a diagram showing the cycles of an MC task and an MU task for which an offset is compensated according to an embodiment of the present invention, and FIG. 7 is an embodiment of the present invention It is a diagram showing the periods of the MC task and the MU task for which the offset is compensated according to an embodiment.
참고로, 본 실시예에서는 제2 마이컴(20)을 예시로 설명하나, 이는 제1 마이컴(10)에서도 동일하게 적용된다. For reference, although the
도 5 를 참조하면, 제2 마이컴(20)은 제1 마이컴(10)의 싱크 핀의 토글을 감지하여 타임 카운터를 통해 제1 마이컴(10)의 MC 태스크 수행 주기를 저장한다(S10). Referring to FIG. 5 , the
이 경우, 제2 마이컴(20)은 제1 마이컴(10)이 MC 태스크를 시작하는 시점에서 싱크 핀을 토글할 때 인터럽트를 띄워 카운터 타이머 값을 기록한다. In this case, the
이어, 제2 마이컴(20)은 가장 최근에 기록했던 타이머 카운터값과 그 이전 인터럽트에 기록했던 타이머 카운터값의 차, 즉 주기 오차를 산출한다(S20). Next, the
이때, 제2 마이컴(20)은 주기 오차와 기 설정된 임계값을 비교하여 주기 오차가 임계값 미만인지를 판단한다(S30).At this time, the
S30 단계에서의 판단 결과, 주기 오차가 임계값 이상이면, 제2 마이컴(20)은 폴트 상황인 것으로 판단(S60)하고 기 설정된 스펙에 따라 동작한다. 폴트 상황에서의 동작은 제어기 특성별로 사용자에 의해 정의될 수 있다. As a result of the determination in step S30, if the periodic error is equal to or greater than the threshold value, the
여기서, 임계값은 제1 마이컴(10)의 MC 태스크 수행 주기의 10%일 수 있다.Here, the threshold value may be 10% of the MC task execution period of the
한편, S30 단계에서의 판단 결과, 주기 오차가 임계값 미만이면, 제2 마이컴(20)은 옵셋값에 주기 오차를 반영하여 옵셋값을 보정한다(S40). On the other hand, if it is determined in step S30 that the periodic error is less than the threshold value, the
이어 제2 마이컴(20)은 현재 타이머 카운값을 이전 타이머 카운터에 저장하고(S50), S10 단계로 리턴하여 상기한 과정을 반복한다. Then, the
도 6 을 참조하면, 제1 마이컴(10)의 MC 태스크의 수행 주기를 측정했을 때, 0.02ms 만큼의 주기 오차가 있다고 가정했을 경우, 해당 주기 오차 만큼의 옵셋 보상을 수행하는 예가 도시되었다. Referring to FIG. 6 , when it is assumed that there is a period error of 0.02 ms when the execution period of the MC task of the
제1 마이컴(10)의 상태를 모니터링하는 SPI 통신을 마친 뒤 제2 마이컴(20)의 상태를 모니터링하는 통신을 수행하기 이전에 안정적인 SPI 채널 점유를 위해 5ms의 시간 확보가 필요하다.After completing the SPI communication for monitoring the state of the
제2 마이컴(20)은 매 제1 마이컴(10)의 MC 태스크의 MC 태스크 시작점을 기준으로 타이머 카운터를 기록하여 MC 태스크 수행 주기를 측정한다. The
타이머 카운터로 계산된 MC 태스크 수행 주기가 10.02ms로 측정되면 정상적으로 10ms에 수행되었어야 했던 MC 태스크가 0.02ms 지연된 것을 볼 수 있다. If the MC task execution period calculated by the timer counter is measured as 10.02ms, it can be seen that the MC task, which should have been normally performed in 10ms, was delayed by 0.02ms.
이에, 제2 마이컴(20)은 0.02ms 지연된 것을 옵셋 계산에 반영하여 MC 태스크를 0.02ms만큼 지연시켜 보정한다. 결과적으로 제2 마이컴(20)은 제1 마이컴(10)의 싱크 핀이 토글된 시점으로부터 4.98ms 이후에 데이터를 송수신하는 MC 태스크를 활성화시킨다.Accordingly, the
도 7 을 참조하면, 반대로 제1 마이컴(10)의 MC 태스크가 0.02ms만큼 일찍 수행되었을 때도 그만큼의 Offset 보상을 해주어야한다. 즉, 제1 마이컴(10)의 MC 태스크가 0.02ms만큼 일찍 실행됐다고 가정했을 때, 해당 주기 오차 만큼 옵셋 보상을 해주어야 한다. Referring to FIG. 7 , on the contrary, even when the MC task of the
제2 마이컴(20)은 제1 마이컴(10)의 상태를 모니터링하는 SPI 통신을 마친 뒤 제2 마이컴(20)의 상태를 모니터링하는 통신을 수행하기 이전에 안정적인 SPI 채널 점유를 위해 5ms의 시간 확보가 필요하다. After completing the SPI communication for monitoring the state of the
제2 마이컴(20)은 제2 마이컴(20)의 MC 태스크의 시작점을 기준으로 타이머 카운터를 기록하여 MC 태스크 수행 주기를 측정한다. 도 7 에는 타이머 카운터로 계산된 MC 태스크 수행 주기가 9.98ms로 측정된 예가 도시되었으며, 정상적으로 10ms에 수행되었어야 했던 제1 마이컴(10)의 MC 태스크 수행 주기가 0.02ms 먼저 실행된 것을 볼 수 있다. The
제2 마이컴(20)은 오차 주기를 옵셋 계산에 반영하여 다음 MC 태스크를 0.02ms만큼 미리 수행한다. The
결과적으로, 제2 마이컴(20)은 제1 마이컴(10)의 싱크 핀이 토글된 후, 5.02ms 이후에 데이터를 송신 MC 태스크를 활성화시킨다.As a result, the
즉, MC 태스크가 지연되거나 일찍 수행되더라도 제1 마이컴(10)과 제2 마이컴(20)의 MC 태스크가 동기화되어 안정적으로 SPI 채널을 공유하여 사용할 수 있다.That is, even if the MC task is delayed or performed early, the MC tasks of the
다음으로, 제1 마이컴(10)과 제2 마이컴(20) 각각의 MU 태스크가 기능 이상 유무를 판정하는 5가지 스테이트를 수행하는 과정을 설명한다. Next, a process in which the MU task of each of the
도 8 은 본 발명의 일 실시예에 따른 이닛 스테이트 수행 과정을 나타낸 도면이다. 8 is a diagram illustrating a process of performing an init state according to an embodiment of the present invention.
도 8 을 참조하면, 제어기에 전원이 인가된 후 제1 마이컴(10)의의 MC 태스크와 제2 마이컴(20)의 MU 태스크가 우선적으로 수행된다.Referring to FIG. 8 , after power is applied to the controller, the MC task of the
우선, 제2 마이컴(20)의 MU 태스크가 이닛 스테이트를 끝내게 되면, 물리적인 싱크 핀을 하이로 띄워 주어 제1 마이컴(10)의 MC 태스크가 크로스체크 스테이트로 전환된다. First, when the MU task of the
크로스체크 스테이트로 넘어간 제1 마이컴(10)의 MC 테스크는 자신의 소프트웨어 버전을 제1 마이컴(10)에 보내 유효한 소프트웨어 버전인지 확인한 후, 제2 마이컴(20)도의 스테이트도 크로스체크 스테이트로 전환된다. The MC task of the
제2 마이컴(20)이 MC 태스크는 MU 태스크의 스테이트가 이닛 스테이트가 끝난 상태임을 확인하고 상기한 바와 같은 크로스체크 스테이트로 전환된다. The
제2 마이컴(20)의 MC 태스크는 상기한 바와 같이 옵셋을 보상하여 MU 태스크 기준으로 옵셋 시간 이후에 수행된다. The MC task of the
도 9 는 본 발명의 일 실시예에 따른 크로스 체크 스테이트 수행 과정을 나타낸 도면이다.9 is a diagram illustrating a cross check state execution process according to an embodiment of the present invention.
도 9 를 참조하면, 제2 마이컴(20)의 MU 태스크가 크로스체크 스테이트로 변환된 이후 제1 마이컴(10)에게 자신의 소프트웨어 버전을 보낸다. Referring to FIG. 9 , after the MU task of the
제2 마이컴(20)의 소프트웨어 버전이 유효할 경우 제1 마이컴(10)의 MC 태스크는 프리드라이브 스텝 1 스테이트로 변환된다.When the software version of the
프리드라이브 스텝 1 스테이트가 된 제1 마이컴(10)의 MC 태스크는 셧-오프 패스 핀을 하이로 인가하라는 데이터를 보낸다.The MC task of the
제1 마이컴(10)의 프리드라이브 스텝 1 스테이트의 데이터가 정상적으로 도착해 셧-오프 패스 핀을 하이로 인가하라는 데이터가 유효하면 프리드라이브 스텝 1 스테이트로 변환되면서 셧-오프 패스 핀을 하이로 인가한다.If the data of the
제2 마이컴(20)의 MC 태스크와 제1 마이컴(10)의 MU 태스크 역시 상기한 바와 같은 동작을 옵셋 시간 차를 두고 동일하게 진행된다.The MC task of the
도 10 은 본 발명의 일 실시예에 따른 프리드라이브 스텝1 스테이트 수행 과정을 나타낸 도면이다.10 is a diagram illustrating a process of performing a
제1 마이컴(10)의 MC 태스크는 제2 마이컴(20)의 MU 태스크가 보낸 프리드라이브 스텝1 스테이트의 데이터를 받고 실제 셧-오프 패스 핀의 핀이 하이로 인가되었는지 확인 후 하이인 경우 프리드라이브 스텝2 스테이트로 전환된다.The MC task of the
프리드라이브 스텝 2 스테이트가 된 제1 마이컴(10)은 셧-오프 패스를 로우로 인가하라는 데이터를 전송하고, 해당 데이터를 받은 제2 마이컴(20)의 MU 태스크는 정상적으로 로우로 인가하라는 데이터를 받았는지 검사 후 프리드라이브 스텝 2 스테이트로 변환되면서 셧-오프 패스 핀에 로우를 인가한다. The
제2 마이컴(20)의 MC 태스크와 제1 마이컴(10)의 MU 태스크는 동일한 과정을 수행하며 셧-오프 패스는 제2 마이컴(20) 기준으로 새롭게 정의된 것이다(기존 셧-오프 패스와 다름).The MC task of the
도 11 은 본 발명의 일 실시예에 따른 프리드라이브 스텝2 스테이트 수행 과정을 나타낸 도면이다.11 is a diagram illustrating a process of performing a
도 11 을 참조하면, 제1 마이컴(10)의 MC 태스크는 현재 셧-오프 패스 핀이 실제로 로우로 인가되었는지 확인한 뒤, 드라이빙 스테이트로 변환된다. Referring to FIG. 11 , the MC task of the
제2 마이컴(20)의 MU 태스크는 제1 마이컴(10)의 MC 태스크가 보낸 MU 태스크의 스테이트를 확인하고 드라이빙 스테이트가 된 것을 확인하고 드라이빙 스테이트로 변환한다. The MU task of the
상기한 과정과 동일하게 제2 마이컴(20)의 MC 태스크와 제1 마이컴(10)의 MU 태스크가 수행된다.In the same manner as described above, the MC task of the
도 12 는 본 발명의 일 실시예에 따른 드라이빙 스테이트 수행 과정을 나타낸 도면이다. 12 is a diagram illustrating a driving state execution process according to an embodiment of the present invention.
도 12 를 참조하면, 제1 마이컴(10)의 MC 태스크는 제2 마이컴(20)의 MU 태스크로부터 PFM 1 수행 지시를 받아 자신이 수행해야할 PFM이 1번인지 확인한다. Referring to FIG. 12 , the MC task of the
지시한 값과 일치할 경우, 제1 마이컴(10)의 MC 태스크는 PFM1에 대한 연산을 수행한 후 답변과 ADC Path 중에서 공통으로 센싱하고 있는 경로의 ADC 센싱을 준비한다.If the indicated value is the same, the MC task of the
제2 마이컴(20)의 MU 태스크는 제1 마이컴(10)의 PFM 1에 대한 답변을 가지고 해당 PFM 수행에 대한 정상 유무를 판단한다. The MU task of the
그리고 제2 마이컴(20)의 MU 태스크는 ADC 센싱과 제2 마이컴(20)의 ADC 센싱값과 비교하여 허용 오차 범위 이내에서 정상 동작하는지 판단한다.In addition, the MU task of the
상기한 바와 과정과 동일하게 제2 마이컴(20)의 MC 태스크와 제1 마이컴(10)의 MU 태스크가 수행된다.In the same manner as described above, the MC task of the
드라이빙 스테이트 이후부터는 PFM을 순차적으로 반복한다. After the driving state, PFM is sequentially repeated.
이와 같이, 본 발명의 일 실시예에 따른 양방향 마이컴 모니터링 방법은 마이컴의 MC 태스크를 기 설정된 옵셋에 따라 설정된 간격으로 동작함으로써, 하나의 직렬 통신 포트를 통해서도 직렬 통신 충돌없이 양방향 모니터링을 수행할 수 있도록 한다. As described above, the bidirectional microcomputer monitoring method according to an embodiment of the present invention operates the MC task of the microcomputer at a set interval according to a preset offset, so that bidirectional monitoring can be performed without a serial communication collision even through one serial communication port. do.
또한, 본 발명의 일 실시예에 따른 양방향 마이컴 모니터링 방법은 기존 하드웨어가 결정된 상태나 하드웨어 자원이 제한적인 제어기에서도 소프트웨어적인 기법으로 양방향 모니터링에 관한 기능 안전을 만족시킬 수 있다. In addition, the bidirectional microcomputer monitoring method according to an embodiment of the present invention can satisfy functional safety related to bidirectional monitoring through a software technique even in a state in which existing hardware is determined or a controller having limited hardware resources.
게다가, 본 발명의 일 실시예 따른 양방향 마이컴 모니터링 방법은 독립된 타임 윈도우(Time Window)의 두 마이컴의 태스크를 동기화시켜 보다 안정적으로 동작할 수 있도록 한다. In addition, the bidirectional microcomputer monitoring method according to an embodiment of the present invention synchronizes the tasks of two microcomputers in independent time windows so that they can operate more stably.
본 명세서에서 설명된 구현은, 예컨대, 방법 또는 프로세스, 장치, 소프트웨어 프로그램, 데이터 스트림 또는 신호로 구현될 수 있다. 단일 형태의 구현의 맥락에서만 논의(예컨대, 방법으로서만 논의)되었더라도, 논의된 특징의 구현은 또한 다른 형태(예컨대, 장치 또는 프로그램)로도 구현될 수 있다. 장치는 적절한 하드웨어, 소프트웨어 및 펌웨어 등으로 구현될 수 있다. 방법은, 예컨대, 컴퓨터, 마이크로프로세서, 집적 회로 또는 프로그래밍가능한 로직 디바이스 등을 포함하는 프로세싱 디바이스를 일반적으로 지칭하는 프로세서 등과 같은 장치에서 구현될 수 있다. 프로세서는 또한 최종-사용자 사이에 정보의 통신을 용이하게 하는 컴퓨터, 셀 폰, 휴대용/개인용 정보 단말기(personal digital assistant: "PDA") 및 다른 디바이스 등과 같은 통신 디바이스를 포함한다.Implementations described herein may be implemented in, for example, a method or process, an apparatus, a software program, a data stream, or a signal. Although discussed only in the context of a single form of implementation (eg, discussed only as a method), implementations of the discussed features may also be implemented in other forms (eg, as an apparatus or program). The apparatus may be implemented in suitable hardware, software and firmware, and the like. A method may be implemented in an apparatus such as, for example, a processor, which generally refers to a computer, a microprocessor, a processing device, including an integrated circuit or programmable logic device, or the like. Processors also include communication devices such as computers, cell phones, portable/personal digital assistants ("PDA") and other devices that facilitate communication of information between end-users.
본 발명은 도면에 도시된 실시예를 참고로 하여 설명되었으나, 이는 예시적인 것에 불과하며 당해 기술이 속하는 기술분야에서 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호범위는 아래의 특허청구범위에 의하여 정해져야할 것이다.Although the present invention has been described with reference to the embodiment shown in the drawings, this is merely exemplary, and it is understood that various modifications and equivalent other embodiments are possible by those of ordinary skill in the art. will understand Accordingly, the true technical protection scope of the present invention should be defined by the following claims.
10: 제1 마이컴
20: 제2 마이컴10: first microcomputer
20: second microcomputer
Claims (16)
제2 마이컴이 상기 제1 마이컴의 MC 태스크 수행 주기를 모니터링하여 모니터링 결과에 따라 상기 제2 마이컴의 MC 태스크 수행 시점에 대한 옵셋값을 산출하는 단계; 및
상기 제2 마이컴이 상기 옵셋값에 따라 MC 태스크를 수행하는 단계를 포함하는 양방향 마이컴 모니터링 방법. performing, by the first microcomputer, an MC task (Monitoring Controller Task, MC Task);
calculating, by a second microcomputer, an MC task execution period of the first microcomputer, and calculating an offset value for the MC task execution time of the second microcomputer according to a monitoring result; and
and performing, by the second microcomputer, an MC task according to the offset value.
상기 제1 마이컴과 스테이트 동기를 맞추는 이닛 스테이트(Init State), 상기 제1 마이컴의 소프트웨어 버전을 확인하고 상기 제1 마이컴의 소프트웨어가 유효한지를 판단하는 크로스 체크 스테이트(Cross Check State), 파워 스토리지를 차단할 수 있는 셧-오프 패스에 대한 기능 이상 유무를 검사하는 프리드라이브 스테이트(Predrive State), 및 ADC(AD Converter) 기능 이상 유무, 인스트럭션(Instruction) 정상 유무, PFM(Program Flow Monitoring) 기능 이상 유무 중 적어도 하나를 검사하는 드라이빙 스테이트를 포함하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. The method of claim 2, wherein determining whether the first microcomputer operates normally comprises:
Init State for synchronizing the state with the first micom, Cross Check State for checking the software version of the first micom and determining whether the software of the first micom is valid At least among the predrive state, which checks whether there is an abnormality in the shut-off path, whether there is an abnormality in the ADC (AD converter) function, whether the instruction is normal, and whether there is an abnormality in the program flow monitoring (PFM) function. A two-way microcomputer monitoring method comprising a driving state for checking one.
상기 제2 마이컴과 스테이트 동기를 맞추는 이닛 스테이트, 상기 제2 마이컴의 소프트웨어 버전을 확인하고 상기 제2 마이컴의 소프트웨어가 유효한지를 판단하는 크로스 체크 스테이트, 파워 스토리지를 차단할 수 있는 셧-오프 패스에 대한 기능 이상 유무를 검사하는 프리드라이브 스테이트, 및 ADC 기능 이상 유무, 인스트럭션 정상 유무, PFM 기능 이상 유무 중 적어도 하나를 검사하는 드라이빙 스테이트를 포함하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. 5. The method of claim 4, wherein determining whether the second microcomputer operates normally comprises:
An init state that synchronizes the state with the second micom, a cross check state that checks the software version of the second micom and determines whether the software of the second micom is valid, and a shut-off pass function that can block power storage A bidirectional microcomputer monitoring method, comprising: a free drive state for checking whether there is an abnormality; and a driving state for inspecting at least one of whether there is an ADC function abnormality, whether an instruction is normal or not, and whether there is an abnormality in the PFM function.
상기 제2 마이컴은 상기 제1 마이컴의 MC 태스크의 주기 오차를 산출하고 상기 주기 오차를 토대로 상기 옵셋값을 보정하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. The method of claim 1, wherein in the step of performing the MC task according to the offset value by the second microcomputer,
The second microcomputer calculates a periodic error of the MC task of the first microcomputer and corrects the offset value based on the periodic error.
상기 제1 마이컴이 MC 태스크 수행을 완료하여 상기 제1 마이컴의 태스크의 싱크 핀을 토글할 때마다 타이머 카운트값을 기록하고, 상기 타이머 카운트값을 이용하여 상기 제1 마이컴의 MC 태스크 수행 주기를 산출하고, 상기 제1 마이컴의 MC 태스크 수행 주기를 토대로 상기 주기 오차를 산출하는 단계를 포함하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. The method of claim 7, wherein the second microcomputer
Each time the first microcomputer completes the MC task execution and toggles the sync pin of the task of the first microcomputer, a timer count value is recorded, and the MC task execution period of the first microcomputer is calculated using the timer count value. and calculating the period error based on the MC task execution period of the first microcomputer.
상기 주기 오차와 기 설정된 임계값을 비교하여 비교 결과에 따라 상기 옵셋값을 보정하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. The method of claim 7, wherein the second microcomputer
The bidirectional microcomputer monitoring method, characterized in that by comparing the period error with a preset threshold value and correcting the offset value according to the comparison result.
상기 주기 오차에 따라 상기 제2 마이컴의 MC 태스크 수행 시점을 변경하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. The method of claim 7, wherein the second microcomputer
A bidirectional microcomputer monitoring method, characterized in that the second microcomputer changes the execution time of the MC task according to the period error.
제2 마이컴이 상기 제1 마이컴으로부터 SPI 채널(Serial Peripheral Interface Channel)을 통해 전달된 연산 결과를 토대로 MU 태스크(Monotoring Unit Task, MU Task)를 수행하여 상기 제1 마이컴의 정상 동작 여부를 판정하고, 상기 제1 마이컴의 MC 태스크 수행 주기를 모니터링하여 모니터링 결과에 따라 상기 제2 마이컴의 MC 태스크 수행 시점에 대한 옵셋값을 산출하는 단계;
상기 제2 마이컴이 상기 옵셋값에 따라 MC 태스크를 수행하는 단계; 및
상기 제2 마이컴이 MC 태스크를 수행하면, 상기 제1 마이컴이 상기 제2 마이컴으로부터 SPI 채널을 통해 전달된 연산 결과를 토대로 MU 태스크를 수행하여 상기 제2 마이컴의 정상 동작 여부를 판정하는 단계를 포함하는 양방향 마이컴 모니터링 방법. performing, by the first microcomputer, an MC task (Monitoring Controller Task, MC Task);
A second micom performs a MU task (Monotoring Unit Task, MU Task) based on the operation result transmitted from the first micom through a Serial Peripheral Interface Channel (SPI) to determine whether the first micom operates normally, monitoring an MC task execution period of the first microcomputer and calculating an offset value for the MC task execution time of the second microcomputer according to a monitoring result;
performing, by the second microcomputer, an MC task according to the offset value; and
When the second microcomputer performs the MC task, the first microcomputer performs an MU task based on the operation result transmitted from the second microcomputer through an SPI channel to determine whether the second microcomputer operates normally. Two-way microcomputer monitoring method.
상기 제2 마이컴은 상기 제1 마이컴의 MC 태스크의 주기 오차를 산출하고 상기 주기 오차를 토대로 상기 옵셋값을 보정하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. The method of claim 11, wherein in the step of performing the MC task according to the offset value by the second microcomputer,
The second microcomputer calculates a periodic error of the MC task of the first microcomputer and corrects the offset value based on the periodic error.
상기 제1 마이컴이 MC 태스크 수행을 완료하여 상기 제1 마이컴의 태스크의 싱크 핀을 토글할 때마다 타이머 카운트값을 기록하고, 상기 타이머 카운트값을 이용하여 상기 제1 마이컴의 MC 태스크 수행 주기를 산출하고, 상기 제1 마이컴의 MC 태스크 수행 주기를 토대로 상기 주기 오차를 산출하는 단계를 포함하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. 14. The method of claim 13, wherein the second microcomputer
Each time the first microcomputer completes the MC task execution and toggles the sync pin of the task of the first microcomputer, a timer count value is recorded, and the MC task execution period of the first microcomputer is calculated using the timer count value. and calculating the period error based on the MC task execution period of the first microcomputer.
상기 주기 오차와 기 설정된 임계값을 비교하여 비교 결과에 따라 상기 옵셋값을 보정하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. 14. The method of claim 13, wherein the second microcomputer
The bidirectional microcomputer monitoring method, characterized in that by comparing the period error with a preset threshold value and correcting the offset value according to the comparison result.
상기 주기 오차에 따라 상기 제2 마이컴의 MC 태스크 수행 시점을 변경하는 것을 특징으로 하는 양방향 마이컴 모니터링 방법. 14. The method of claim 13, wherein the second microcomputer
A bidirectional microcomputer monitoring method, characterized in that the second microcomputer changes the execution time of the MC task according to the period error.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020200174598A KR102451821B1 (en) | 2020-12-14 | 2020-12-14 | Bidirectional microcomputer monitoring method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020200174598A KR102451821B1 (en) | 2020-12-14 | 2020-12-14 | Bidirectional microcomputer monitoring method |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20220084775A KR20220084775A (en) | 2022-06-21 |
KR102451821B1 true KR102451821B1 (en) | 2022-10-06 |
Family
ID=82221486
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020200174598A KR102451821B1 (en) | 2020-12-14 | 2020-12-14 | Bidirectional microcomputer monitoring method |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102451821B1 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0764930A (en) * | 1993-08-31 | 1995-03-10 | Matsushita Electric Works Ltd | Mutual monitoring method between cpus |
KR102023164B1 (en) * | 2013-01-15 | 2019-09-19 | 콘티넨탈 오토모티브 시스템 주식회사 | Method for monitoring os task of twin micom in rtos |
KR20150007732A (en) * | 2013-07-12 | 2015-01-21 | 현대모비스 주식회사 | Watchdog system and watchdog control method |
KR102045869B1 (en) * | 2013-07-26 | 2019-11-18 | 현대모비스 주식회사 | Apparatus and Method for timing control of Motor Driven Power Steering Electronic Control Unit |
KR101997723B1 (en) * | 2017-07-10 | 2019-07-08 | 현대오트론 주식회사 | Method and apparatus for monitoring relative processor |
-
2020
- 2020-12-14 KR KR1020200174598A patent/KR102451821B1/en active IP Right Grant
Also Published As
Publication number | Publication date |
---|---|
KR20220084775A (en) | 2022-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7802138B2 (en) | Control method for information processing apparatus, information processing apparatus, control program for information processing system and redundant comprisal control apparatus | |
US10496128B2 (en) | Method for obtaining timestamp and computer device using the same | |
TWI586107B (en) | Timing Error Detection and Correction Device and Its Normal Timing Design Method | |
US7949120B2 (en) | Information processing system in which information expressing a current time point is transmitted from one computer to another for use in calculating an amount of delay in transferring data between the computers | |
KR102451821B1 (en) | Bidirectional microcomputer monitoring method | |
US6557147B1 (en) | Method and apparatus for evaluating a circuit | |
EP3118749B1 (en) | System and method of monitoring a serial bus | |
KR101594453B1 (en) | An apparatus for diagnosing a failure of a channel and method thereof | |
US10769038B2 (en) | Counter circuitry and methods including a master counter providing initialization data and fault detection data and wherein a threshold count difference of a fault detection count is dependent upon the fault detection data | |
US20130191845A1 (en) | Load control device and load control method | |
KR102438148B1 (en) | Abnormality detection apparatus, system and method for detecting abnormality of embedded computing module | |
US7668837B2 (en) | Multiplex apparatus and method for multiplexing legacy device | |
CN111447333B (en) | TDM bus fault detection method, device, equipment and readable storage medium | |
US11526137B2 (en) | Operation verification program, operation synchronization method, and error detection apparatus | |
KR20140092132A (en) | Method for monitoring os task of twin micom in rtos | |
US11397661B1 (en) | System and method for monitoring offline state of electronic device | |
JP3415636B2 (en) | Processor unit | |
JPS5855535B2 (en) | Multi-computer device for vehicles | |
JP5375756B2 (en) | Time monitoring apparatus and method | |
WO2024092193A1 (en) | Bus transaction security in multi-chip module | |
JP3361919B2 (en) | Programmable controller | |
CN116414766A (en) | Heterogeneous system inter-core time synchronization method, heterogeneous system and mobile terminal | |
US20060112316A1 (en) | Method of monitoring status of processor | |
KR101519351B1 (en) | Task execution diagnosis apparatus | |
JPH11284605A (en) | Information processing system and its serial communication method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |