CN110018921B - Event recording controller and electronic device - Google Patents

Event recording controller and electronic device Download PDF

Info

Publication number
CN110018921B
CN110018921B CN201811617681.0A CN201811617681A CN110018921B CN 110018921 B CN110018921 B CN 110018921B CN 201811617681 A CN201811617681 A CN 201811617681A CN 110018921 B CN110018921 B CN 110018921B
Authority
CN
China
Prior art keywords
event
specific
detecting
recording
processor
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811617681.0A
Other languages
Chinese (zh)
Other versions
CN110018921A (en
Inventor
梁正明
赵慕霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nuvoton Technology Corp
Original Assignee
Nuvoton Technology Corp
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 Nuvoton Technology Corp filed Critical Nuvoton Technology Corp
Publication of CN110018921A publication Critical patent/CN110018921A/en
Application granted granted Critical
Publication of CN110018921B publication Critical patent/CN110018921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1673Details of memory controller using buffers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Automation & Control Theory (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides an event recording controller and an electronic device, wherein the event recording controller for the electronic device comprises an event detection unit and an event recording unit. The event detection unit is used for continuously detecting whether one of a plurality of specific events occurs. In addition, the event detecting unit is configured to send a recording instruction corresponding to one of the specific events to the event recording unit in response to detecting that the one of the specific events occurs. The event recording unit is configured to automatically record event information corresponding to the specific event that has occurred from one or more elements of the plurality of elements of the electronic device to a battery backup memory according to an instruction of the recording instruction, without being controlled by a processor of the electronic device, in response to the received recording instruction.

Description

Event recording controller and electronic device
Technical Field
The present invention relates to a controller, and more particularly, to an event logging controller and an electronic device.
Background
When a system (electronic device/computer host/server) generates a Fatal error (Fatal error), the most difficult case to debug is when it happens, and where it happens (which component). Therefore, the situation is often experienced after the occurrence, and the main cause of the occurrence is not existed. Currently, the debugging technology is designed from the perspective of a processor by using the processor as a core, and records the footprint of a program and the usage history of a memory by the control of the processor. If the processor itself has a problem or an error, the reason or related information of the error cannot be recorded.
In addition, the general debugging technology can only be used in the stage of developing the system or developing the related application programs, and must cooperate with the processor to execute the debugging Tool (Debug Tool) software. However, once a system is developed and introduced into the market, the system may still go wrong (the debugging tool is no longer used), and the error may directly affect the user, resulting in poor system appearance and reduced work efficiency.
Therefore, how to efficiently record the system errors without the control of a processor is a problem to be solved by the technical personnel.
Disclosure of Invention
The invention provides an event recording controller and an electronic device with the same, which can detect the occurrence of a specific event and send a recording instruction corresponding to the specific event so as to record event information corresponding to the specific event without the control of a processor of the electronic device.
An embodiment of the invention provides an event logging controller suitable for an electronic device. The electronic device comprises a plurality of elements, wherein the plurality of elements comprises a processor. The event recording controller comprises an event detection unit and an event recording unit. The event detection unit is coupled to the plurality of elements of the electronic device and configured to continuously detect whether one of a plurality of specific events occurs. The event logging unit is coupled to the event detection unit. In addition, the event detecting unit is configured to send a recording instruction corresponding to one of the specific events to the event recording unit in response to detecting that the one of the specific events occurs. The event recording unit is used for automatically recording event information corresponding to the specific event to a battery backup memory from one or more elements indicated by the recording instruction in the plurality of elements without control of the processor in response to the received recording instruction.
An embodiment of the invention provides an electronic device. The electronic device includes a processor, a battery backup memory, and an event logging controller. The event logging controller is coupled to the processor and the battery-backed memory. The event recording controller is used for continuously detecting whether one of a plurality of specific events occurs, wherein when the specific events occur, the processor cannot normally operate. The event logging controller is further configured to automatically log event information corresponding to a specific event from an element of the electronic device to the battery-backed-up memory without being controlled by the processor in response to detecting the occurrence of the specific event among the plurality of specific events
Based on the above, the event logging controller provided in the embodiments of the present invention can automatically log event information corresponding to a specific event (error event) to a battery backup memory from one or more elements of the electronic device in response to the occurrence of the detected specific event, without being controlled by a processor of the electronic device to which the specific event belongs, so that the information related to the specific event can still be rapidly logged even if the processor fails to operate normally, and relevant personnel can know and correct the cause of the specific event occurring according to the logged information, thereby improving the overall performance of the electronic device.
In order to make the aforementioned and other features and advantages of the invention more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
Fig. 1 is a block diagram illustrating an event logging controller and an electronic device thereof according to an embodiment of the invention.
Fig. 2 is a flowchart illustrating an operation of the event logging controller according to an embodiment of the invention.
Reference numerals:
10: electronic device
110: event recording controller
111: event detection unit
112: event recording unit
120: battery backup memory
130: processor with a memory having a plurality of memory cells
140: interrupt controller
150: main memory
160. 160 (1), 160 (2) to 160 (N): peripheral device
170: system bus/bus
S21, S23, S25: operating procedure of event recording controller
Detailed Description
The spirit of the present invention is to take this point of time as the point of time when the Snapshot (Snapshot) is executed when the occurrence of a fatal error/error event of the system (electronic device) is detected. Then, corresponding to the various fatal errors respectively, a snapshot is performed to a plurality of places (different components of the system/electronic device) to take a picture or photograph of the place (corresponding to the information related to the different components of the system/electronic device corresponding to the fatal error), and the picture is stored in a memory capable of being stored quickly. It should be noted that, in order to quickly store the relevant information when the specific fatal error/error event occurs, the memory adopted in the present embodiment is a volatile memory with higher access speed than a general non-volatile memory, and a (rechargeable) battery is used for supplying power, so that the volatile memory can store data for a long time.
Fig. 1 is a block diagram illustrating an event logging controller and an electronic device thereof according to an embodiment of the invention.
Referring to fig. 1, the electronic device 10 with the event logging controller 110 further includes a Battery backup memory (Battery backup memory) 120, a processor 130, an interrupt controller 140, a main memory 150, and a peripheral device 160.
In the present embodiment, the event logging controller 110 includes an event detecting unit 111 and an event logging unit 112. The event detecting unit 111 is configured to detect an occurrence of a specific event (in the background), and the event recording unit 112 is configured to record event information (in the background) corresponding to the occurred specific event. The electronic device having the event logging controller 110 may have a function of detecting and recording event information corresponding to a specific event occurred (in the background) because of the event logging controller. It should be noted that when a fatal error occurs in a system (electronic device), the processor 130 cannot operate normally.
In the present embodiment, the battery backup memory 120 includes a battery and a volatile memory coupled to the battery. Such as Static Random Access Memory (SRAM) or other volatile memory having the same speed or higher. Because the battery can provide power to the SRAM, the data recorded by the SRAM can be preserved for a long time and is not lost because the electronic device stops supplying power. The battery may be recharged when the electronic device 10 is powered on. In other words, the battery backup memory 120 can also be regarded as a high-speed volatile memory that does not require an external power source and can store data for a long time. Such as a rechargeable lithium battery or other suitable rechargeable battery.
The processor 130 includes a Register (Register) and circuit units for performing control, operation, and the like. The processor 130 is computing hardware (e.g., chipset, processor, etc.) for managing the overall operation of the electronic device 10. In the embodiment, the Processor 130 is, for example, a core or a multi-core Central Processing Unit (CPU), a micro-Processor (micro-Processor), or other Programmable Processing Unit (Programmable Processor), a Digital Signal Processor (DSP), a Programmable controller, an Application Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), or the like. It should be noted that in the present embodiment, the event logging controller 110 can operate independently from the processor 130.
The interrupt controller 140 is configured to monitor exception conditions occurring in the processor 130 and each of the peripheral devices 160 (1) to 160 (N), and generate an interrupt event according to different exception conditions to further handle the exception conditions.
The main memory 150 may be used for temporarily storing data and instructions from the processor 130, or the main memory 150 may be used for temporarily storing data from the peripheral device 160. The main memory 150 is, for example, a Random Access Memory (RAM).
The peripheral device 160 includes a plurality of peripheral devices 160 (1) to 160 (N). The peripheral devices 160 (1) to 160 (N) may be, for example, peripheral control circuit units such as an analog-to-digital converter (ADC), a digital-to-analog converter (DAC), a Serial Peripheral Interface (SPI), an integrated circuit bus (I2C), and may also be, for example, a power management device, a storage device, a communication device, and a sensor.
In the present embodiment, the components 110 to 160 can be connected and transmit data/signals through a System bus (System bus) 170.
Fig. 2 is a flowchart illustrating an operation of the event logging controller according to an embodiment of the invention. Referring to fig. 1 and fig. 2, in step S21, the event detecting unit 111 continuously detects whether one or more of a plurality of specific events occur. If the occurrence of one or more specific events is detected, in response to the occurrence of one or more specific events of the plurality of specific events being detected (step S21 → yes), in step S23, the event detecting unit 111 sends a recording instruction corresponding to the one or more specific events that occurred to the event recording unit. Otherwise (step S21 → no), the whole operation flow re-executes step S21, i.e. the event detecting unit 111 continues to continuously detect whether a specific event occurs. A plurality of specific events detectable by the event detecting unit 111 and corresponding detection methods/criteria are described below using a plurality of examples. That is, various timing points at which the snapshot is executed (the matching condition of step S21 → S23) will be described.
In one embodiment, the event detecting unit 111 (or the electronic device 10) includes a counter. After the electronic device 10 is powered on, the counter continuously counts from a predetermined value (which may be set to count down or count in an accumulated manner), wherein the counter counts again from the predetermined value when the counter receives an update signal from the processor 130, and wherein the counter sends a reset signal to the processor 130 to reset the electronic device 10 (or the processor 10) when the counter counts to a target value. Wherein the processor is programmed via the event detecting unit 111 to send the update signal to the counter every time a predetermined period elapses, wherein the predetermined period is less than a time for the counter to count from the predetermined value to the target value. The counter and associated mechanism may also be referred to as a watchdog (Watch dog) mechanism.
For example, assume that the predetermined value is 3000, the target value is 0, and the counter counts down the predetermined value to the target value at a rate of 1 every 1 millisecond. The predetermined period may be set (programmed) to 2800 milliseconds, for example. That is, each time before the counter counts down to 0, because the predetermined period is less than the time (3000 milliseconds) from the predetermined value to the target value. Therefore, under normal conditions, the counter will always count down again according to the update signal from the processor 130. However, in some cases where the processor 130 fails, the processor 130 itself may enter a dead loop or be dead. At this time, the processor 130 cannot send the update signal to the counter, in which case the counter counts down to the target value, and sends the reset signal to the processor 130 to forcibly reset the processor 130. In another embodiment, the counter sends a reset signal to the predetermined elements to force the predetermined elements when the counter counts to the target value.
In this embodiment, the event detection unit 111 continues to detect whether the counter sends a reset signal in the background (i.e., the event detection unit 111 continues to listen to the counter). When the event detecting unit 111 detects that the counter transmits the reset signal, the event detecting unit 111 considers that a fatal error/deadtime cycle occurs to the processor 130, and determines that a first specific event among the plurality of specific events occurs. Then, in response to detecting that the first specific event occurs, the event detecting unit 111 sends a first recording instruction corresponding to the first specific event to the event recording unit 112.
Referring back to fig. 2, in step S25, the event recording unit 112 automatically records event information corresponding to the one or more specific events to the battery backup memory from one or more elements indicated by the recording instruction in the elements of the electronic device without the control of the processor 130.
For example, the event detecting unit 111 automatically generates a first recording command corresponding to a first specific event in the background without being controlled by the processor 130 (i.e., the processor 130 cannot interfere with or know the recording operation performed by the event recording controller), and transmits the generated first recording command to the event recording unit 112, so that the event recording unit 112 performs one or more recording operations according to the first recording command in the background.
The content of the first recording instruction includes one or a combination of the following recording operations (first to eighth recording operations) that instruct the event recording unit 112 to execute: (1) The first recording operation copies the specified material (the event information) from the processor 130 to the battery backup memory 120. Specifically, the instruction data may include data/values stored by a Register (Register) of a particular processor 130. More specifically, the register is, for example, a Program Counter (PC), and the stored data/value includes information indicating the instruction sequence to be executed next by the processor. Depending on the hardware details of a particular processor, the program counter may hold the instruction being executed or may be the address of the next instruction to be executed. The program counter is automatically incremented each instruction cycle so that instructions are normally fetched from the register in succession. The logger may also be a Stack pointer (Stack pointer) that stores the address of the last program request in the Stack. A stack is a special buffer register that stores data from top to bottom. The address of the newly entered program request will reside at the top of the stack. In other words, by stacking the addresses in the pointer, it is known which processes are executed by the processor 130. It should be noted that the present invention is not limited to the contents of the logger of the processor copied by the first recording operation. The manufacturer can set the destination (the data of the logger to be copied) of the corresponding first recording operation corresponding to different recording commands according to the requirement.
(2) The second recording operation copies all data stored in the designated section of the main memory 150 to the battery backup memory 120. Specifically, in the second recording operation, the event recorder unit 112 copies the data (values) stored in the memory segment to the battery backup memory 120 according to the recording command instructing the second recording operation to be executed to the one or more memory address segments specified by the corresponding recording command in the main memory 150.
(3) The third recording operation copies the data of the register of the designated element(s) of the plurality of elements (e.g., elements 130, 140, 150, 160) of the electronic device 10 to the battery backup memory 120. Specifically, similar to the first recording operation, in the second recording operation, the event recording unit 112 copies the data stored in the register of the element indicated by the recording instruction to the battery backup memory 120 according to the recording instruction for instructing the execution of the third recording operation.
(4) The fourth recording operation records a plurality of sensing data respectively sensed by a plurality of sensors of the electronic device 10 in the battery backup memory 120. Specifically, the electronic device 10 (or the components included therein) may have a plurality of sensors, such as sensors that may sense temperature, voltage values, current values, and the like. The event recording unit 112 may copy the sensing data sensed by the sensor into the sensor indicated by the recording instruction to the battery backup memory 120 according to the recording instruction for instructing the fourth recording operation.
(5) A fifth recording operation of recording the current time of the electronic device 10 corresponding to the specific event occurred to the battery backup memory 120. Specifically, the recording instruction for instructing the execution of the fifth recording operation is to enable the event recording unit 112 to record the time when the corresponding specific event occurs at present via the internal clock of the electronic device 10.
(6) A sixth recording operation of copying an Event log (Event log) of an element corresponding to a specific Event occurred among the plurality of elements of the electronic apparatus 10 to the battery backup memory 120. Specifically, in the sixth recording operation, the event recording unit 112 copies the current event log of the element to the battery backup memory 120 according to the recording command for instructing the execution of the sixth recording operation to the element (or other storage unit/storage device for storing the event log of the element) indicated by the recording command.
(7) The seventh recording operation copies the information the recording instruction has to the battery backup memory 120. Specifically, the event recording unit 112 directly copies all or part of the specified data/information in the recording command to the battery backup memory 120 according to the recording command for instructing to perform the seventh recording operation. For example, an operating system or an application program executing in the processor 130 may send a log event command with specific information to the event logging controller 110 at a specific time point to log specific information in the battery backup memory 120. After receiving the record event command, the event detecting unit 111 transfers the record event command to the event recording unit 112 (as a record command for executing a seventh record operation to the event recording unit) or generates a record command including the content of the record event command and other record operations to the event recording unit 112.
(8) An eighth recording operation copies information corresponding to the interrupt event to the battery backup memory 120. Specifically, the interrupt controller 140 executes an interrupt event according to the detected exception event. At this time, in the eighth recording operation, the event recording unit 112 may record all or part of the command information/data of the interrupt event to the battery backup memory 120.
It should be noted that, for example, in response to a first specific event occurring, a manufacturer may set which recording operations are executed by the first recording command generated by the event detecting unit 111, or executed sequentially according to a specific sequence of the recording operations.
It should be noted that the event recording unit 112 may perform one or more of the recording operations described above according to different recording commands, and reproduce related information from different locations. In addition to the specific events corresponding to the watchdog mechanism described above, the following description continues with various other specific events detectable by the event detection unit 111 and corresponding detection methods/criteria.
In an embodiment, the event detecting unit 111 continuously detects the voltage value and the voltage variation value of each of the plurality of elements of the electronic device 10, wherein in response to detecting that the voltage variation value of the target element of the plurality of elements is greater than a predetermined variation threshold value, the event detecting unit 111 determines that a second specific event of the plurality of specific events occurs. In response to detecting the second specific event, the event detecting unit 111 sends a second recording instruction corresponding to the second specific event to the event recording unit. Specifically, when the event detecting unit 111 detects that an element of the electronic device 10 has an abnormal voltage variation (the event detecting unit 111 may set a predetermined variation threshold corresponding to different elements for different elements), the event detecting unit 111 determines that a second specific event occurs. In particular, for a processor error caused by a Voltage Drop (Voltage Drop) of the processor 130 to an excessively low Voltage, or a breakdown of the entire electronic device 10, by detecting whether the second specific event occurs, related information/data can be recorded in the battery backup memory 120 immediately before the processor 130 fails.
In one embodiment, the event detecting unit 111 continuously listens to the interrupt controller 140 to determine whether the third specific event occurs. Specifically, when the interrupt controller 140 sends an interrupt event, the event detection unit 111 may receive the interrupt event, and in response to the interrupt event received from the interrupt controller, the event detection unit 111 determines that a third specific event among the specific events occurs. In response to detecting that the third specific event occurs, the event detecting unit 111 sends a third recording instruction corresponding to the third specific event to the event recording unit 112. The third recording instruction may be used to instruct the event recording unit 112 to perform the eighth recording operation (or perform other recording operations) described above, for example. That is, by detecting whether the third specific event occurs, the event recording controller 110 can record the related information to the battery backup memory 120 at the same time when the interrupt event occurs.
In one embodiment, the processor 130 sends a record event command to the event detecting unit 111 according to the executed application program. In response to the received record event instruction, the event detection unit 111 determines that a fourth specific event of the plurality of specific events occurs. In response to detecting that the fourth specific event occurs, the event detecting unit sends a fourth recording instruction corresponding to the fourth specific event to the event recording unit 112. That is, the event logging controller 110 provides a function such that an application program or software executed in the processor 130 can directly send an event logging command for logging specific events/specific information to the event logging controller 110, so that the event logging controller 110 logs the specific events/specific information to the battery-backed memory 120. In addition, the event logging controller 110 can also log more information related to the specific event/specific information into the battery backup memory 120.
In one embodiment, the event detecting unit 111 determines whether a first target address of the main memory 150 is written with a specific value. Specifically, the event detection unit 111 can actively monitor whether a specific sector (a first target address) of the main memory 150 is written with specific data. If so, in response to determining that the particular value is written to the first target address, the event detection unit 111 determines that a fifth particular event of the plurality of particular events occurs. In response to detecting the occurrence of the fifth specific event, the event detecting unit sends a fifth recording command corresponding to the fifth specific event to the event recording unit 112 (if the value written by the first target address is not the specific value, it is not determined that the fifth specific event occurs). That is, the manufacturer can set the first target address and the corresponding specific value according to the specific event or its own requirement, and can also set the content of the fifth recording command. Then, by detecting whether a fifth specific event occurs (detecting that the event of the special case occurs), the event logging controller 110 can log related information to the battery backup memory 120 according to the set fifth logging command. It should be noted that, in another embodiment, the fifth recording instruction may be used to instruct one or more of the above-mentioned recording operations to be continuously and repeatedly executed over time, so that a similar effect of recording the occurrence location of the special event is achieved (conversely, a recording operation executed only once may be regarded as a "photographing" effect).
In one embodiment, the event detecting unit 111 detects whether the second target address of the main memory 150 is accessed. In response to detecting that the second target address is accessed, the event detection unit 111 determines that a sixth specific event of the plurality of specific events occurs. Similar to the above-mentioned method for determining the occurrence of the sixth specific event, the event detecting unit 111 also detects the specific section (the second target address) of the main memory 150, but the difference is that the event detecting unit 111 only needs to detect whether the second target address is accessed, and does not need to check whether a specific value is written. In response to detecting that the sixth specific event occurs, the event detecting unit 111 sends a sixth recording instruction corresponding to the sixth specific event to the event recording unit 112. The manufacturer can set the contents of the second target address and the sixth recording command. It should be noted that, in another embodiment, the sixth recording command may also be used to instruct one or more of the above-mentioned recording operations to be continuously and repeatedly executed over time, so that a similar effect of recording the occurrence location of the special event is achieved.
In one embodiment, the event detection unit 111 detects whether an error occurs on the bus 170. In response to detecting the occurrence of an error on the bus 170, the event detecting unit 111 determines that a seventh specific event among the plurality of specific events occurs. In response to detecting that the seventh specific event occurs, the event detecting unit 11 sends a seventh recording instruction corresponding to the seventh specific event to the event recording unit 112. That is, the event detecting unit 111 can detect whether an error occurs in the bus 170 for connecting all the components of the electronic device. That is, by detecting whether the seventh specific event occurs, the event logging controller 110 can record related information to the battery backup memory 120 at the same time when the bus error occurs.
In one embodiment, the processor 130 may be disabled when one or more of the specific events occurs. That is, in this embodiment, when a specific event occurs or a plurality of specific events occur simultaneously/successively, the processor 130 may not operate normally (e.g., stop operating or operate abnormally). For example, the processor 130 cannot perform an operation or process according to the program that is originally executed. As another example, the processor 130 itself may be operating down or dead. In this case, the event logging controller 110 according to the embodiment of the invention can automatically generate the corresponding logging instruction to perform the corresponding logging operation without relying on the processor 130 to actively detect the occurrence of the one or more specific events, so as to log the event information corresponding to the one or more specific events without the need of the processor 130.
It should be noted that, in an embodiment, the event detecting unit 111 continuously detects whether a plurality of specific events among the plurality of specific events occur (S21), and sends corresponding recording instructions to the event recording unit 112 in response to the detected occurrence of the plurality of specific events (S23), so that the event recording unit 112 can perform one or more of the above-mentioned recording operations according to the one or more recording instructions without control of the processor 130, thereby achieving automatic recording of event information corresponding to the plurality of specific events that occur from one or more elements of the plurality of elements of the electronic device 10 indicated by the recording instructions to the battery backup memory 120 (S25). In other words, the event detecting unit 111 may continuously detect whether one or more of the first to seventh specific events occur (simultaneously or together within a predetermined period), and accordingly generate a corresponding recording instruction to instruct the event recording unit 112 to record the related event information.
It should be noted that, in the embodiment, when the available space of the battery backup memory 120 is insufficient, the oldest stored data is directly overwritten. In addition, in one embodiment, when the available space of the battery backup memory 120 is insufficient, the least important data of the stored data is directly overwritten (the manufacturer may set the importance of the first to seventh specific events).
However, in another embodiment, the data stored in the battery-backed up memory 120 is not overwritten. The data stored in the battery backup memory 120 is cleared until the stored data is properly read (e.g., backed up by the user or a related person via software of the corresponding event log controller to another reliable storage device) and a specific reset command is issued. In this alternative embodiment, the event logging controller 110 may issue an alert notification when the battery backed up memory 120 does not have any space available.
In addition, if the electronic device 10 is idle, the event logging controller 110 can also move (back-up) the data stored in the battery backup memory 120 from old to new to a hidden area (or a non-hidden area) in the storage device of the electronic device 10. The space in the storage device for storing the moved data originally stored in the battery-backed up memory 120 is limited.
In addition, in one embodiment, the event logging controller 110 can also upload the recorded data to a cloud server installed by the manufacturer through a network connection at a specific time point. The specific timing point is, for example, when the electronic device 10 performs maintenance, actively asks the user and obtains permission, and updates the system (or operating system) used by the electronic device 10.
It should be noted that, in one embodiment, the event logging unit 112 may repeatedly perform one or more logging operations during a logging period according to corresponding logging instructions. Specifically, in order to continuously record the related information/data at a plurality of current and subsequent time points after a specific event occurs, the recording command generated by the event detecting unit 111 may instruct one or more recording operations to be repeatedly performed during the recording period, or may respectively set the number of times each recording operation is performed and the time point at which each recording operation is performed. The recording period may be set to one or more time periods or unlimited time lengths.
In the embodiment, the data uploaded to the cloud server, backed up in the storage device or recorded in the battery backup memory 120 can be used to identify the hardware status of the current one or more components of the electronic device 10 when the corresponding specific event occurs, the contents of the loggers of the various components, the various programs executed and related contents (the footprint of the program, the contents of the memory, the programs being executed and executed), the data sensed by the sensor, the time, and the like, so as to analyze the reason for the occurrence of the specific event, thereby solving the reasons for the occurrence of the specific event and improving the overall architecture of the electronic device 10 and the functions of the components.
In summary, the event logging controller provided in the embodiments of the present invention can automatically log event information corresponding to a specific event (error event) to a battery backup memory from one or more elements of the electronic device in response to the occurrence of the detected specific event without being controlled by a processor of the electronic device to which the specific event belongs, so that the information related to the specific event can still be rapidly logged even if the processor fails to operate normally, and relevant personnel can know and correct the cause of the specific event occurring according to the logged information, thereby improving the overall performance of the electronic device.
Although the present invention has been described with reference to the above embodiments, it should be understood that various changes and modifications can be made therein by those skilled in the art without departing from the spirit and scope of the invention.

Claims (9)

1. An event logging controller adapted for use with an electronic device comprising a plurality of components, wherein said components include a processor, said event logging controller operating independently of said processor, said event logging controller comprising:
an event detection unit, coupled to the component of the electronic device, for continuously detecting whether one or more of a plurality of specific events occur; and
an event recording unit coupled to the event detecting unit,
wherein the event detecting unit is configured to, in response to detecting that the one or more specific events of the specific events occur, cause the processor to generate an abnormal operation condition when the one or more specific events of the specific events occur, so as to send a recording instruction corresponding to the one or more specific events to the event recording unit,
wherein the event logging unit is configured to automatically log event information corresponding to the one or more specific events that occur from one or more of the components indicated by the logging instruction to a battery-backed memory, the battery-backed memory including a battery and a volatile memory coupled to the battery, the volatile memory being a static random access memory or other volatile memory having the same speed or higher, in response to the received logging instruction, without control by the processor.
2. The event log controller of claim 1, wherein the event detection unit comprises a counter, wherein the counter continues to count from a predetermined value after the electronic device is powered on, wherein the counter recounts from the predetermined value when the counter receives the update signal from the processor, wherein the counter sends a reset signal to the processor to reset the electronic device when the counter counts to a target value, wherein the processor is programmed to send the update signal to the counter every predetermined period that elapses, wherein the predetermined period is less than a time the counter counts from the predetermined value to the target value,
wherein in the operation of continuously detecting whether one or more of the specific events occur,
the event detection unit detects whether the counter sends the reset signal,
wherein the event detecting unit determines that a first specific event among the specific events occurs in response to the event detecting unit detecting that the counter transmits the reset signal,
in response to detecting the first specific event, the event detecting unit sends a first recording command corresponding to the first specific event to the event recording unit.
3. The event logging controller of claim 2, wherein during said operation of continuously detecting the occurrence of one or more of said particular events,
the event detection unit continuously detects the respective voltage values and voltage variation values of the elements,
wherein in response to detecting that the voltage variation of a target element of the elements is greater than a predetermined variation threshold, the event detection unit determines that a second specific event among the specific events occurs,
in response to detecting the second specific event, the event detecting unit sends a second recording command corresponding to the second specific event to the event recording unit.
4. The EVRC of claim 3, wherein the components further comprise an interrupt controller, wherein in the operation of continuously detecting whether one or more of the specific events occur,
in response to an interrupt event received from the interrupt controller, the event detection unit determines that a third specific event among the specific events occurs,
in response to detecting the third specific event, the event detecting unit sends a third recording command corresponding to the third specific event to the event recording unit.
5. The EVRC controller of claim 4, wherein the processor executes an application program, wherein during the operation of continuously detecting the occurrence of one or more of the specific events,
the processor sends a recorded event command to the event detecting unit according to the application program,
wherein in response to the received record event command, the event detection unit determines that a fourth specific event of the specific events occurs,
in response to detecting the occurrence of the fourth specific event, the event detecting unit sends a fourth recording command corresponding to the fourth specific event to the event recording unit.
6. The event log controller of claim 5, wherein said component includes a main memory, wherein in said operation of continuously detecting the occurrence of one or more of said particular events,
the event detecting unit determines whether a first target address of the main memory is written with a specific value,
wherein in response to determining that the specific value is written to the first target address, the event detection unit determines that a fifth specific event among the specific events occurs,
in response to detecting the occurrence of the fifth specific event, the event detecting unit sends a fifth recording command corresponding to the fifth specific event to the event recording unit.
7. The event logging controller of claim 6, wherein during said operation of continuously detecting the occurrence of one or more of said particular events,
the event detecting unit detects whether a second target address of the main memory is accessed,
wherein in response to detecting that the second target address is accessed, the event detection unit determines that a sixth specific event among the specific events occurs,
in response to detecting the occurrence of the sixth specific event, the event detecting unit sends a sixth recording command corresponding to the sixth specific event to the event recording unit.
8. The EVRC controller of claim 7, wherein the electronic device further comprises a bus for connecting the components, wherein in the operation of continuously detecting the occurrence of one or more of the specific events,
the event detecting unit detects whether an error occurs in the bus,
wherein the event detecting unit determines that a seventh specific event among the specific events occurs in response to detecting that the bus has an error,
wherein in response to detecting the occurrence of the seventh specific event, the event detecting unit sends a seventh recording command corresponding to the seventh specific event to the event recording unit.
9. An electronic device, comprising:
a processor;
a battery backup memory; the battery-backup memory includes a battery and a volatile memory coupled to the battery, the volatile memory being static random access memory or other volatile memory having the same speed or higher; and
an event logging controller coupled to the processor and the battery backup memory;
wherein the event logging controller operates independently from the processor, the event logging controller comprising:
an event detection unit for continuously detecting whether one or more of a plurality of specific events occur, and
an event recording unit coupled to the event detecting unit,
wherein the event detection unit is configured to, in response to detecting occurrence of the one or more specific events of the specific events, cause the processor to generate an inoperable condition when the one or more specific events of the specific events occur, and send a recording instruction corresponding to the one or more specific events to the event recording unit;
the event recording unit is used for automatically recording event information corresponding to the one or more specific events to the battery backup memory from an element of the electronic device without being controlled by the processor in response to the received recording instruction.
CN201811617681.0A 2017-12-29 2018-12-28 Event recording controller and electronic device Active CN110018921B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
TW106146389A TWI657337B (en) 2017-12-29 2017-12-29 Event recording controller and electronic device
TW106146389 2017-12-29

Publications (2)

Publication Number Publication Date
CN110018921A CN110018921A (en) 2019-07-16
CN110018921B true CN110018921B (en) 2022-11-11

Family

ID=66996002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811617681.0A Active CN110018921B (en) 2017-12-29 2018-12-28 Event recording controller and electronic device

Country Status (2)

Country Link
CN (1) CN110018921B (en)
TW (1) TWI657337B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000293273A (en) * 1999-04-05 2000-10-20 Toshiba Corp Data recording device and control method for data recording device
TW200519659A (en) * 2003-12-02 2005-06-16 Benq Corp Automatic data collection method and data collection system
JP2009205213A (en) * 2008-02-26 2009-09-10 Epson Toyocom Corp Event recorder and electronic device therewith
CN101896236A (en) * 2007-12-05 2010-11-24 生命力有限公司 System for reporting recorded video preceding system failures
JP2014081700A (en) * 2012-10-15 2014-05-08 Fuji Electric Co Ltd Programmable controller, data backup method of programmable controller, and starting method of programmable controller
WO2015152648A1 (en) * 2014-04-03 2015-10-08 재단법인 다차원 스마트 아이티 융합시스템 연구단 Apparatus and method for managing files using buffer in storage space of video event recorder
CN105938450A (en) * 2015-03-06 2016-09-14 广达电脑股份有限公司 Automatic debug information collection method and system
CN106561018A (en) * 2015-10-02 2017-04-12 纬创资通股份有限公司 Server monitoring method, monitoring device and monitoring system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9431097B2 (en) * 2014-12-22 2016-08-30 Qualcomm Incorporated Volatile/non-volatile SRAM device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000293273A (en) * 1999-04-05 2000-10-20 Toshiba Corp Data recording device and control method for data recording device
TW200519659A (en) * 2003-12-02 2005-06-16 Benq Corp Automatic data collection method and data collection system
CN101896236A (en) * 2007-12-05 2010-11-24 生命力有限公司 System for reporting recorded video preceding system failures
JP2009205213A (en) * 2008-02-26 2009-09-10 Epson Toyocom Corp Event recorder and electronic device therewith
JP2014081700A (en) * 2012-10-15 2014-05-08 Fuji Electric Co Ltd Programmable controller, data backup method of programmable controller, and starting method of programmable controller
WO2015152648A1 (en) * 2014-04-03 2015-10-08 재단법인 다차원 스마트 아이티 융합시스템 연구단 Apparatus and method for managing files using buffer in storage space of video event recorder
CN105938450A (en) * 2015-03-06 2016-09-14 广达电脑股份有限公司 Automatic debug information collection method and system
CN106561018A (en) * 2015-10-02 2017-04-12 纬创资通股份有限公司 Server monitoring method, monitoring device and monitoring system

Also Published As

Publication number Publication date
TWI657337B (en) 2019-04-21
TW201931120A (en) 2019-08-01
CN110018921A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN102760090B (en) Debugging method and computer system
US10528110B2 (en) Method for diagnosing power supply failure in a wireless communication device
TWI759719B (en) Flash memory controller and method used in flash memory controller
CN111221800A (en) Database migration method and device, electronic equipment and storage medium
CN104137077A (en) Processor system
US20170068603A1 (en) Information processing method and information processing apparatus
CN103809502A (en) Controller and program
US11023335B2 (en) Computer and control method thereof for diagnosing abnormality
JP2010204851A (en) Storage device and information processing apparatus
JP6880961B2 (en) Information processing device and log recording method
CN110018921B (en) Event recording controller and electronic device
CN115114117B (en) Data recording method and data recording device
EP2776930A1 (en) Method and apparatus for saving processor information prior to a reset for post reset evaluation
JP2009211625A (en) Start log storage method for information processor
EP3540533B1 (en) Controller and data storage method
WO2014112039A1 (en) Information processing device, method for controlling information processing device and information processing device control program
TW202242655A (en) Method, computer system and computer program product for storing state data of finite state machine
CN108415788B (en) Data processing apparatus and method for responding to non-responsive processing circuitry
JPH0869593A (en) Monitoring system for performance of plant
WO2012137321A1 (en) Information processing device and method
JPH06214831A (en) Abnormality detector for central processing unit
JPH04125753A (en) On-lined diagnostic system for memory
JPH0395634A (en) Restart control system for computer system
JPH07230432A (en) Calculating device
ATE213346T1 (en) MONITORING SYSTEM FOR DATA PROCESSING SYSTEMS

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant