KR102384589B1 - Method for monitoring and controlling status of an embedded terminal device using Power Management IC and an embedded terminal device for the same - Google Patents

Method for monitoring and controlling status of an embedded terminal device using Power Management IC and an embedded terminal device for the same Download PDF

Info

Publication number
KR102384589B1
KR102384589B1 KR1020210182084A KR20210182084A KR102384589B1 KR 102384589 B1 KR102384589 B1 KR 102384589B1 KR 1020210182084 A KR1020210182084 A KR 1020210182084A KR 20210182084 A KR20210182084 A KR 20210182084A KR 102384589 B1 KR102384589 B1 KR 102384589B1
Authority
KR
South Korea
Prior art keywords
pmic
terminal
watchdog
timer
command
Prior art date
Application number
KR1020210182084A
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 KR1020210182084A priority Critical patent/KR102384589B1/en
Application granted granted Critical
Publication of KR102384589B1 publication Critical patent/KR102384589B1/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
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/28Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3209Monitoring remote activity, e.g. over telephone lines or network connections
    • 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/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error
    • 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/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • 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/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering

Abstract

Disclosed are a calculation device and a method for controlling a terminal device including a PMIC. The method includes a step of deactivating a watch dog of the PMIC while a boot loader of the terminal device is executed. In addition, the method includes a step of activating the watch dog when an application program for monitoring executed from the terminal device generates a call to activate the watch dog.

Description

PMIC를 이용한 임베디드 단말기 상태 모니터링 및 제어 방법 및 이를 위한 임베디드 단말기{Method for monitoring and controlling status of an embedded terminal device using Power Management IC and an embedded terminal device for the same}Method for monitoring and controlling status of an embedded terminal device using Power Management IC and an embedded terminal device for the same}

본 발명은 컴퓨팅 기술에 관한 것으로서, 특히 임베디드 단말기 상태를 주기적으로 모니터링하고 단말기가 불특정 시점에서 멈춤(Holding) 상태일 때 이를 자동으로 인지하고, 단말기를 자동으로 리부팅하여 서비스를 지속적으로 제공하는 기술에 관한 것이다. The present invention relates to computing technology, and in particular, to technology for periodically monitoring the state of an embedded terminal, automatically recognizing when the terminal is in a holding state at an unspecified time, and continuously providing a service by automatically rebooting the terminal. it's about

기존에 버스, 지하철 등에 설치된 대중교통 임베디드 결제단말기(이하, 간단히 '단말기')는 교통서비스를 제공하는 데에 사용되어 왔다. 이때, 상기 단말기는 차량의 운행시간 동안 지속적으로 교통서비스를 제공해야 한다. 따라서 일부 단말기가 멈추는 경우, 대기 중인 다른 단말기를 이용하여 결제서비스를 제공해야 하므로, 상기 다른 단말기에게 부하가 집중될 수 있다는 문제가 있다. Public transportation embedded payment terminals (hereinafter, simply 'terminals') installed on buses and subways have been used to provide transportation services. In this case, the terminal must continuously provide a traffic service during the operating time of the vehicle. Therefore, when some terminals are stopped, there is a problem that a load may be concentrated on the other terminals because the payment service must be provided using another terminal on standby.

또한, 기존에는 단말기의 상태를 모니터링하기 위해서 상기 단말기와는 별도로 제공되는 서버와 상기 단말기를 서로 연동하여 주기적으로 상기 단말기의 상태를 인지하는 메커니즘을 이용하였다. 만약, 단말기가 비정상적인 상태(단말기 멈춤현상)에서는 모니터링 서버는 네트워크 연결오류가 발생했는지 아니면 단말기의 상태 자체가 비정상적인지를 구별할 수는 없지만, 단말기가 정상적으로 동작하지 않는다고 인지할 수 있다. In addition, in order to monitor the state of the terminal, a mechanism for periodically recognizing the state of the terminal is used by interworking the terminal with a server provided separately from the terminal. If the terminal is in an abnormal state (terminal stop phenomenon), the monitoring server cannot distinguish whether a network connection error has occurred or whether the state of the terminal itself is abnormal, but can recognize that the terminal is not operating normally.

그러나 모니터링 서버에서 원격으로 단말기를 제어할 수 있는 방법은 존재하지 않으므로 해당 단말기를 운영하는 담당자에게 통지하여 단말기를 수동으로 제어(전원 Off->On)해서 단말기를 재부팅 및 서비스 구동해야 하는 불편함이 존재하며, 단말기 정상복구 시간은 인지 및 수동 조치 시간에 따라 차이가 발생한다.However, since there is no way to remotely control the terminal from the monitoring server, it is inconvenient to have to manually control the terminal (Power Off->On) by notifying the person in charge who operates the terminal to reboot the terminal and run the service. There is a difference in the normal recovery time of the terminal depending on the recognition and manual action time.

이러한 방법으로 단말기의 상태를 확인하고 제어할 수 있지만, 이는 단말기의 CPU(=연산장치) 및 단말기와 서버를 연결하는 네트워크가 정상적으로 동작되는 상황을 전제로 한다. 즉, 단말기의 커널(OS)이 정상적으로 동작하는 상태에서 단말기는 응용 프로그램인 모니터링 프로그램을 이용하여 단말기의 상태를 주기적으로 확인한다. 상기 모니터링 프로그램은 모니터링 서버와 연동하여 단말기의 상태정보를 모니터링 서버에게 주기적으로 제공한다. 상기 모니터링 서버는 단말기의 상태를 표기하고 또한 특정 단말기를 제어하기 위한 상호 제어명령을 정의할 수 있다. 상기 모니터링 서버가 미리 정의된 명령을 단말기에게 제공하면, 단말기의 모니터링 프로그램은 상기 명령에 따라 소프트웨어 제어를 수행한다. 이를 위해서 단말기가 정상적으로 동작되는 상태에서 모니터링 서버와 연결이 정상적으로 동작되는 환경이 요구된다.Although it is possible to check and control the state of the terminal in this way, it is premised on the condition that the CPU (= arithmetic unit) of the terminal and the network connecting the terminal and the server operate normally. That is, in a state in which the kernel (OS) of the terminal is operating normally, the terminal periodically checks the state of the terminal using a monitoring program that is an application program. The monitoring program interworks with the monitoring server to periodically provide status information of the terminal to the monitoring server. The monitoring server may indicate the state of the terminal and define a mutual control command for controlling a specific terminal. When the monitoring server provides a predefined command to the terminal, the monitoring program of the terminal performs software control according to the command. To this end, an environment in which the connection to the monitoring server is normally operated in a state in which the terminal operates normally is required.

모니터링 서버는 단말기에게 제어명령을 전송한다. 단말기는 상기 제어명령에 의해 제어된다. 따라서 불특정 시점에서 단말기의 응용서비스가 멈추거나 커널이 멈추는 경우, 이를 운전자 혹은 철도기관 담당자가 확인할 수는 있지만, 상기 멈춘 상태의 단말기를 리부팅하여 다시 서비스 제공하기 위해서는 수동으로 전원을 오프한 후 온 상태로 다시 제어하거나 별도로 제공되는 제어 장치를 활용해야 한다는 문제가 있다.The monitoring server transmits a control command to the terminal. The terminal is controlled by the control command. Therefore, when the application service of the terminal is stopped or the kernel is stopped at an unspecified time, the driver or the person in charge of the railway can check this, but in order to reboot the stopped terminal and provide the service again, manually turn off the power and then turn it on There is a problem in that it needs to be controlled again with the controller or a separately provided control device must be used.

또한, 버스기사 또는 철도기관 운영담당자와 같은 운영자가 직접 단말기 상태를 모니터링 하고 수동으로 전원 제어를 통해 재실행해야 하기 때문에 상기 운영자가 인지하는 시점 및 전원 제어시점에 따라 단말기 정상 복구시간에 많은 차이가 발생하게 된다.In addition, since an operator such as a bus driver or a railway operator must directly monitor the terminal status and manually re-execute it through power control, a lot of difference occurs in the normal recovery time of the terminal depending on the time the operator recognizes it and the time of power control will do

본 발명에서는, 임베디드 단말기의 전원을 안정적으로 제공해 주도록 되어있는 PMIC의 와치도그(Watchdog) 기능을 활용하여 단말기 상태를 주기적으로 확인하고, 단말기가 멈춤 (Holding) 상태일 경우 PMIC에서 단말기 리부팅을 위한 SW 리셋 또는 전원 제어를 자동으로 수행하여 단말기를 재동작하도록 제어하는 기술을 제공하고자 한다. In the present invention, the terminal status is periodically checked by using the watchdog function of the PMIC, which is designed to stably provide power to the embedded terminal, and when the terminal is in the holding state, SW for rebooting the terminal in the PMIC An object of the present invention is to provide a technology for automatically performing reset or power control to control a terminal to operate again.

본 발명에서는, 서비스 중인 단말기의 하드웨어를 변경하지 않고도 단말기의 상태를 단말기의 내부 시스템에서 주기적으로 확인하고, 멈춤 현상과 같은 이상 현상이 발생한 경우 빠르게 자동으로 인지하여 단말기를 리부팅하여 서비스를 정상적으로 제공할 수 있는 기술을 제고하고자 한다. In the present invention, the state of the terminal is periodically checked in the terminal's internal system without changing the hardware of the terminal in service, and when an abnormal phenomenon such as a stop phenomenon occurs, it is quickly automatically recognized and the terminal is rebooted to provide the service normally. We want to improve our skills.

본 발명의 일 관점에 따라, 단말기의 상태를 확인하고, 단말기가 멈춘 경우 단말기를 리부팅을 위한 기능은 단말기 내부의 전원을 안정적으로 공급하고 있는 PMIC (Power Management Integrated Circuit)의 와치도그 기능을 활용하는 기술이 제공된다. PMIC는 전원관리 집적회로로서, 메인 전원을 입력 받아 전자기기에서 요구하는 안정적이고 효율적인 전압 또는 전류로 변환 정류, 분배 및 제어하는 기능을 실행하는 칩이다. PMIC는 CPU와 연동된 인터페이스(ex I2C)를 통해 와치도그 상태 정보 및 기능을 활성화/비활성화 시킬 수 있는 기능을 제공한다.According to one aspect of the present invention, the function for checking the status of the terminal and rebooting the terminal when the terminal is stopped utilizes the watchdog function of the Power Management Integrated Circuit (PMIC) that stably supplies the power inside the terminal. technology is provided. PMIC is a power management integrated circuit, a chip that receives main power input and converts it into stable and efficient voltage or current required by electronic devices, rectifies, distributes, and controls. The PMIC provides a function to enable/disable the watchdog status information and functions through the interface (ex I2C) interlocked with the CPU.

본 발명의 일 관점에 따라 제공되는 단말기는 PMIC, CPU, 메모리, RTC(Real Time Clock), SAM을 포함한다. 상기 PMIC는 하드웨어에 안정적이고 효율적인 전압, 전류를 분배할 수 있다. PMIC, CPU, 메모리, RTC(Real Time Clock), SAM는 I2C와 같은 인터페이스로 연결될 수 있다.A terminal provided according to an aspect of the present invention includes a PMIC, a CPU, a memory, a Real Time Clock (RTC), and a SAM. The PMIC can distribute a stable and efficient voltage and current to hardware. PMIC, CPU, memory, RTC (Real Time Clock), and SAM can be connected through the same interface as I2C.

본 발명의 일 관점에 따라 제공되는 단말기는, 부팅을 하면 부트로더가 단말기의 하드웨어를 초기화한다. 그 다음, 상기 부트로더는 상기 단말기에 PMIC에게 상기 PMIC에 포함되어 있는 와치도그 기능의 해제를 요청한다. 그 결과, 부팅시점에서 PMIC의 와치도그 기능을 비활성화 함으로써, 부팅하는 동안 PMIC에 의해 단말기가 제어되지 않도록 한다.In the terminal provided according to one aspect of the present invention, when booting, the boot loader initializes the hardware of the terminal. Then, the bootloader requests the terminal to release the watchdog function included in the PMIC from the PMIC. As a result, by disabling the watchdog function of the PMIC at boot time, the terminal is not controlled by the PMIC during booting.

PMIC의 와치도그 기능이 활성화되면, 와치도그를 비활성화하는 명령어가 실행되지 않거나 또는 단말기의 전원이 완전히 오프되지 않으면, 와치도그 기능이 동작하게 된다. 이 경우, 와치도그의 타이머가 만료(expire)되기 전에 와치도그가 비활성화되지 않으면 계속 단말기의 리부팅을 수행하게 된다. 그 결과, 단말기가 정상적으로 동작할 수 없는 상태가 된다. 보통 와치도그 타이머는 매우 짧은 시간(4초)으로 설정되어 있으며 그 타이머의 값을 변경할 수 없다. 따라서 이러한 경우를 고려하면, 단말기가 리부팅되는 동안 빠른 시간 내에 와치도그 기능을 비활성화 해 주어야 한다. 그러므로 본 발명의 일 관점에 따라 제공되는 단말기는, 리부팅을 수행 후 부트로더 진입단계(1st Boot Loader)에서 PMIC 와치도그 타이머를 비활성화시킨다.When the watchdog function of the PMIC is activated, the watchdog function operates if a command to deactivate the watchdog is not executed or the power of the terminal is not completely turned off. In this case, if the watchdog is not deactivated before the watchdog timer expires, the terminal continues to reboot. As a result, the terminal is in a state in which it cannot operate normally. Usually, the watchdog timer is set for a very short time (4 seconds) and the value of the timer cannot be changed. Therefore, considering this case, the watchdog function should be deactivated within a short time while the terminal is rebooting. Therefore, the terminal provided according to an aspect of the present invention deactivates the PMIC watchdog timer in the boot loader entry step (1st Boot Loader) after rebooting.

본 발명의 일 관점에 따라 제공되는 단말기는 CPU, DRAM, 및 부팅 디바이스를 포함하는 임베디드 단말기이다. 상기 CPU는 코어, DRAM 콘트롤러, 부팅 디바이스 콘트롤러, 내부 ROM, 및 SRAM 등을 포함한다.A terminal provided according to an aspect of the present invention is an embedded terminal including a CPU, DRAM, and a booting device. The CPU includes a core, a DRAM controller, a boot device controller, internal ROM, and SRAM and the like.

상기 내부 ROM에는 iROM 코드가 포함되어 있을 수 있다. 그리고 상기 부팅 디바이스는 NAND 소자 또는 MMC 소자일 수 있다. 상기 부팅 디바이스에는 제1부트로더, 제2부트로더, 및 OS를 위한 코드가 기록되어 있을 수 있다. The internal ROM may include an iROM code. And the booting device may be a NAND device or an MMC device. Codes for the first boot loader, the second boot loader, and the OS may be recorded in the booting device.

상기 단말기가 부팅되는 동안, 상기 내부 ROM에 기록된 코드, 상기 제1부터로더에 기록된 코드, 상기 제2부트로더에 기록된 코드, 및 상기 OS 코드가 순서대로 실행될 수 있다. While the terminal is booting, the code recorded in the internal ROM, the code recorded in the first to the loader, the code recorded in the second boot loader, and the OS code may be sequentially executed.

상기 제1부터로더가 실행되는 동안, 프로세서의 슈퍼바이저 모드 진입 및 인터럽트 금지가 먼저 실행된다. 그 다음, 프로세서의 속도를 설정한다. 그 다음 메모리를 초기화한다. 그 다음 PMIC의 와치도그를 비활성화한다. While the first loader is being executed, the processor's entry into supervisor mode and interrupt inhibition are executed first. Next, set the speed of the processor. Then initialize the memory. Then disable the watchdog of the PMIC.

제1부트로더의 기능의 실행은 빠른 시간 내에 완료되어야 한다. 또한, 제1부트로더에 기록되는 코드의 크기의 제약으로 인하여 제1부터로더는 최대한 간략하게 동작이 이루어져야 한다. 따라서, PMIC의 와치도그의 기능을 비활성화하기 위해 상기 PMIC의 와치도그를 비활성화하기 위한 구성은 명령어 생성기 및 신호 제어부로 간단히 구성된다.Execution of the function of the first boot loader should be completed within a short time. In addition, due to the limitation of the size of the code recorded in the first boot loader, the first loader should operate as simply as possible. Accordingly, the configuration for deactivating the watchdog of the PMIC in order to deactivate the function of the watchdog of the PMIC is simply composed of a command generator and a signal controller.

상기 명령어 생성기는 PMIC의 와치도그의 기능을 비활성화하기 위한 명령어를 생성하는 역할을 수행한다. 그리고 상기 신호 제어부는 상기 명령어 생성기로부터 생성된 비활성화 명령어를 포함하는 신호를 PMIC와 연동된 인터페이스를 통해 전송하는 전송부, 및 상기 명령어의 실행 결과를 수신하는 역할을 수행하는 수신부를 포함한다. The command generator serves to generate a command for disabling the watchdog function of the PMIC. In addition, the signal controller includes a transmitter for transmitting a signal including a deactivation command generated from the command generator through an interface linked to a PMIC, and a receiver for receiving the execution result of the command.

상기 단말기의 커널이 정상적으로 구동되면, 모니터링을 위한 응용 프로그램인 모니터링 프로세스가 자동으로 실행된다. 상기 모니터링 프로세스는 PMIC의 와치도그 기능을 활성화를 위한 메시지를 PMIC에게 전송하고 PMIC는 이를 수신하여 와치도그 기능을 활성화 한다.When the kernel of the terminal is normally driven, a monitoring process, which is an application program for monitoring, is automatically executed. The monitoring process transmits a message for activating the watchdog function of the PMIC to the PMIC, and the PMIC receives it and activates the watchdog function.

모니터링 프로세스는 별도의 응용프로그램으로 동작하거나 주 서비스를 위한 응용 프로그램에 별도 기능(쓰레드)으로 동작할 수 있다.The monitoring process can be operated as a separate application program or as a separate function (thread) in the application program for the main service.

이후 상기 모니터링 프로세스는 주기적으로 PMIC와 연동하여 PMIC의 와치도그 상태 정보를 확인하는 수신기능을 수행하고, 트랜잭션(Transaction)을 발생하여 PMIC에게 단말기가 정상적으로 구동되고 있다는 메시지를 전송하는 전송기능을 수행한다.After that, the monitoring process periodically interworks with the PMIC to perform a receiving function to check the watchdog status information of the PMIC, and transmits a message to the PMIC indicating that the terminal is operating normally by generating a transaction. .

이후 상기 모니터링 프로세스는 주기적으로 PMIC와 연동하여 트랜잭션(Transaction)을 발생하여 PMIC의 와치도그 상태 정보를 확인하기 위한 메시지를 전송하고, 그에 대한 상태정보 데이터를 수신하는 기능을 수행한다.Thereafter, the monitoring process periodically interworks with the PMIC to generate a transaction, transmits a message for confirming the watchdog status information of the PMIC, and receives status information data therefor.

만약, 상기 단말기가 비정상 상태(단말기 멈춤)가 되어 상기 모니터링 프로세스가 상기 PMIC에게 주기적인 트랜잭션 메시지를 전송하지 못하는 상황이 발생하고, 그 결과 PMIC가 와치도그의 타임아웃 시간 이내에 트랜잭션 메시지를 수신하지 못하는 경우, PMIC는 자동적으로 단말기를 리부팅하게 된다.If the terminal becomes in an abnormal state (terminal stops) and the monitoring process fails to transmit a periodic transaction message to the PMIC, as a result, the PMIC cannot receive the transaction message within the watchdog timeout time. In this case, the PMIC automatically reboots the terminal.

단말기가 정상적으로 구동된 후 상기 모니터링 프로세스는 자동적으로 실행되도록 되어 있다. 상기 모니터링 프로세스의 기능은 명령어 제어 기능, 트랜잭션 처리 기능, 및 메시지 처리 기능으로 구성된다.After the terminal is normally driven, the monitoring process is automatically executed. The function of the monitoring process consists of a command control function, a transaction processing function, and a message processing function.

상기 명령어 제어 기능은 와치도그 기능을 활성화/비활성화를 설정할 수 있는 기능으로 PMIC에 전달할 명령어를 생성한다.The command control function is a function capable of setting activation/deactivation of the watchdog function, and generates a command to be transmitted to the PMIC.

상기 트랜잭션 처리 기능은 주기적으로 PMIC와 트랜잭션을 처리하기 위한 명령어를 생성하고 PMIC로부터 응답을 분석하여 상태를 확인한다.The transaction processing function periodically generates a command for processing a transaction with the PMIC, and checks the status by analyzing the response from the PMIC.

상기 메시지 처리 기능은 PMIC와 연동된 인터페이스를 기반으로 명령어를 전달하고 응답을 수신하기 위한 메시지를 생성하고, 처리하는 기능을 갖는다.The message processing function has a function of generating and processing a message for transmitting a command and receiving a response based on an interface interworking with the PMIC.

본 발명의 일 관점에 따라 연산장치 및 PMIC를 포함하는 단말기가 제공될 수 있다. 상기 연산장치는, 상기 단말기의 부트로더가 실행되는 동안 상기 PMIC가 제어하는 와치도그를 비활성화하라는 제1명령을 상기 PMIC에게 전달하도록 되어 있다. 상기 PMIC는, 상기 제1명령에 따라 상기 와치도그를 비활성화하도록 되어 있다. 상기 연산장치는, 상기 단말기에서 실행되는 응용프로그램이 상기 와치도그를 활성화하라는 콜(call)을 발생시키면, 상기 와치도그를 활성화하라는 제2명령을 상기 PMIC에게 전달하도록 되어 있다. 그리고 상기 PMIC는, 상기 제2명령에 따라 상기 와치도그를 활성화하도록 되어 있다.According to an aspect of the present invention, a terminal including an arithmetic unit and a PMIC may be provided. The arithmetic unit is configured to transmit a first command to the PMIC to deactivate a watchdog controlled by the PMIC while the bootloader of the terminal is running. The PMIC is configured to deactivate the watchdog according to the first command. The arithmetic unit is configured to transmit a second command to activate the watchdog to the PMIC when the application program executed in the terminal generates a call to activate the watchdog. And the PMIC is configured to activate the watchdog according to the second command.

이때, 상기 PMIC는, 상기 제2명령에 따라 상기 와치도그를 활성화한 이후에 상기 와치도그의 타이머를 초기화하여 상기 타이머를 실행하도록 되어 있고, 그리고, 상기 타이머가 만료되면 시스템 리셋신호를 출력하도록 되어 있을 수 있다.At this time, the PMIC is configured to initialize a timer of the watchdog after activating the watchdog according to the second command to execute the timer, and output a system reset signal when the timer expires. there may be

이때, 상기 시스템 리셋신호는 상기 단말기에 포함된 디바이스들 중에서 상기 PMIC를 제외한 다른 디바이스에 제공되도록 되어 있을 수 있다.In this case, the system reset signal may be provided to devices other than the PMIC among devices included in the terminal.

이때, 상기 응용프로그램은, 상기 와치도그를 활성화하라는 콜을 미리 설정된 스케쥴에 따라 반복적으로 발생하도록 되어 있을 수 있다.In this case, the application program may be configured to repeatedly generate a call to activate the watchdog according to a preset schedule.

이때, 상기 응용프로그램은, 상기 와치도그를 활성화하라는 콜을 미리 결정된 제3주기에 따라 반복적으로 발생하도록 되어 있을 수 있다.In this case, the application program may be configured to repeatedly generate a call to activate the watchdog according to a third predetermined period.

이때, 상기 제3주기는, 상기 타이머의 리셋과 상기 타이머의 만료(expire)까지의 제2주기보다 짧을 수 있다.In this case, the third period may be shorter than the second period between the reset of the timer and the expiration of the timer.

본 발명의 일 관점에 따라 연산장치 및 PMIC를 포함하는 단말기를 제어하는 단말기 제어방법이 제공될 수 있다. 상기 단말기 제어방법은, 상기 연산장치가, 상기 단말기의 부트로더가 실행되는 동안 상기 PMIC가 제어하는 와치도그를 비활성화하라는 제1명령을 상기 PMIC에게 전달하는 단계; 상기 PMIC가, 상기 제1명령에 따라 상기 와치도그를 비활성화하는 단계; 상기 연산장치가, 상기 단말기에서 실행되는 응용프로그램이 상기 와치도그를 활성화하라는 콜(call)을 발생시키면, 상기 와치도그를 활성화하라는 제2명령을 상기 PMIC에게 전달하는 단계; 및 상기 PMIC가, 상기 제2명령에 따라 상기 와치도그를 활성화하는 단계;를 포함한다. According to an aspect of the present invention, a terminal control method for controlling a terminal including an arithmetic unit and a PMIC may be provided. The terminal control method may include: transmitting, by the computing device, a first command to the PMIC to deactivate a watchdog controlled by the PMIC while the bootloader of the terminal is running; deactivating, by the PMIC, the watchdog according to the first command; transmitting, by the arithmetic unit, a second command to activate the watchdog to the PMIC when the application program executed in the terminal generates a call to activate the watchdog; and activating, by the PMIC, the watchdog according to the second command.

이때, 상기 단말기 제어방법은, 상기 PMIC가, 상기 제2명령에 따라 상기 와치도그를 활성화한 이후에 상기 와치도그의 타이머를 초기화하여 상기 타이머를 실행하는 단계;를 더 포함할 수 있다. 그리고 상기 PMIC는, 상기 타이머가 만료되면 시스템 리셋신호를 출력하도록 되어 있을 수 있다.In this case, the method for controlling the terminal may further include, by the PMIC, after activating the watchdog according to the second command, initialize a timer of the watchdog and execute the timer. In addition, the PMIC may be configured to output a system reset signal when the timer expires.

이때, 상기 응용프로그램은, 상기 와치도그를 활성화하라는 콜을 미리 결정된 제3주기에 따라 반복적으로 발생하도록 되어 있고, 그리고 상기 제3주기는, 상기 타이머의 리셋과 상기 타이머의 만료(expire)까지의 제2주기보다 짧을 수 있다.At this time, the application program is configured to repeatedly generate a call to activate the watchdog according to a third predetermined period, and the third period is until the reset of the timer and expiration of the timer. It may be shorter than the second period.

이때, 상기 시스템 리셋신호는 상기 단말기에 포함된 디바이스들 중에서 상기 PMIC를 제외한 다른 디바이스에 제공되도록 되어 있을 수 있다.In this case, the system reset signal may be provided to devices other than the PMIC among devices included in the terminal.

이때, 상기 응용프로그램은, 상기 와치도그를 활성화하라는 콜을 미리 설정된 스케쥴에 따라 반복적으로 발생하도록 되어 있을 수 있다.In this case, the application program may be configured to repeatedly generate a call to activate the watchdog according to a preset schedule.

본 발명에 따르면, 단말기 상태를 주기적으로 확인하고 불특정 시점에 단말기 오류(멈춤현상) 발생 시 자동으로 단말기를 제어(리부팅)하여 정상적으로 동작하도록 할 수 있다.According to the present invention, it is possible to periodically check the terminal status and automatically control (reboot) the terminal to operate normally when a terminal error (stoppage) occurs at an unspecified time.

본 발명에 따르면, 단말기 상태를 확인하고 제어하기 위해서 기존 단말기의 하드웨어를 변경하지 않고도, PMIC의 와치도그 기능을 이용하여 단말기의 상태를 확인하고, 단말기가 비정상 상태일 경우(멈춤현상) 이를 자동으로 인지하고, 단말기를 제어(리부팅)를 함으로써 지속적이고 안정적인 서비스를 제공할 수 있다.According to the present invention, the state of the terminal is checked using the watchdog function of the PMIC without changing the hardware of the existing terminal in order to check and control the terminal state, and when the terminal is in an abnormal state (stopped phenomenon), it is automatically detected By recognizing and controlling (rebooting) the terminal, continuous and stable service can be provided.

도 1은 본 발명의 일 실시예에 따라 제공되는 단말기의 구성을 나타낸 것이다.
도 2는 도 1에 제시한 CPU의 내부구조 및 메모리의 상세구성을 나타낸 것이다.
도 3은 도 2에 나타낸 제1부트로더를 위한 코드에 의해 실행되는 일 실시예에 따른 부트로딩 프로세스를 나타낸 순서도이다.
도 4는 상기 제1부트로더에 포함된 기능을 나타낸 것이다.
도 5는 본 발명의 일 실시예에 따라 제공되는 단말기 상태 제어 방법을 나타낸 순서도이다.
도 6은 도 5에 제시한 단말기 상태 제어 방법에서 단말기 멈춤 현상으로 인하여 자동으로 리셋이 실행되는 과정을 설명하기 위한 것이다.
도 7은 도 6에 제시한 방법과 비교되는 방법을 나타낸 비교 실시예를 나타낸 순서도이다.
도 8은 본 발명의 일 실시예에 따라 제공되는 응용프로그램에 의해 실행되는 모니터링 프로세스의 기능을 나타낸 것이다.
1 shows the configuration of a terminal provided according to an embodiment of the present invention.
FIG. 2 shows the internal structure of the CPU and the detailed configuration of the memory shown in FIG. 1 .
3 is a flowchart illustrating a bootloading process according to an embodiment executed by the code for the first bootloader shown in FIG. 2 .
4 shows functions included in the first boot loader.
5 is a flowchart illustrating a terminal state control method provided according to an embodiment of the present invention.
FIG. 6 is for explaining a process in which a reset is automatically executed due to a terminal stop phenomenon in the terminal state control method shown in FIG. 5 .
7 is a flowchart illustrating a comparative example showing a method compared to the method shown in FIG. 6 .
8 illustrates a function of a monitoring process executed by an application program provided according to an embodiment of the present invention.

이하, 본 발명의 실시예를 첨부한 도면을 참고하여 설명한다. 그러나 본 발명은 본 명세서에서 설명하는 실시예에 한정되지 않으며 여러 가지 다른 형태로 구현될 수 있다. 본 명세서에서 사용되는 용어는 실시예의 이해를 돕기 위한 것이며, 본 발명의 범위를 한정하고자 의도된 것이 아니다. 또한, 이하에서 사용되는 단수 형태들은 문구들이 이와 명백히 반대의 의미를 나타내지 않는 한 복수 형태들도 포함한다.Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, the present invention is not limited to the embodiments described herein and may be implemented in various other forms. The terminology used herein is for the purpose of helping the understanding of the embodiments, and is not intended to limit the scope of the present invention. Also, singular forms used hereinafter include plural forms unless the phrases clearly indicate the opposite.

도 1은 본 발명의 일 실시예에 따라 제공되는 단말기의 구성을 나타낸 것이다.1 shows the configuration of a terminal provided according to an embodiment of the present invention.

단말기(100)는 PMIC(10), CPU(20), 메모리(30), 및 RTC(Real Time Clock)(40)를 포함할 수 있다. 상기 단말기(100)는 SAM(50)을 더 포함할 수 있다.The terminal 100 may include a PMIC 10 , a CPU 20 , a memory 30 , and a Real Time Clock (RTC) 40 . The terminal 100 may further include a SAM 50 .

상기 CPU(20)와 상기 PMIC(10)는 I2C 인터페이스로 연결되어 서로 통신할 수 있다. 상기 CPU(20)와 상기 메모리(30), 상기 RTC(40), 및 상기 SAM(50)는 유선으로 연결되어 서로 통신할 수 있다.The CPU 20 and the PMIC 10 may be connected to each other through an I2C interface to communicate with each other. The CPU 20 , the memory 30 , the RTC 40 , and the SAM 50 may communicate with each other through a wired connection.

상기 단말기(100)에는 도시하지 않은 전원부, 네트워크 통신부, 및 근거리 통신부가 더 포함되어 있을 수 있다.The terminal 100 may further include a power supply unit, a network communication unit, and a short-range communication unit (not shown).

도 2는 도 1에 제시한 CPU의 내부구조 및 메모리의 상세구성을 나타낸 것이다.FIG. 2 shows the internal structure of the CPU and the detailed configuration of the memory shown in FIG. 1 .

상기 CPU(20)는 내부 ROM(121), 코어(122), SRAM(123), DRAM 콘트롤러(124), 및 NAND 콘트롤러(125)를 포함할 수 있다. The CPU 20 may include an internal ROM 121 , a core 122 , an SRAM 123 , a DRAM controller 124 , and a NAND controller 125 .

상기 내부 ROM(121)은 비휘발성 메모리일 수 있다.The internal ROM 121 may be a non-volatile memory.

상기 SRAM(123)은 휘발성 메모리일 수 있다. The SRAM 123 may be a volatile memory.

상기 DRAM 콘트롤러(124)는 상기 CPU(20)의 외부에 있는 휘발성 메모리를 제어하는 IP를 지칭하는 용어일 수 있다. The DRAM controller 124 may be a term referring to an IP that controls a volatile memory external to the CPU 20 .

여기서 IP는 독립거래 대상이 되는 IC칩 내에 포함된 특정 기능을 갖는 회로를 의미할 수 있다. IC칩의 제조자는 IC칩 내부의 모든 회로를 설계할 수도 있지만, 그 중 일부 기능을 갖는 회로에 관한 정보를 다른 회사로부터 구매하여 상기 IC칩에 통합할 수 있다. 상기 회로에 관한 정보는 다운로드 가능한 소프트웨어 또는 데이터, 또는 CD 등의 미디어를 통해 거래될 수 있는 무형의 재산일 수 있다. 상기 IP는 이러한 무형의 재산으로서 특정 회로를 특정하는 정보를 의미하는 용어일 수 있다.Here, IP may mean a circuit having a specific function included in an IC chip that is an independent transaction target. The IC chip manufacturer may design all the circuits inside the IC chip, but information on circuits having some of the functions may be purchased from another company and integrated into the IC chip. The information about the circuit may be downloadable software or data, or an intangible property that can be traded through media such as a CD. The IP may be a term meaning information specifying a specific circuit as such intangible property.

상기 NAND 콘트롤러(125)는 상기 CPU(20)의 외부에 있는 비휘발성 메모리를 제어하는 IP를 지칭하는 용어일 수 있다.The NAND controller 125 may be a term referring to an IP that controls a nonvolatile memory external to the CPU 20 .

상기 메모리(30)는 휘발성 메모리인 DRAM(31) 및 비휘발성 메모리(32)를 포함할 수 있다. 비휘발성 메모리(32)는 예컨대 NAND 메모리, 또는 MMC 메모리 등으로 구성될 수 있다.The memory 30 may include a DRAM 31 , which is a volatile memory, and a non-volatile memory 32 . The non-volatile memory 32 may be constituted of, for example, a NAND memory, an MMC memory, or the like.

상기 비휘발성 메모리(32)에는 부트로더를 위한 코드들 및 OS를 위한 코드들이 기록되어 있을 수 있다.Codes for a boot loader and codes for an OS may be recorded in the non-volatile memory 32 .

상기 부트로더를 위한 코드는 먼저 실행되는 제1부트로더를 위한 코드 및 나중에 실행되는 제2부트로더를 위한 코드로 구분되어 있을 수 있다. The code for the boot loader may be divided into a code for a first boot loader that is executed first and a code for a second boot loader that is executed later.

도 3은 도 2에 나타낸 제1부트로더를 위한 코드에 의해 실행되는 일 실시예에 따른 부트로딩 프로세스를 나타낸 순서도이다.3 is a flowchart illustrating a bootloading process according to an embodiment executed by the code for the first bootloader shown in FIG. 2 .

상기 부트로딩 프로세스는 상기 CPU(20)의 코어에서 실행될 수 있다.The bootloading process may be executed in the core of the CPU 20 .

상기 부트로딩 프로세스는 다음 단계들을 포함할 수 있다.The bootloading process may include the following steps.

단계(S510)에서, 상기 부트로딩 프로세스는 프로세서의 슈퍼바이저 모드 진입 및 인터럽트 금지를 실행한다.In step S510, the bootloading process executes the processor to enter the supervisor mode and disable interrupt.

단계(S520)에서, 상기 부트로딩 프로세스는 프로세서의 속도를 설정할 수 있다.In step S520, the bootloading process may set the speed of the processor.

단계(S530)에서, 상기 부트로딩 프로세스는 프로세서를 이용하여 CPU 외부의 메모리를 초기화할 수 있다.In step S530 , the bootloading process may initialize a memory external to the CPU using a processor.

단계(S540)에서, 상기 부트로딩 프로세스는 상기 PMIC(10)에 포함된 와치도그를 비활성화할 수 있다.In step S540 , the bootloading process may deactivate the watchdog included in the PMIC 10 .

일 실시예에서, 상기 제2부트로더를 위한 코드는, 상기 PMIC(10)에 포함된 와치도그를 비활성화가 완료된 이후에 실행될 수 있다.In an embodiment, the code for the second bootloader may be executed after deactivation of the watchdog included in the PMIC 10 is completed.

도 4는 상기 제1부트로더에 포함된 기능을 나타낸 것이다.4 shows the functions included in the first boot loader.

도 3에 설명한 제1부트로더의 기능을 실행하기 위하여, 상기 제1부트로더를 위한 코드에는 명령어 생성 기능 및 신호 제어 기능이 포함되어 있을 수 있다.In order to execute the function of the first bootloader described in FIG. 3 , the code for the first bootloader may include a command generation function and a signal control function.

상기 명령어 생성 기능은, 상기 부트로더가 상기 PMIC(10)에게 와치도그 해제 명령, 즉 와치도그 비활성화 명령을 생성하는 기능을 포함할 수 있다. The command generation function may include a function in which the bootloader generates a watchdog release command, ie, a watchdog deactivation command, to the PMIC 10 .

상기 신호 제어 기능은, 명령 송신 기능 및 명령 수신 기능을 포함할 수 있다. 상기 명령 송신 기능은 상기 부트로더가 상기 PMIC(10)에게 상기 와치도그 비활성화 명령을 송신하는 기능을 포함할 수 있다. The signal control function may include a command transmission function and a command reception function. The command transmission function may include a function in which the bootloader transmits the watchdog deactivation command to the PMIC 10 .

도 5는 본 발명의 일 실시예에 따라 제공되는 단말기 상태 제어 방법을 나타낸 순서도이다.5 is a flowchart illustrating a terminal state control method provided according to an embodiment of the present invention.

도 5에서 메시지를 주고받는 주체로서 PMIC(10), 부트로더(21), 커널(22), 및 응용프로그램(23)이 제시되어 있다. In FIG. 5 , the PMIC 10 , the boot loader 21 , the kernel 22 , and the application program 23 are presented as subjects for exchanging messages.

이 중 상기 부트로더(21), 상기 커널(22), 및 상기 응용프로그램(23)은 CPU(20)에서 실행되는 기능 모듈일 수 있다. 상기 부트로더(21), 상기 커널(22), 및 상기 응용프로그램(23)을 상기 CPU(20)에서 실행하기 위하여, 상기 메모리(30)는 상기 부트로더(21), 상기 커널(22), 및 상기 응용프로그램(23)을 실행하기 위한 명령코드세트를 포함하고 있을 수 있으며, 상기 CPU(20)는 상기 명령코드세트를 읽어서 실행할 수 있다.Among them, the boot loader 21 , the kernel 22 , and the application program 23 may be functional modules executed in the CPU 20 . In order to execute the boot loader 21, the kernel 22, and the application program 23 in the CPU 20, the memory 30 includes the boot loader 21, the kernel 22, and an instruction code set for executing the application program 23 , and the CPU 20 may read and execute the instruction code set.

일 실시예에서 상기 PMIC(10)는 상기 CPU(20)와는 별도로 제공되는 칩일 수 있다.In an embodiment, the PMIC 10 may be a chip provided separately from the CPU 20 .

일 실시예에서 상기 단말기(100)가 S/W 리셋(Reset)에 의해 재부팅이 된 경우에, 상기 PMIC(10)의 와치도그가 상기 재부팅되기 전에 이미 활성화된 상태였다면, 상기 재부팅 이후에 상기 와치도그가 자동으로 활성화될 수 있다(단계 S110). 여기서 상기 S/W 리셋은, 단말기가 파워온 되어 있는 상태에서 재부팅을 하는 것을 의미할 수 있다. In one embodiment, when the terminal 100 is rebooted by S/W reset, if the watchdog of the PMIC 10 was already activated before the reboot, the watchdog after the rebooting The dog may be automatically activated (step S110). Here, the S/W reset may mean rebooting the terminal in a power-on state.

상기 S/W 리셋 상황과 달리, 상기 PMIC(10)에 전원이 차단된 상태(파워오프)에서 상기 PMIC(10)이 전원이 공급(파워온)되기 시작하여 부팅이 이루어지는 경우에는 상기 와치도그가 비활성화 상태로 될 수도 있다. Unlike the S/W reset situation, when the PMIC 10 is powered off (power off) and the PMIC 10 starts to be powered on (power on) and booting is performed, the watchdog It can also be disabled.

상기 단말기(100)에 대한 S/W 리셋이 이루어지면 상기 부트로더(21)의 프로세스가 시작될 수 있다.When the S/W reset for the terminal 100 is performed, the process of the boot loader 21 may be started.

단계(S111)에서, 상기 부트로더(21)는 와치도그 해제 명령을 상기 PMIC(10)에게 송신할 수 있다. 상기 와치도그 해제 명령의 송신은 상기 제1부트로더에 의해 이루어질 수 있다.In step S111 , the bootloader 21 may transmit a watchdog release command to the PMIC 10 . The watchdog release command may be transmitted by the first bootloader.

단계(S112)에서, 상기 PMIC(10)는 상기 와치도그 해제 명령에 따라 상기 PMIC(10)에 포함된 와치도그를 비활성화 할 수 있다. In step S112 , the PMIC 10 may deactivate the watchdog included in the PMIC 10 according to the watchdog release command.

단계(S121)에서, 상기 커널(22)은 부팅 프로세스를 실행할 수 있다. In step S121 , the kernel 22 may execute a booting process.

부팅이 완료되면, 단계(S130)에서, 소정의 응용프로그램(23)이 실행될 수 있다. 상기 응용프로그램(23)는 상기 단말기(100)의 멈춤 여부를 모니터링하는, 전용의 모니터링 프로그램일 수 있다. 즉, 단계(S130)에서, 응용프로그램에 해당하는 소정의 모니터링 프로세스가 실행될 수 있다. When booting is completed, in step S130, a predetermined application program 23 may be executed. The application program 23 may be a dedicated monitoring program for monitoring whether the terminal 100 is stopped. That is, in step S130, a predetermined monitoring process corresponding to the application may be executed.

단계(S131)에서, 상기 응용프로그램(23)은 와치도그 설정을 요구하는 콜을 상기 커널(22)에게 송신할 수 있다. 상기 와치도그 설정의 요구는 와치도그를 활성화 및 타이머 리셋을 요구하는 것일 수 있다. In step S131 , the application program 23 may transmit a call requesting watchdog setting to the kernel 22 . The watchdog setting request may be a request for activating the watchdog and resetting the timer.

단계(S132)에서, 상기 커널(22)은 와치도그 설정을 요구하는 명령을 상기 PMIC(10)에게 송신할 수 있다. In step S132 , the kernel 22 may transmit a command requesting watchdog setting to the PMIC 10 .

단계(S133)에서, 상기 PMIC(10)는 상기 와치도그 설정을 요구하는 명령에 따라 상기 와치도그를 설정할 수 있다. 즉, 상기 PMIC(10)는 상기 와치도그를 활성화하고 타이머 리셋을 실행할 수 있다.In step S133, the PMIC 10 may set the watchdog according to a command requesting the watchdog setting. That is, the PMIC 10 may activate the watchdog and execute a timer reset.

상기 PMIC(10)는 상기 와치도그를 활성화한 직후 자동적으로 상기 와치도그의 타이머를 리셋할 수 있다. The PMIC 10 may automatically reset a timer of the watchdog immediately after activating the watchdog.

단계(S134)에서, 상기 와치도그의 타이머가 리셋되는 타이머 리셋이 발생하며 상기 타이머의 카운트다운이 시작될 수 있다. In step S134, a timer reset in which the timer of the watchdog is reset may occur, and a countdown of the timer may start.

이때, 타이머의 카운트 주기는 T2로 표현될 수 있다.In this case, the count period of the timer may be expressed as T2.

단계(S150)에서, 상기 PMIC(10)는 시스템 리셋신호를 출력할 수 있다. 단, 시스템 리셋신호는 상기 타이머의 카운터가 특정값, 예컨대 영(0)에 도달한 조건에서만 발생할 수 있다. In step S150, the PMIC 10 may output a system reset signal. However, the system reset signal may be generated only when the counter of the timer reaches a specific value, for example, zero (0).

상기 시스템 리셋신호는 예컨대 상기 단말기(100)의 각종 칩에 전달될 수 있다. 상기 칩들이 리셋되면 상기 부트로더 프로세스가 다시 시작될 수 있다. 상기 부트로더(21)는 상기 시스템 리셋신호에 따라 다시 시작하게 되면, 단계(S112)가 다시 실행되게 된다. The system reset signal may be transmitted to, for example, various chips of the terminal 100 . When the chips are reset, the bootloader process can be restarted. When the boot loader 21 is restarted according to the system reset signal, step S112 is executed again.

그러나 단계(S134)에서 소정의 타이머 리셋조건이 만족되면 상기 타이머가 상기 특정값에 도달하기 전에 상기 타이머 리셋이 다시 발생할 수 있다. 상기 타이머 리셋이 발생하면 상기 타이머의 카운트는 미리 결정된 초기값으로 다시 설정될 수 있다. However, if a predetermined timer reset condition is satisfied in step S134, the timer reset may occur again before the timer reaches the specific value. When the timer reset occurs, the count of the timer may be reset to a predetermined initial value.

상기 소정의 타이머 리셋조건은 상기 응용프로그램(23)에 의해 발생할 수 있다. 상기 소정의 타이머 리셋조건의 발생을 위한 프로세스를 다음 단계들을 통해 설명한다.The predetermined timer reset condition may be generated by the application program 23 . A process for generating the predetermined timer reset condition will be described through the following steps.

단계(S141)에서, 상기 응용프로그램(23)은 PMIC와 트랜젝션(Transaction)을 통해 PMIC 와치도그 타이머 리셋을 요구하는 콜(명령)을 상기 커널(22)에게 송신할 수 있다. 단계(S141)는 소정의 주기 T3(=리셋 콜 주기)에 의해 반복될 수 있다.In step S141, the application program 23 may transmit a call (command) requesting reset of the PMIC watchdog timer to the kernel 22 through a transaction with the PMIC. Step S141 may be repeated by a predetermined period T3 (=reset call period).

PMIC는 응용프로그램과 트랜잭션 수행을 통해 명령어 처리 및 와치도그 타이머를 리셋하는 기능을 수행한다.PMIC performs command processing and reset watchdog timer through application program and transaction execution.

단계(S142)에서, 상기 커널(22)은 상기 와치도그의 리셋을 요구하는 명령을 상기 PMIC(10)에게 송신할 수 있다. In step S142 , the kernel 22 may transmit a command requesting reset of the watchdog to the PMIC 10 .

단계(S143)에서, 상기 PMIC(10)는 트랜잭션(Transaction)에 따른 명령을 수행하고 그에 대한 응답을 전송하고, 상기 와치도그의 타이머 리셋을 요구하는 단계(S134)를 다시 시작하여 상기 타이머를 다시 리셋하여 상기 카운트를 상기 미리 결정된 초기값으로 설정하고 타이머의 카운트 다운을 다시 시작할 수 있다. In step S143, the PMIC 10 executes a command according to a transaction, transmits a response thereto, and restarts the step S134 of requesting a timer reset of the watchdog to restart the timer. A reset may set the count to the predetermined initial value and restart the count down of the timer.

이와 같이, 단계(S134)는 단계(133) 이후에 응용프로그램과 트랜젝션 수행을 통해 반복적으로 다시 시작하도록 되어 있으며, 상기 PMIC(10)는 응용프로그램과 트랜잭션이 수행이 없으면, 상기 타이머가 만료되어 상기 시스템 리셋을 수행하도록 되어 있을 수 있다.In this way, step S134 is repeatedly restarted by performing a transaction with an application program after step 133, and when the PMIC 10 does not perform a transaction with an application program, the timer expires and the It may be configured to perform a system reset.

만일, 상기 PMIC(10)의 타이머의 카운트 주기 T2가 상기 응용프로그램(23)의 상기 리셋 콜 주기 T3보다 짧다면 상기 단말기(100)는 비정상적인 시스템 리셋 루프에 빠지게 될 것이다. 따라서 상기 타이머의 카운트 주기 T2는 상기 리셋 콜 주기 T3보다 길어야 한다. If the count period T2 of the timer of the PMIC 10 is shorter than the reset call period T3 of the application program 23, the terminal 100 will fall into an abnormal system reset loop. Therefore, the count period T2 of the timer should be longer than the reset call period T3.

상기 PMIC(10)가 상기 커널(22)로부터 상기 트랜잭션을 수행하지 못하는 경우는 적어도 2가지가 발생할 수 있다. 첫째, 상기 응용프로그램(23)이 의도하지 않게 멈춘 경우이다. 둘째, 상기 커널(22)이 의도하지 않게 멈춘 경우이다. 상기 응용프로그램(23)와 상기 커널(22)이 모두 멈춘 상태도 존재할 수 있다.At least two cases may occur when the PMIC 10 fails to perform the transaction from the kernel 22 . First, the application program 23 is unintentionally stopped. Second, the kernel 22 is unintentionally stopped. A state in which both the application program 23 and the kernel 22 are stopped may exist.

일 실시예에서, 단계(S131) 및 단계(S132)는 각각 상기 단말기(100)가 파워온, S/W 리셋된 이후에 단 한번만 실행되는 단계임이 비하여, 단계(S141) 및 단계(S142)는 각각 상기 단말기(100)가 파워온, S/W 리셋된 이후에 복수 회 반복하여 실행될 수 있는 단계이다.In one embodiment, steps S131 and S132 are steps that are executed only once after the terminal 100 is powered on and S/W reset, respectively, whereas steps S141 and S142 are It is a step that can be repeatedly executed a plurality of times after the terminal 100 is powered on and S/W is reset, respectively.

도 6은 도 5에 제시한 단말기 상태 제어 방법에서 단말기 멈춤 현상으로 인하여 자동으로 리셋이 실행되는 과정을 설명하기 위한 것이다.FIG. 6 is for explaining a process in which a reset is automatically executed due to a terminal stop phenomenon in the terminal state control method shown in FIG. 5 .

도 6에 제시한 순서도는 도 5에 제시한 것과 동일하다.The flowchart shown in FIG. 6 is the same as that shown in FIG. 5 .

만일, 단계(S131)에서 단계(S141)로 진행하는 도중에 상기 응용프로그램(23)이 멈추게 된다면(91), 단계(S141)가 실행되지 않는다. 또는, 단계(S141)가 실행된 이후, 상기 리셋 콜 주기(T3)에 따라 다시 단계(S141)가 실행되기 이전에 상기 응용프로그램(23)이 멈추게 된다면(91), 단계(S141)가 실행되지 않는다. 그 결과 단계(S142) 및 단계(S143)이 연쇄적으로 실행되지 않는다. 그 결과 단계(S134)에 의해 타이머가 만료되게 되어 결국 상기 시스템 리셋이 발생하게 된다.If the application program 23 is stopped while proceeding from step S131 to step S141 (91), step S141 is not executed. Alternatively, after step S141 is executed, if the application program 23 is stopped before step S141 is executed again according to the reset call period T3 (91), step S141 is not executed. does not As a result, steps S142 and S143 are not sequentially executed. As a result, the timer expires by step S134, and eventually the system reset occurs.

또한 만일, 단계(S141)와 단계(S142) 사이에 상기 커널(22)이 멈추게 된다면(93), 단계(S142)가 실행되지 않는다. 그 결과 단계(S143)이 연쇄적으로 실행되지 않는다. 그 결과 단계(S134)에 의해 타이머가 만료되게 되어 결국 상기 시스템 리셋이 발생하게 된다.Also, if the kernel 22 is stopped between steps S141 and S142 (93), step S142 is not executed. As a result, step S143 is not executed in series. As a result, the timer expires by step S134, and eventually the system reset occurs.

상기 커널(22)이 멈춘 경우 상기 응용프로그램(23)이 멈출 가능성이 있다.When the kernel 22 is stopped, there is a possibility that the application program 23 is stopped.

도 7은 도 6에 제시한 방법과 비교되는 방법을 나타낸 비교 실시예를 나타낸 순서도이다. 7 is a flowchart illustrating a comparative example showing a method compared to the method shown in FIG. 6 .

도 7은 도 6에 제시한 것과 같이, 상기 커널(22) 또는 상기 응용프로그램(23)의 멈춤 현상에 따라 시스템 리셋이 발생한 경우를 설명하기 위한 것이다.FIG. 7 is for explaining a case in which a system reset occurs according to the stopping phenomenon of the kernel 22 or the application program 23 as shown in FIG. 6 .

도 7에 나타낸 실시예에는 도 5에 제시된 단계(S111) 및 단계(S112)가 존재하지 않는다. 그 결과, 도 7에 나타낸 실시예에서는, 단계(S150)에 의해 시스템 리셋이 이루어진 직후에 상기 PMIC(10)의 와치도그가 활성화된 상태를 그대로 유지한다. In the embodiment shown in FIG. 7 , steps S111 and S112 shown in FIG. 5 do not exist. As a result, in the embodiment shown in FIG. 7 , the watchdog of the PMIC 10 remains activated immediately after the system reset by step S150 .

상기 시스템 리셋이 이루어질 때, 상기 시스템 리셋은 PMIC(10)을 제외한 다른 디바이스들에게만 진행되고, 상기 PMIC(10)의 상태를 변화시키지 않을 수 있다. 그 결과 상기 시스템 리셋이 이루어질 때에, 상기 시스템 리셋신호가 상기 PMIC(10)을 제외한 다른 디바이스들에게만 전달되고, 상기 시스템 리셋신호가 상기 PMIC(10)의 상태를 변화시키지는 않을 수 있다. When the system reset is performed, the system reset proceeds only to devices other than the PMIC 10 , and the state of the PMIC 10 may not be changed. As a result, when the system reset is performed, the system reset signal is transmitted only to devices other than the PMIC 10 , and the system reset signal may not change the state of the PMIC 10 .

그 결과, 상기 시스템 리셋이 이루어진 직후의 상기 PMIC(10)위 상태는 상기 시스템 리셋이 이루어진 직전의 상기 PMIC(10)위 상태와 동일하다. 따라서 상기 PMIC(10)의 상기 타이머 주기 T2는 변화하지 않는다. As a result, the state of the PMIC 10 immediately after the system reset is the same as the state of the PMIC 10 immediately before the system reset. Accordingly, the timer period T2 of the PMIC 10 does not change.

이때, 상기 시스템 리셋이 이루어진 시점에, 상기 PMIC(10)의 타이머가 상기 타이머의 카운터가 상기 특정값, 예컨대 영(0)에 도달하면, 상기 타이머의 카운트는 상기 미리 결정된 초기값으로 다시 순환적으로 변경되어 다시 카운트 다운을 시작할 수 있다. 즉, 상기 시스템 리셋이 이루어진 시점부터 상기 타이머의 카운트 다운이 다시 시작될 수 있다.At this time, when the system reset is made, when the timer of the PMIC 10 reaches the specific value, for example, zero (0), the count of the timer is cyclically returned to the predetermined initial value. , so you can start counting down again. That is, the countdown of the timer may start again from the point in time when the system reset is performed.

이 경우, 만일 시스템 리셋 시각으로부터 단계(S131)가 발생하는 시각까지의 시구간의 길이 T4가 상기 타이머 주기 T2보다 짧다면, 단계(S133)이 수행되어 타이머가 리셋되기 이전에 상기 타이머가 다시 만료될 것이다. 이 경우 상기 PMIC(10)는 상기 시스템 리셋을 출력할 것이고, 상기 단말기(100)는 비정상적으로 리셋 될 것이다. In this case, if the length T4 of the time period from the system reset time to the time when step S131 occurs is shorter than the timer period T2, the timer expires again before step S133 is performed and the timer is reset. will be. In this case, the PMIC 10 will output the system reset, and the terminal 100 will be reset abnormally.

그런데 상기 시구간의 길이 T4는 상기 단말기(100)의 전원부의 상태, 상기 부트로더(21) 및 상기 커널(22)의 동작조건에 따라 변화할 수 있다. 따라서 상기 시구간의 길이 T4가 상기 타이머 주기 T2보다 길 것이 당연히 보장되지는 않는다. However, the length T4 of the time period may change according to the state of the power supply of the terminal 100 and operating conditions of the bootloader 21 and the kernel 22 . Accordingly, it is not guaranteed that the length T4 of the time period is longer than the timer period T2.

즉, 도 6에 나타낸 실시예와 같이, 도 5에 제시된 단계(S111) 및 단계(S112)가 존재하지 않는 경우에는, 상기 PMIC(10)의 와치도그에 의해 시스템 리셋이 실행된 이후에 상기 응용프로그램(23)이 다시 실행되기 이전에 상기 타이머가 다시 만료됨으로써 상기 단말기(100)이 비정상적으로 리셋되는 비정상 리셋상황을 배제할 수 없다. 따라서 도 5에 제시된 단계(S111) 및 단계(S112)는 이러한 문제를 해결하기 위해 필요한 단계들이다.That is, as in the embodiment shown in FIG. 6 , when steps S111 and S112 shown in FIG. 5 do not exist, after the system reset is executed by the watchdog of the PMIC 10 , the application An abnormal reset situation in which the terminal 100 is abnormally reset cannot be excluded because the timer expires again before the program 23 is executed again. Accordingly, steps S111 and S112 shown in FIG. 5 are necessary steps to solve this problem.

한편, 상기 단말기(100)이 파워온 상태에서 S/W 리셋되어 재부팅이 시작된 후에 실행되는 단계(S110)에서 이미 상기 타이머의 카운트다운이 시작된다면, 이 경우에도 상기 비정상 리셋상황이 발생할 수 있다는 것을 이해할 수 있다.On the other hand, if the countdown of the timer is already started in step S110, which is executed after the terminal 100 is S/W reset in the power-on state and rebooting is started, the abnormal reset situation may occur even in this case. I can understand.

도 8은 본 발명의 일 실시예에 따라 제공되는 응용프로그램에 의해 실행되는 모니터링 프로세스의 기능을 나타낸 것이다.8 illustrates a function of a monitoring process executed by an application program provided according to an embodiment of the present invention.

상기 단말기(100)가 정상적으로 구동된 후 상기 응용프로그램(23)에 의해 상기 모니터링 프로세스가 자동적으로 실행되도록 되어 있다. 상기 모니터링 프로세스의 기능은 명령어 제어 기능, 트랜잭션 처리 기능, 및 메시지 처리 기능으로 구성된다.After the terminal 100 is normally driven, the monitoring process is automatically executed by the application program 23 . The function of the monitoring process consists of a command control function, a transaction processing function, and a message processing function.

상술한 본 발명의 실시예들을 이용하여, 본 발명의 기술 분야에 속하는 자들은 본 발명의 본질적인 특성에서 벗어나지 않는 범위 내에 다양한 변경 및 수정을 용이하게 실시할 수 있을 것이다. 특허청구범위의 각 청구항의 내용은 본 명세서를 통해 이해할 수 있는 범위 내에서 인용관계가 없는 다른 청구항에 결합될 수 있다.By using the above-described embodiments of the present invention, those skilled in the art will be able to easily implement various changes and modifications within the scope without departing from the essential characteristics of the present invention. The content of each claim in the claims may be combined with other claims without reference within the scope that can be understood through this specification.

Claims (11)

연산장치 및 PMIC를 포함하는 단말기로서,
상기 연산장치는, 상기 단말기의 부트로더가 실행되는 동안 상기 PMIC가 제어하는 와치도그를 비활성화하라는 제1명령을 상기 PMIC에게 전달하도록 되어 있고,
상기 PMIC는, 상기 제1명령에 따라 상기 와치도그를 비활성화하도록 되어 있고,
상기 연산장치는, 상기 단말기에서 실행되는 응용프로그램이 상기 와치도그를 활성화하라는 콜(call)을 발생시키면, 상기 와치도그를 활성화하라는 제2명령을 상기 PMIC에게 전달하도록 되어 있고,
상기 PMIC는, 상기 제2명령에 따라 상기 와치도그를 활성화하도록 되어 있는,
단말기.
A terminal including an arithmetic unit and a PMIC, comprising:
the arithmetic unit transmits to the PMIC a first command to deactivate a watchdog controlled by the PMIC while the bootloader of the terminal is running;
the PMIC is configured to deactivate the watchdog according to the first command;
the arithmetic unit, when an application program executed in the terminal generates a call to activate the watchdog, transmits a second command to activate the watchdog to the PMIC;
the PMIC is configured to activate the watchdog according to the second command;
terminal.
제1항에 있어서,
상기 PMIC는, 상기 제2명령에 따라 상기 와치도그를 활성화한 이후에 상기 와치도그의 타이머를 초기화하여 상기 타이머를 실행하도록 되어 있고, 그리고, 상기 타이머가 만료되면 시스템 리셋신호를 출력하도록 되어 있는,
단말기.
The method of claim 1,
the PMIC is configured to initialize a timer of the watchdog after activating the watchdog according to the second command to execute the timer, and output a system reset signal when the timer expires;
terminal.
제2항에 있어서, 상기 시스템 리셋신호는 상기 단말기에 포함된 디바이스들 중에서 상기 PMIC를 제외한 다른 디바이스에 제공되도록 되어 있는, 단말기.The terminal according to claim 2, wherein the system reset signal is provided to devices other than the PMIC among devices included in the terminal. 제1항에 있어서, 상기 응용프로그램은, 상기 와치도그를 활성화하라는 콜을 미리 설정된 스케쥴에 따라 반복적으로 발생하도록 되어 있는, 단말기.The terminal of claim 1, wherein the application program repeatedly generates a call to activate the watchdog according to a preset schedule. 제4항에 있어서, 상기 응용프로그램은, 상기 와치도그를 활성화하라는 콜을 미리 결정된 제3주기에 따라 반복적으로 발생하도록 되어 있는, 단말기.The terminal according to claim 4, wherein the application program is configured to repeatedly generate a call to activate the watchdog according to a third predetermined period. 제5항에 있어서,
상기 PMIC는, 상기 제2명령에 따라 상기 와치도그를 활성화한 이후에 상기 와치도그의 타이머를 초기화하여 상기 타이머를 실행하도록 되어 있고,
상기 타이머가 만료되면 시스템 리셋신호를 출력하도록 되어 있으며, 그리고
상기 제3주기는, 상기 타이머의 리셋과 상기 타이머의 만료(expire)까지의 제2주기보다 짧은, 단말기.
6. The method of claim 5,
the PMIC is configured to initialize a timer of the watchdog to execute the timer after activating the watchdog according to the second command;
output a system reset signal when the timer expires, and
The third period is shorter than a second period from reset of the timer to expiration of the timer.
연산장치 및 PMIC를 포함하는 단말기를 제어하는 단말기 제어방법으로서,
상기 연산장치가, 상기 단말기의 부트로더가 실행되는 동안 상기 PMIC가 제어하는 와치도그를 비활성화하라는 제1명령을 상기 PMIC에게 전달하는 단계;
상기 PMIC가, 상기 제1명령에 따라 상기 와치도그를 비활성화하는 단계;
상기 연산장치가, 상기 단말기에서 실행되는 응용프로그램이 상기 와치도그를 활성화하라는 콜(call)을 발생시키면, 상기 와치도그를 활성화하라는 제2명령을 상기 PMIC에게 전달하는 단계; 및
상기 PMIC가, 상기 제2명령에 따라 상기 와치도그를 활성화하는 단계;
를 포함하는,
단말기 제어방법.
A terminal control method for controlling a terminal including an arithmetic unit and a PMIC, comprising:
transmitting, by the arithmetic unit, a first command to deactivate a watchdog controlled by the PMIC to the PMIC while the boot loader of the terminal is running;
deactivating, by the PMIC, the watchdog according to the first command;
transmitting, by the arithmetic unit, a second command to activate the watchdog to the PMIC when the application program executed in the terminal generates a call to activate the watchdog; and
activating, by the PMIC, the watchdog according to the second command;
containing,
terminal control method.
제7항에 있어서,
상기 PMIC가, 상기 제2명령에 따라 상기 와치도그를 활성화한 이후에 상기 와치도그의 타이머를 초기화하여 상기 타이머를 실행하는 단계;
를 더 포함하며,
상기 PMIC는, 상기 타이머가 만료되면 시스템 리셋신호를 출력하도록 되어 있는,
단말기 제어방법.
8. The method of claim 7,
after the PMIC activates the watchdog according to the second command, initializes a timer of the watchdog and executes the timer;
further comprising,
The PMIC is configured to output a system reset signal when the timer expires,
terminal control method.
제8항에 있어서,
상기 응용프로그램은, 상기 와치도그를 활성화하라는 콜을 미리 결정된 제3주기에 따라 반복적으로 발생하도록 되어 있고, 그리고
상기 제3주기는, 상기 타이머의 리셋과 상기 타이머의 만료(expire)까지의 제2주기보다 짧은,
단말기 제어방법.
9. The method of claim 8,
The application program is configured to repeatedly generate a call to activate the watchdog according to a third predetermined period, and
The third period is shorter than the second period between the reset of the timer and the expiration of the timer,
terminal control method.
제8항에 있어서, 상기 시스템 리셋신호는 상기 단말기에 포함된 디바이스들 중에서 상기 PMIC를 제외한 다른 디바이스에 제공되도록 되어 있는, 단말기 제어방법.The method of claim 8, wherein the system reset signal is provided to other devices except for the PMIC among devices included in the terminal. 제7항에 있어서, 상기 응용프로그램은, 상기 와치도그를 활성화하라는 콜을 미리 설정된 스케쥴에 따라 반복적으로 발생하도록 되어 있는, 단말기 제어방법.The method of claim 7, wherein the application program repeatedly generates a call to activate the watchdog according to a preset schedule.
KR1020210182084A 2021-12-17 2021-12-17 Method for monitoring and controlling status of an embedded terminal device using Power Management IC and an embedded terminal device for the same KR102384589B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210182084A KR102384589B1 (en) 2021-12-17 2021-12-17 Method for monitoring and controlling status of an embedded terminal device using Power Management IC and an embedded terminal device for the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210182084A KR102384589B1 (en) 2021-12-17 2021-12-17 Method for monitoring and controlling status of an embedded terminal device using Power Management IC and an embedded terminal device for the same

Publications (1)

Publication Number Publication Date
KR102384589B1 true KR102384589B1 (en) 2022-04-08

Family

ID=81183146

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210182084A KR102384589B1 (en) 2021-12-17 2021-12-17 Method for monitoring and controlling status of an embedded terminal device using Power Management IC and an embedded terminal device for the same

Country Status (1)

Country Link
KR (1) KR102384589B1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170095759A (en) * 2016-02-15 2017-08-23 페어차일드 세미컨덕터 (쑤저우) 컴퍼니 리미티드 Apparatus and method for restarting an electronic device
KR101947487B1 (en) * 2018-04-12 2019-05-02 주식회사 케이디티 monitoring control device for automatic data recovery
KR20210031317A (en) * 2019-09-11 2021-03-19 주식회사 엘지화학 Watchdog system, method of watchdog, and battery management system comprising the watchdog system
KR20210045768A (en) * 2019-10-17 2021-04-27 삼성전자주식회사 Electronic device including power management integrated circuit and method for recovering abnormal state of the electronic device
US20210191795A1 (en) * 2019-12-20 2021-06-24 Qualcomm Incorporated Warm mission-mode reset in a portable computing device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170095759A (en) * 2016-02-15 2017-08-23 페어차일드 세미컨덕터 (쑤저우) 컴퍼니 리미티드 Apparatus and method for restarting an electronic device
KR101947487B1 (en) * 2018-04-12 2019-05-02 주식회사 케이디티 monitoring control device for automatic data recovery
KR20210031317A (en) * 2019-09-11 2021-03-19 주식회사 엘지화학 Watchdog system, method of watchdog, and battery management system comprising the watchdog system
KR20210045768A (en) * 2019-10-17 2021-04-27 삼성전자주식회사 Electronic device including power management integrated circuit and method for recovering abnormal state of the electronic device
US20210191795A1 (en) * 2019-12-20 2021-06-24 Qualcomm Incorporated Warm mission-mode reset in a portable computing device

Similar Documents

Publication Publication Date Title
US10585755B2 (en) Electronic apparatus and method for restarting a central processing unit (CPU) in response to detecting an abnormality
US6874103B2 (en) Adapter-based recovery server option
US20140143477A1 (en) Computer system and data recovery method thereof
WO2018095107A1 (en) Bios program abnormal processing method and apparatus
US20160253233A1 (en) Watchdog Timer
US7194614B2 (en) Boot swap method for multiple processor computer systems
US9889762B2 (en) Control system for charging vehicle battery in response to an unstable state
US7428660B2 (en) Starting control method, duplex platform system, and information processor
US11073893B2 (en) System and method capable of remotely controlling electronic apparatus
KR102384589B1 (en) Method for monitoring and controlling status of an embedded terminal device using Power Management IC and an embedded terminal device for the same
CN114866404A (en) Intelligent gateway disaster recovery method and device, electronic equipment and storage medium
CN113608930A (en) System chip and electronic device
KR101369430B1 (en) Apparatus and method for hang up management
JP2735514B2 (en) Process status management method
US20170344360A1 (en) Protecting firmware flashing from power operations
CN114117562B (en) Intelligent network card management method and device, electronic equipment and computer storage medium
KR102438148B1 (en) Abnormality detection apparatus, system and method for detecting abnormality of embedded computing module
US20200026682A1 (en) Techniques of accessing serial console of bmc using host serial port
CN108897248A (en) A kind of self―tuning control and mobile robot
CN116991637B (en) Operation control method and device of embedded system, electronic equipment and storage medium
KR101389976B1 (en) Apparatus and method for hang up management of mobile terminal
JP2019191942A (en) Control device and function inspection method
JP2007323601A (en) Automatically restorable computer
JP7001236B2 (en) Information processing equipment, fault monitoring method, and fault monitoring computer program
JP2004094455A (en) Computer system

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