Method for controlling interrupt in inverter

10275374 ยท 2019-04-30

Assignee

Inventors

Cpc classification

International classification

Abstract

Disclosed herein is a method for controlling interrupts in an inverter. If a control unit checks that an interrupt is issued in main software while an inverter is operating, the control unit analyzes the type of the interrupt. The interrupt is converted into an interrupt ID sorted by functionality. If the interrupt ID is a previously registered interrupt ID, an interrupt function corresponding to the registered interrupt ID is executed.

Claims

1. A method for controlling an interrupt, the method performed by a control unit and comprising: separately storing interrupt identifications (IDs) sorted by functionality and a respective interrupt function corresponding thereto, wherein each interrupt ID is used for a functionality to perform a specific task; executing main software while an inverter is operating; checking if an interrupt is issued while the inverter is operating; analyzing a type of the interrupt issued in the main software; converting the interrupt into the interrupt ID sorted by functionality; and if the interrupt ID is a previously stored interrupt ID, executing an interrupt function corresponding to the interrupt ID.

2. The method of claim 1, wherein the analyzing the type of the interrupt comprises analyzing in which state the main software was when the interrupt has been issued.

3. The method of claim 1, further comprising: returning to executing the main software if the interrupt ID is not a registered interrupt ID.

4. The method of claim 1, further comprising: determining whether functionality of the interrupt ID is enable.

5. The method of claim 4, further comprising: returning to the executing the main software if the functionality of the interrupt ID is disable.

Description

BRIEF DESCRIPTION OF DRAWINGS

(1) FIGS. 1A and 1B are diagrams for illustrating interrupts in existing embedded software.

(2) FIG. 2 is a diagram illustrating an apparatus for managing interrupts by functionality of inverter embedded software according to an exemplary embodiment of the present disclosure;

(3) FIG. 3 is a flowchart for illustrating a method for managing interrupts in inverter embedded software by functionality according to an exemplary embodiment of the present disclosure; and

(4) FIG. 4 is a diagram for illustrating an application of an exemplary embodiment of the present disclosure.

DETAILED DESCRIPTION

(5) Exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings to facilitate understanding of the configuration and effects thereof. The scope of the present disclosure may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. These embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the inventive subject matter to those skilled in the art. In the drawings, the size of some of the elements may be exaggerated for convenience of illustration and not drawn on scale for illustrative purposes.

(6) It will be understood that when an element such as a layer, region, substrate, or panel is referred to as being on or connected to another element, it can be directly on the other element or intervening elements may also be present. In contrast, when an element is referred to as being directly on or directly connected to another element, there are no intervening elements present. The same may be applied to other expressions for describing relationship between elements such as between and directly between.

(7) Terms such as first, second, etc. in the description and in the claims are used for distinguishing between similar elements and not necessarily for describing a sequential or chronological order. For example, the terms so used are interchangeable under appropriate circumstances without departing from the scope of the present disclosure.

(8) As used herein, the singular form of a, an, and the include plural references unless the context clearly dictates otherwise. It will be further understood that the terms comprises or have used in this specification, specify the presence of stated features, steps, operations, components, parts, or a combination thereof, but do not preclude the presence or addition of one or more other features, numerals, steps, operations, components, parts, or a combination thereof.

(9) The terms used herein, including technical terms, have the same meanings as terms that are generally understood by those skilled in the art, as long as the terms are not explicitly defined differently.

(10) Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

(11) FIG. 2 is a diagram illustrating an apparatus for managing interrupts in inverter embedded software by functionality according to an exemplary embodiment of the present disclosure.

(12) As shown in FIG. 2, the apparatus according to the exemplary embodiment of the present disclosure may include a control unit 10 and a storage unit 20. The storage unit 20 may include an interruption ID storage unit 21 and an interruption function storage unit 23. The interrupt ID storage unit 21 may store therein interrupt IDs sorted by functionality used for the specific task. The interrupt function storage unit 23 may store therein interrupt functions for different functionalities. For each of the functionalities, the interrupt ID and the respective interrupt function may be stored in association with each other. Although the interrupt ID storage unit 21 and the interrupt function storage unit 23 are depicted as separate components, they may be configured as a single component so that they correspond to each function.

(13) In addition, according to an exemplary embodiment of the present disclosure, the storage unit 20 may include only one of the interrupt ID storage unit 21 and the interrupt function storage unit 23. For example, the storage unit 20 may include only the interrupt ID storage unit 21, and the interrupt function storage unit 23 may exist separately from the storage unit 20. In the following description, for convenience of illustration, it is assumed that the storage unit 20 includes the interrupt ID storage unit 21 as well as the interrupt function storage unit 23.

(14) The control unit 10 performs a method for managing interrupts by functionality according to an exemplary embodiment of the present disclosure. For example, the control unit 10 may be a microcontroller (MCU) or a central processing unit (CPU). Hereinafter, the operation of the control unit 10 will be described in detail with reference to the drawings.

(15) FIG. 3 is a flowchart for illustrating a method for managing interrupts by functionality in inverter embedded software according to an exemplary embodiment of the present disclosure. FIG. 2 focuses on the operation of the control unit 10.

(16) Referring to FIGS. 2 and 3, the control unit 10, upon receiving a user's input, may store interrupt IDs and the interrupt functions sorted by the functionalities each used for the specific task in an inverter in the interrupt ID storage unit 21 and the interrupt function storage unit 21, respectively (step S31).

(17) Subsequently, the control unit 10 executes main software when the inverter operates (step S32). If it is checked that an interrupt is issued (step S33), the control unit 10 may analyze the type of the interrupt and the current state of the software (step S34). Specifically, if an interrupt is issued, the control unit 10 may analyze what kind of interrupt has been issued and in which state the main software was when the interrupt has been issued, thereby determining which interrupt to generate.

(18) The type of the interrupt may include, for example, an interrupt issued according to a pulse width modulation (PWM) carrier, an interrupt issued according to a timer count, a PDP interrupt as a PWM external interrupt signal, a PWM upload interrupt, an arm short detection interrupt, an overcurrent detection interrupt, and an overcurrent suppression detection interrupt. As listed above, the interrupts analyzed by the control unit 10 may include a variety of types. To analyze the type of an interrupt, the control unit 10 may receive a signal from a counter (not shown) or may detect it by itself.

(19) Subsequently, the control unit 10 converts the interrupt into interrupt ID sorted by functionality (step S35), and may check if the converted interrupt ID is stored (that is, registered) in the interrupt ID storing unit 21 (step S36). That is, the control unit 10 may compare the converted interrupt ID with the interrupt ID previously registered with the interrupt ID storage unit 21. If it is determined that the interrupt ID is not registered with the interrupt ID storage unit 21, the interrupt ID is ignored since the functionality of the interrupt is not used one, and the process may return to the step S32 of executing the main software. If it is determined that the interrupt ID is one registered with the interrupt ID storage unit 21, it may be determined whether the corresponding functionality can be enabled (step S37). Interrupt enable is the ability to re-enable intermittently disabled interrupts for critical processing tasks that should not be interrupted while the main software is running. A state in which an interrupt is accepted after returning to a normal state is referred to as interrupt enable. The control unit 10 may receive interrupt enable during execution of the main software as an external signal or by a user's selection. At this time, if it is interrupt disable, the process may return to step S32 to executing the main software again. If it is interrupt enable, an interrupt function stored (i.e., registered) in the interrupt function storage unit 23 may be executed (step S38).

(20) FIG. 4 is a diagram for illustrating an application of an exemplary embodiment of the present disclosure.

(21) Referring to FIGS. 2 and 4, various kinds of interrupts 42 such as a PWM upload interrupt 42a, a timer interrupt 42b, a PWM block interrupt 42c are issued during execution of the main software 41, the control unit 10 starts interrupt management 43 according to an exemplary embodiment of the present disclosure. That is, the control unit 10 analyzes the interrupts to convert them into interrupt IDs 44 sorted by functionality.

(22) By using the interrupt ID thus converted, the control unit 10 may execute an interrupt function 45 corresponding to the interrupt ID. In an exemplary embodiment of the present disclosure, for example, when a PWM upload interrupt is issued as indicated by arrow 42a, the control unit 10 checks that an interrupt has been issued at the top TOP of the PWM and converts the interrupt into an interrupt ID of IRQ_PWM_TOP as indicated by arrow 44a. Then, the corresponding function of PwmTopIrq ( ) indicated by 45a can be executed. That is, the interrupt function corresponding to the interrupt ID can be easily executed.

(23) Although various interrupt IDs and corresponding interrupt functions according to an exemplary embodiment of the present disclosure are illustrated. It is to be understood that they are merely illustrative but is not limiting.

(24) In this manner, according to an exemplary embodiment of the present disclosure, interrupts typically defined by MCU are converted into interrupt IDs sorted by functionality, such that software can be implemented irrespectively of the MCU. As a result, the time taken to develop software can be shortened.

(25) Further, according to an exemplary embodiment of the present disclosure, when various functionalities are executed in one function for interrupts of the same MCU, the quality of software can be improved by separating functions by functionality.

(26) Further, according to an exemplary embodiment of the present disclosure, it is possible to improve the execution efficiency of software by determining whether to execute the interrupt function dependent on whether to use (enable) it.

(27) Although the exemplary embodiments of the present disclosure have been described in detail, these are merely illustrative. It will be appreciated by those skilled in the art that various modifications and equivalents are possible without departing from the scope of the present disclosure. Accordingly, the true scope of the present disclosure sought to be protected is defined only by the appended claims.