Nothing Special   »   [go: up one dir, main page]

CN114664427A - Interrupt control apparatus, method and computer-readable storage medium - Google Patents

Interrupt control apparatus, method and computer-readable storage medium Download PDF

Info

Publication number
CN114664427A
CN114664427A CN202210307755.0A CN202210307755A CN114664427A CN 114664427 A CN114664427 A CN 114664427A CN 202210307755 A CN202210307755 A CN 202210307755A CN 114664427 A CN114664427 A CN 114664427A
Authority
CN
China
Prior art keywords
interrupt
condition
implantable medical
current mode
medical device
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.)
Pending
Application number
CN202210307755.0A
Other languages
Chinese (zh)
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.)
Sceneray Co Ltd
Original Assignee
Sceneray Co Ltd
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 Sceneray Co Ltd filed Critical Sceneray Co Ltd
Priority to CN202210307755.0A priority Critical patent/CN114664427A/en
Publication of CN114664427A publication Critical patent/CN114664427A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H40/00ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices
    • G16H40/60ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the operation of medical equipment or devices
    • G16H40/63ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the operation of medical equipment or devices for local operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4818Priority circuits therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4825Interrupt from clock, e.g. time of day

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Quality & Reliability (AREA)
  • Electrotherapy Devices (AREA)

Abstract

An interrupt control device, method and computer-readable storage medium for enabling and disabling a one-level interrupt of a plurality of modes of an implantable medical device, the plurality of modes including a boot mode corresponding to an upgraded boot program and an application mode corresponding to an application program, the interrupt control device configured to: upon detecting that the implantable medical device satisfies an interrupt disable condition, disabling one-level interrupts for the plurality of modes to complete execution of operations of the implantable medical device that triggered the interrupt disable condition; obtaining an interruption allowing condition corresponding to the interruption prohibiting condition; when the implantable medical device is detected to meet the interrupt-enable condition corresponding to the interrupt-disable condition, enabling one-level interrupts for the plurality of modes. The multiple modes of the equipment are subjected to unified interrupt control, the control use requirement of a user on the implantable medical equipment is met, and the use safety and reliability of the implantable medical equipment are guaranteed.

Description

Interrupt control apparatus, method and computer-readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to an interrupt control apparatus, method, and computer-readable storage medium.
Background
For an implantable medical device, there are multiple-mode designs, and in order to avoid confusion in switching or executing multiple modes, uniform interrupt control is required for the multiple modes. At least 2 modes exist in the design of the implantable medical device, and generally, a boot mode corresponding to a boot upgrade procedure (BTR) and an application mode corresponding to an application program (APP). The boot mode primary function is a wireless upgrade application. The implantable medical device product operates in an application mode. When the implantable medical device is used, the electrodes, the extension leads and the electric stimulator are required to be implanted in a human body, and the electric stimulation is controlled by the external remote control device to act on a target area, so that the use and the operation of the implantable medical device are extremely accurate and reliable. Therefore, in order to ensure the safety and reliability of the use of the implantable medical device, prevent device operation errors caused by function reentry and resource competition, such as dead halt, reset or other unpredictable results, and ensure the normal operation of the implantable medical device during switching modes and executing operations, it is necessary to perform uniform interrupt control on multiple modes of the device.
In order to better meet the control and use requirements of a user on implantable medical equipment, the application provides an interrupt control device for implantable medical equipment and a related device.
Disclosure of Invention
The present application is directed to provide an interrupt control apparatus, method and computer readable storage medium, which solve the problem of the user's control requirement for use of an implantable medical device.
The purpose of the application is realized by adopting the following technical scheme:
in a first aspect, the present application provides an interrupt control device for enabling and disabling a level one interrupt for a plurality of modes of an implantable medical device, the plurality of modes including a boot mode corresponding to an upgraded boot program and an application mode corresponding to an application program, the interrupt control device configured to:
upon detecting that the implantable medical device satisfies an interrupt disable condition, disabling one-level interrupts for the plurality of modes to complete execution of operations of the implantable medical device that triggered the interrupt disable condition;
obtaining an interruption allowing condition corresponding to the interruption prohibiting condition;
when the implantable medical device is detected to meet the interrupt-enable condition corresponding to the interrupt-disable condition, enabling one-level interrupts for the plurality of modes.
The technical scheme has the beneficial effects that: the interrupt control device detects whether an interrupt prohibition condition occurs to the implantable medical device, when the interrupt prohibition condition is detected to occur, the interrupt control device prohibits the first-level interrupts of the multiple modes, and the processor is prohibited to respond to the interrupt request so as to complete the operation execution of the implantable medical device triggering the interrupt prohibition condition; and the interrupt prohibiting condition has an interrupt permitting condition corresponding to the interrupt prohibiting condition, the interrupt control device detects whether the interrupt permitting condition corresponding to the interrupt prohibiting condition occurs to the implantable medical device, when the interrupt permitting condition corresponding to the interrupt prohibiting condition is detected to occur, the interrupt control device permits the primary interrupt of the plurality of modes, and the processor is permitted to respond to the interrupt request; therefore, the control and use requirements of the implantable medical device under the interrupt prohibition condition (such as device mode switching control operation or other high-priority operation) are met, the primary interrupts of the multiple modes are prohibited, the operation execution of the implantable medical device triggering the interrupt prohibition condition is completed, and the use safety and reliability of the implantable medical device are guaranteed; and allowing the primary interrupts of the multiple modes under the interrupt allowing condition to ensure that the implanted medical equipment can call and execute other functional functions normally.
In some optional embodiments, the interrupt disable condition is: the implantable medical device performs a mode switching operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: completing the execution of the mode switching operation of the implantable medical device, and entering a main loop of a current mode; or,
the interrupt disable condition is: performing an erase/write flash operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: the flash memory erasing/writing operation is completed; or,
the interrupt disable condition is: performing assignment and calculation operation of atomic operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: assignment of the atomic operation and execution of the computing operation are completed; or,
the interrupt disable condition is: entering a subroutine that is executing the interrupt; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: exiting the subroutine that is executing the interrupt.
The technical scheme has the beneficial effects that: the primary interrupt should remain disabled upon reset of the implantable medical device. The implantable medical device performs the mode switching operation to reset the device, and at the moment, the processor is prohibited from responding to the interrupt request, so that the occurrence of interrupt caused by abnormal events before the device does not normally run is avoided, the time sequence of the device is disordered, and the mode after switching cannot be normally started and run. Therefore, the stability of the implantable medical device in the mode switching control using process is ensured;
the embedded medical equipment executes erasing or programming Flash memory (Flash) operation in the use process and is used for recording important set parameters or information such as use information and stored data and the like, and forbidding a processor to respond to an interrupt event in the erasing or programming process, thereby avoiding serious consequences such as equipment operation abnormal conditions and the like caused by data information loss and other abnormalities in the erasing or programming process;
the implantable medical device has the performance integrity characteristic in the implementation of the assignment and calculation operations of atomic operations, once the atomic operations are started to be implemented, the operations which are not interrupted by a thread scheduling mechanism are executed until the operations are finished, and the processor is forbidden to respond to the interrupt request at the moment, so that the running reliability of the implantable medical device is guaranteed;
when the implantable medical equipment enters a subprogram which is executing interruption, the priority of the processing state of the subprogram is higher than that of other interruption events which possibly cause the interruption, and at the moment, the processor is forbidden to respond to the interruption request so as to ensure that only one interruption service is executing at any time sequence, avoid the nesting of the interruption services and ensure the use stability of the implantable medical equipment;
when the current mode switching operation is completed and the main cycle of the current mode is entered; or the Flash memory erase/write (Flash) operation is completed; or the assignment of the atomic operation and the execution of the computing operation are completed; or exiting the interrupt-executing subroutine, allowing the interrupt control device to respond to the primary interrupts of the plurality of modes, and ensuring that the implantable medical device calls and executes other function functions normally.
In some alternative embodiments, the interrupt disabled condition is a secondary interrupt occurring at an interrupt source of the implantable medical device;
the interrupt control device is further configured to:
and when the secondary interruption of the interruption source of the implantable medical device is monitored, processing one or more secondary interruptions corresponding to the current mode after the primary interruptions of the plurality of modes are forbidden.
The technical scheme has the beneficial effects that: the implantable medical device has different kinds of interrupt sources in different modes, such as an interrupt source for upgrading the boot program, i.e. RTC (2s timer), GPT0 (frequency hopping); interrupt sources used by the application programs are GPT2 (modulation communication timer), RTC (2s timer), GPT1 (soft stimulation timer), and GPT0 (frequency hopping).
When monitoring that the interrupt source of the implantable medical device has secondary interrupt, the interrupt control device prohibits the primary interrupt in the multiple modes, does not respond to the primary interrupt event at the moment, ensures that one or more secondary interrupt processes corresponding to the current mode of the interrupt control device are completed, and ensures the running stability of the implantable medical device. If the primary interrupt is not prohibited, multiple nesting of interrupts is generated, one or more interrupt events with higher priority are allowed to interrupt the secondary interrupt, and abnormal conditions such as incapability of interrupt execution, equipment crash and the like may occur in the multiple nesting process of the equipment, so that the safe and stable operation of the implantable medical equipment cannot be guaranteed.
In some optional embodiments, the interrupt control device is further configured to process each secondary interrupt corresponding to the current mode in the following manner:
acquiring an event mark corresponding to the secondary interrupt;
when the event mark corresponding to the secondary interrupt is used for indicating to-be-processed, executing a preset operation corresponding to the secondary interrupt;
and when the event mark corresponding to the secondary interrupt is used for indicating the completion of the processing, exiting the secondary interrupt.
The technical scheme has the beneficial effects that: when the event mark is used for indicating that the state of the secondary interrupt is to be processed, the interrupt control equipment executes preset operation corresponding to the secondary interrupt and responds to the secondary interrupt event; and when the event mark corresponding to the secondary interrupt is used for indicating the completion of the processing, the secondary interrupt is timely quitted, so that the normal operation of the implanted medical equipment is facilitated.
In some optional embodiments, the interrupt control device is further configured to process each secondary interrupt corresponding to the current mode in the following manner:
obtaining an interrupt function corresponding to the current mode;
and processing one or more secondary interrupts corresponding to the current mode by using the interrupt function corresponding to the current mode.
The technical scheme has the beneficial effects that: the design of the interrupt program code should be as short as possible, and the interrupt control device can avoid introducing excessive program codes into the interrupt function to destroy the real-time performance of the interrupt by acquiring the interrupt function corresponding to the current mode and then calling the interrupt function corresponding to the current mode to process one or more secondary interrupts corresponding to the current mode.
In some optional embodiments, the processing one or more secondary interrupts corresponding to the current mode by using the interrupt function corresponding to the current mode includes:
acquiring an interrupt function of each interrupt source corresponding to the current mode by using the interrupt function corresponding to the current mode;
and processing one or more secondary interrupts generated by one of the interrupt sources by using the interrupt function of the one of the interrupt sources corresponding to the current mode.
The technical scheme has the beneficial effects that: the implantable medical device has different types of interrupt sources in different modes, the interrupt control device firstly obtains an interrupt function preset by the interrupt source corresponding to the secondary interrupt in the current mode, and then calls the interrupt function to process one or more secondary interrupts corresponding to the current mode, so that the accuracy of interrupt function calling is ensured, and the efficiency of the device for processing interrupt events is improved by calling the interrupt processing mode of the preset function.
In some alternative embodiments, the plurality of modes correspond to the same interrupt vector address;
the interrupt control device is further configured to:
setting an interrupt function corresponding to the interrupt vector address as an interrupt function corresponding to the current mode;
the interrupt control device is further configured to obtain an interrupt function corresponding to the current mode as follows:
and when the implantable medical equipment is detected to meet the interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address.
The technical scheme has the beneficial effects that: the multiple modes correspond to the same interrupt vector address, when the interrupt control equipment responds to an interrupt event, the interrupt function corresponding to the interrupt vector address is set as the interrupt function corresponding to the current mode, and when the implantable medical equipment is detected to meet the interrupt prohibition condition, the interrupt function corresponding to the current mode is obtained based on the interrupt vector address, so that the use of the interrupt vector address of the interrupt control equipment is saved.
In some alternative embodiments, the plurality of modes correspond to different interrupt vector addresses;
the interrupt control device is further configured to obtain an interrupt function corresponding to the current mode as follows:
and when the implantable medical equipment is detected to meet the interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address corresponding to the current mode.
The technical scheme has the beneficial effects that: the multiple modes correspond to different interrupt vector addresses, the interrupt functions corresponding to the multiple interrupt vector addresses are set as the interrupt functions corresponding to the multiple modes, when it is detected that the implantable medical device meets an interrupt prohibition condition, the interrupt functions corresponding to the current mode are obtained based on the interrupt vector addresses corresponding to the current mode, so that an interrupt control device is prevented from having an invoking error when invoking the interrupt functions corresponding to the different modes, meanwhile, the operation that the interrupt functions corresponding to the interrupt vector addresses are frequently set as the interrupt functions corresponding to the current mode when the interrupt control device responds to an interrupt event is avoided, and the possibility of erroneous operation is reduced.
In a second aspect, the present application provides an interrupt control method for enabling and disabling a one-level interrupt of a plurality of modes of an implantable medical device, the plurality of modes including a boot mode corresponding to an upgraded boot program and an application mode corresponding to an application program, the interrupt control method comprising:
upon detecting that the implantable medical device satisfies an interrupt disable condition, disabling one-level interrupts for the plurality of modes to complete execution of operations of the implantable medical device that triggered the interrupt disable condition;
obtaining an interruption allowing condition corresponding to the interruption prohibiting condition;
when the implantable medical device is detected to meet the interrupt-enable condition corresponding to the interrupt-disable condition, enabling one-level interrupts for the plurality of modes.
In some optional embodiments, the interrupt disable condition is: the implantable medical device performs a mode switching operation; the interrupt allowance condition corresponding to the interrupt prohibition condition is as follows: completing the execution of the mode switching operation of the implantable medical device, and entering a main loop of a current mode; or,
the interrupt disable condition is: performing an erase/write flash operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: the flash memory erasing/writing operation is completed; or,
the interrupt disable condition is: performing assignment and calculation operation of atomic operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: assignment of the atomic operation and execution of the computing operation are completed; or,
the interrupt disable condition is: entering a subroutine that is executing the interrupt; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: exiting the subroutine that is executing the interrupt.
In some alternative embodiments, the interrupt disabled condition is a secondary interrupt occurring at an interrupt source of the implantable medical device;
the method further comprises the following steps:
and when the secondary interruption of the interruption source of the implantable medical device is monitored, processing one or more secondary interruptions corresponding to the current mode after the primary interruptions of the plurality of modes are forbidden.
In some optional embodiments, the processing one or more secondary interrupts corresponding to the current mode includes:
acquiring an event mark corresponding to the secondary interrupt;
when the event mark corresponding to the secondary interrupt is used for indicating to-be-processed, executing a preset operation corresponding to the secondary interrupt;
and when the event mark corresponding to the secondary interrupt is used for indicating the completion of the processing, exiting the secondary interrupt.
In some optional embodiments, the processing one or more secondary interrupts corresponding to the current mode includes:
acquiring an interrupt function corresponding to the current mode;
and processing one or more secondary interrupts corresponding to the current mode by using the interrupt function corresponding to the current mode.
In some optional embodiments, the processing one or more secondary interrupts corresponding to the current mode by using the interrupt function corresponding to the current mode includes:
acquiring an interrupt function of each interrupt source corresponding to the current mode by using the interrupt function corresponding to the current mode;
and processing one or more secondary interrupts generated by one of the interrupt sources by using the interrupt function of the one of the interrupt sources corresponding to the current mode.
In some alternative embodiments, the plurality of modes correspond to the same interrupt vector address;
the method further comprises the following steps:
setting the interrupt function corresponding to the interrupt vector address as the interrupt function corresponding to the current mode;
the obtaining of the interrupt function corresponding to the current mode includes:
and when the implantable medical equipment is detected to meet an interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address.
In some alternative embodiments, the plurality of modes correspond to different interrupt vector addresses;
the obtaining of the interrupt function corresponding to the current mode includes:
and when the implantable medical equipment is detected to meet the interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address corresponding to the current mode.
In a third aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method.
Drawings
The present application is further described below with reference to the drawings and examples.
Fig. 1 is a schematic flowchart of an interrupt control method according to an embodiment of the present application;
FIG. 2 is a flow diagram illustrating a process for monitoring and handling a secondary interrupt according to an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating the handling of a two-level interrupt according to an embodiment of the present disclosure;
FIG. 4 is a diagram illustrating a method for handling a two-level interrupt using an interrupt function according to an embodiment of the present application;
FIG. 5 is a flow chart illustrating a process for handling a secondary interrupt using an interrupt function of an interrupt source according to an embodiment of the present application;
fig. 6 is a schematic flowchart of an interrupt function corresponding to an acquisition mode according to an embodiment of the present disclosure;
fig. 7 is a schematic flowchart of another interrupt function corresponding to an acquisition mode according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an interrupt control apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a program product for implementing an interrupt control device according to an embodiment of the present application.
Detailed Description
The present application is further described with reference to the accompanying drawings and the detailed description, and it should be noted that, in the case of no conflict, any combination between the embodiments or technical features described below may form a new embodiment.
Referring to fig. 1, fig. 1 is a schematic flowchart of an interrupt control method according to an embodiment of the present disclosure. An embodiment of the present application provides an interrupt control method, configured to enable and disable a one-level interrupt of multiple modes of an implantable medical device, where the multiple modes include a boot mode corresponding to an upgraded boot program and an application mode corresponding to an application program, and the interrupt control method includes:
step S101: upon detecting that the implantable medical device satisfies an interrupt disable condition, disabling one-level interrupts for the plurality of modes to complete execution of operations of the implantable medical device that triggered the interrupt disable condition;
step S102: obtaining an interruption allowing condition corresponding to the interruption prohibiting condition;
step S103: when the implantable medical device is detected to meet the interrupt allowance condition corresponding to the interrupt prohibition condition, allowing primary interrupts of the plurality of modes.
The interrupt control device detects whether an interrupt prohibition condition occurs to the implantable medical device, when the interrupt prohibition condition is detected to occur, the interrupt control device prohibits the first-level interrupts of the multiple modes, and the processor is prohibited to respond to the interrupt request so as to complete the operation execution of the implantable medical device triggering the interrupt prohibition condition; and the interrupt prohibiting condition has an interrupt permitting condition corresponding to the interrupt prohibiting condition, the interrupt control device detects whether the interrupt permitting condition corresponding to the interrupt prohibiting condition occurs to the implantable medical device, when the interrupt permitting condition corresponding to the interrupt prohibiting condition is detected to occur, the interrupt control device permits the primary interrupt of the plurality of modes, and the processor is permitted to respond to the interrupt request; therefore, the control and use requirements of the implantable medical device under the interrupt prohibition condition (such as device mode switching control operation or other high-priority operation) are met, the first-level interrupts of the multiple modes are prohibited, the operation execution of the implantable medical device triggering the interrupt prohibition condition is completed, and the use safety and reliability of the implantable medical device are guaranteed. And allowing the primary interrupts of the multiple modes under the interrupt allowing condition to ensure that the implanted medical equipment can call and execute other functional functions normally.
The Implantable medical device can be any one of an Implantable nerve electrical stimulation device, an Implantable cardiac electrical stimulation System (also called a cardiac pacemaker), an Implantable Drug Delivery System (IDDS) and a lead switching device. The implantable electrical Nerve Stimulation device is, for example, a Deep Brain Stimulation (DBS), a Cortical Brain Stimulation (CNS), a Spinal Cord Stimulation (SCS), a Sacral Nerve Stimulation (SNS), or a Vagus Nerve Stimulation (VNS). The stimulator is disposed within the patient for providing electrical stimulation.
The first-level interrupt of the plurality of modes may be a global interrupt for controlling the implantable medical device, or may be an interrupt for controlling two or more modes of the implantable medical device.
The plurality of modes comprise a guide mode corresponding to the upgrade guide program and an application mode corresponding to the application program, and when the implantable medical device product leaves a factory, the implantable medical device product should contain the upgrade guide program and the application program and operate in the application program. The upgrading bootstrap program is a resident memory upgrading bootstrap program, and the main function is a wireless upgrading application program. And after the system is reset, entering a boot mode. Of course, the modes may also include other modes, such as a charging mode, a low battery mode, an emergency call mode, and the like, which is not limited in this application.
The method for forbidding the first-level interruption of the plurality of modes can adopt a method for shielding interruption sources; or inhibiting the response of the interrupt control device to the interrupt event when the interrupt inhibiting condition occurs by adopting a method of shielding a trigger corresponding to the interrupt request trigger; or the method of changing the priority of the interrupt processing is adopted to change the processing priority of the interrupt control equipment to each interrupt source request, thereby forbidding the response of the interrupt control equipment to the interrupt event when the interrupt forbidding condition occurs.
The one-level interruption allowing the plurality of modes can adopt a recovery interruption source; or canceling the adoption of a shielding trigger corresponding to an interrupt request trigger, and allowing the interrupt control equipment to respond to an interrupt event when an interrupt allowing condition occurs; or restoring the processing priority order preset by the interrupt control equipment to each interrupt source request by adopting a method for restoring the interrupt processing priority, thereby allowing the interrupt control equipment to respond to the interrupt event when the interrupt permission condition occurs.
In some optional embodiments, the interrupt disable condition is: the implantable medical device performs a mode switching operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: completing the execution of the mode switching operation of the implantable medical device, and entering a main loop of a current mode; or,
the interrupt disable condition is: performing an erase/write flash operation; the interrupt allowance condition corresponding to the interrupt prohibition condition is as follows: the flash memory erasing/writing operation is completed; or,
the interrupt prohibition conditions are: performing assignment and calculation operation of atomic operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: assignment of the atomic operation and execution of the computing operation are completed; or,
the interrupt prohibition conditions are: entering a subroutine that is executing the interrupt; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: exiting the subroutine that is executing the interrupt.
The primary interrupt should remain disabled upon reset of the implantable medical device. The implantable medical device performs the mode switching operation to reset the device, and at the moment, the processor is prohibited from responding to the interrupt request, so that the occurrence of interrupt caused by abnormal events before the device does not normally run is avoided, the time sequence of the device is disordered, and the mode after switching cannot be normally started and run. Therefore, the stability of the implantable medical device in the mode switching control using process is ensured;
the embedded medical equipment executes erasing or programming Flash memory (Flash) operation in the use process and is used for recording important set parameters or information such as use information and stored data and the like, and forbidding a processor to respond to an interrupt event in the erasing or programming process, thereby avoiding serious consequences such as equipment operation abnormal conditions and the like caused by data information loss and other abnormalities in the erasing or programming process;
the implantable medical device has the performance integrity characteristic in the implementation of the assignment and calculation operations of atomic operations, once the atomic operations are started to be implemented, the operations which are not interrupted by a thread scheduling mechanism are executed until the operations are finished, and the processor is forbidden to respond to the interrupt request at the moment, so that the running reliability of the implantable medical device is guaranteed;
when the implantable medical equipment enters a subprogram which is executing interruption, the priority of the processing state of the subprogram is higher than that of other interruption events which possibly cause the interruption, and at the moment, the processor is forbidden to respond to the interruption request so as to ensure that only one interruption service is executing at any time sequence, avoid the nesting of the interruption services and ensure the use stability of the implantable medical equipment;
when the current mode switching operation is completed and the main cycle of the current mode is entered; or the Flash memory erase/write (Flash) operation is completed; or the assignment of the atomic operation and the execution of the computing operation are completed; or exiting the interrupt-executing subroutine, allowing the interrupt control device to respond to the primary interrupts of the plurality of modes, and ensuring that the implantable medical device calls and executes other function functions normally.
The mode switching operation performed by the implantable medical device may be switching from a guidance mode to an application mode, or switching from the application mode to the guidance mode. The guide mode selects to enter an application mode or a resident guide mode according to the reset information; and the application mode can be switched into by instructions in the doctor program controller engineering mode. Also, the application mode can enter the boot mode through instruction switching;
the operation of erasing or programming a Flash memory (Flash) is executed in the use process of the implanted medical equipment, namely, a stimulus pulse amplitude compensation value is written into a designated Flash space by an integrated circuit automatic test machine (ATE) program in the implanted medical equipment through a read-write command; or the implanted medical equipment writes 20 groups of charging information in the RAM into the Flash space at the interception moment when the charging is finished;
the implanted medical device performs assignment of atomic operation, and the calculation operation can be real-time clock accumulation calculation for example; or calculating a BTR/APP CRC16 check value; or calculating the electrical stimulation voltage/amplitude;
the sub-routine that the implantable medical device enters into executing an interrupt may be a secondary interrupt occurring at an interrupt source of the implantable medical device, the secondary interrupt event being handled by calling a predetermined function.
Referring to fig. 2, fig. 2 is a schematic flowchart of a process for monitoring and processing a secondary interrupt according to an embodiment of the present application. In some alternative embodiments, the interrupt disabled condition is a secondary interrupt occurring at an interrupt source of the implantable medical device;
the method further comprises the following steps:
step S201: and when the secondary interruption of the interruption source of the implantable medical device is monitored, processing one or more secondary interruptions corresponding to the current mode after the primary interruptions of the plurality of modes are forbidden.
The implantable medical device has different kinds of interrupt sources in different modes, such as an interrupt source RTC (2s timer) used by an upgrade boot program (corresponding to the boot mode), a GPT0 (frequency hopping); interrupt sources used by an application (corresponding to an application mode) include a GPT2 (modulation communication timer), an RTC (2s timer), a GPT1 (soft stimulus timer), and a GPT0 (frequency hopping).
No. Interrupt source Two stage interrupt
1 RTC 2s timer: watchdog for timing activation of main function execution
2 GPT0 Frequency hopping (600ms time-out)
Table 1: interrupt source corresponding to upgrading bootstrap program
Figure BDA0003566281630000111
Figure BDA0003566281630000121
Table 2: interrupt source corresponding to application program
When monitoring that the interrupt source of the implantable medical device has secondary interrupt, the interrupt control device prohibits the primary interrupt in the multiple modes, does not respond to the primary interrupt event at the moment, ensures that one or more secondary interrupt processes corresponding to the current mode of the interrupt control device are completed, and ensures the running stability of the implantable medical device. If the first-level interrupt is not prohibited, multiple nesting of interrupts is generated, one or more interrupt events with higher priority are allowed to interrupt the second-level interrupt, abnormal conditions such as incapability of executing interrupts and device crash can occur in the multiple nesting process of the device, and the safe and stable operation of the implantable medical device cannot be guaranteed.
In one embodiment, when a second-level interrupt is not processed, triggering of a first-level interrupt event is prohibited, and other interrupts need to wait for the interrupt control device to complete and quit the current interrupt processing, and the interrupt control device allows the first-level interrupt to respond to other interrupt events. In another embodiment, when one secondary interrupt is not processed, the triggering of the primary interrupt event is prohibited, and other interrupts need to wait for the interrupt control device to complete and exit the multiple secondary interrupt processes corresponding to the current mode, and the interrupt control device allows the primary interrupt to respond to the interrupt events of other modes.
Referring to fig. 3, fig. 3 is a schematic flowchart of processing a secondary interrupt according to an embodiment of the present application. In some optional embodiments, the processing one or more secondary interrupts corresponding to the current mode includes:
step S301: acquiring an event mark corresponding to the secondary interrupt;
step S302: when the event mark corresponding to the secondary interrupt is used for indicating to-be-processed, executing a preset operation corresponding to the secondary interrupt;
step S303: and when the event mark corresponding to the secondary interrupt is used for indicating the completion of the processing, exiting the secondary interrupt.
When the event mark is used for indicating that the state of the secondary interrupt is to be processed, the interrupt control equipment executes preset operation corresponding to the secondary interrupt and responds to the secondary interrupt event; and when the event mark corresponding to the secondary interrupt is used for indicating the completion of the processing, the secondary interrupt is timely quitted, so that the normal operation of the implanted medical equipment is facilitated.
When handling an interrupt, the interrupt control device performs only the most basic and necessary work for the interrupt event. Taking communication interrupt as an example, the interrupt handler only sets a communication interrupt event flag and wakes up the interrupt control device. After the interrupt control device is awakened, the main message is circulated, the interrupt event mark is checked, and operations such as receiving a communication data packet and the like are executed. And when the event mark corresponding to the communication interruption is used for indicating the completion of the processing, the communication interruption is quitted.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating processing a second-level interrupt by using an interrupt function according to an embodiment of the present disclosure. In some optional embodiments, the processing one or more secondary interrupts corresponding to the current mode includes:
step S401: obtaining an interrupt function corresponding to the current mode;
step S402: and processing one or more secondary interrupts corresponding to the current mode by using the interrupt function corresponding to the current mode.
The design of the interrupt program code should be as short as possible, and the interrupt control device can avoid introducing excessive program codes into the interrupt function to destroy the real-time performance of the interrupt by acquiring the interrupt function corresponding to the current mode and then calling the interrupt function corresponding to the current mode to process one or more secondary interrupts corresponding to the current mode.
The interrupt is an emergency occurring in the operation of the processing device, for example, an interrupt source RTC 2s timer activates a main function to execute a watchdog regularly, or GPT0 frequency hopping setting, if an interrupt event is processed by using an interrupt program, data overflow may be caused, an event flag corresponding to the interrupt cannot be reset, or the execution time exceeds the interrupt time to cause time sequence confusion, or the function reentry and resource competition cause device operation errors such as crash, reset and the like; calling the interrupt function and processing outside the interrupt can effectively avoid introducing excessive program codes into the interrupt function so as to destroy the real-time property of the interrupt.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a process for processing a secondary interrupt by using an interrupt function of an interrupt source according to an embodiment of the present application. The step S402 includes:
step S501: acquiring an interrupt function of each interrupt source corresponding to the current mode by using the interrupt function corresponding to the current mode;
step S502: and processing one or more secondary interrupts generated by one of the interrupt sources by using the interrupt function of the one of the interrupt sources corresponding to the current mode.
The implantable medical device has different types of interrupt sources in different modes, the interrupt control device firstly obtains an interrupt function preset by the interrupt source corresponding to the secondary interrupt in the current mode, and then calls the interrupt function to process one or more secondary interrupts corresponding to the current mode, so that the accuracy of interrupt function calling is ensured, and the efficiency of the device for processing interrupt events is improved by calling the interrupt processing mode of the preset function.
Referring to fig. 6, fig. 6 is a schematic flowchart of an interrupt function corresponding to an acquisition mode according to an embodiment of the present application. In some alternative embodiments, the plurality of modes correspond to the same interrupt vector address;
the method further comprises the following steps:
setting the interrupt function corresponding to the interrupt vector address as the interrupt function corresponding to the current mode;
the step S401 includes:
step S601: and when the implantable medical equipment is detected to meet an interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address.
The multiple modes correspond to the same interrupt vector address, when the interrupt control device responds to an interrupt event, the interrupt function corresponding to the interrupt vector address is set as the interrupt function corresponding to the current mode, and when the fact that the implantable medical device meets an interrupt prohibition condition is detected, the interrupt function corresponding to the current mode is obtained based on the interrupt vector address, so that the use of the interrupt vector address of the interrupt control device is saved.
For example, the interrupt sources used by the boot upgrade program and the application program are RTC and GPT0 interrupt sources, in order to save the use of interrupt vector addresses of the interrupt control device, the RTC and GPT interrupt sources corresponding to the boot mode and the application mode are set to the same interrupt vector address, when the interrupt control device responds to an RTC or GPT0 interrupt event, the interrupt function corresponding to the interrupt vector address is set to the same RTC or GPT0 interrupt function, and when the interrupt control device detects that the implantable medical device meets the interrupt prohibition condition in the boot mode or the application mode, the boot mode or the application mode calls the RTC or GPT0 interrupt function through the same interrupt vector address.
Referring to fig. 7, fig. 7 is a schematic flowchart of another interrupt function corresponding to an acquisition mode according to the embodiment of the present application. In some alternative embodiments, the plurality of modes correspond to different interrupt vector addresses;
the step S401 includes:
step S701: and when the implantable medical device is detected to meet an interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address corresponding to the current mode.
The multiple modes correspond to different interrupt vector addresses, the interrupt functions corresponding to the multiple interrupt vector addresses are set as the interrupt functions corresponding to the multiple modes, when it is detected that the implantable medical device meets an interrupt prohibition condition, the interrupt functions corresponding to the current mode are obtained based on the interrupt vector addresses corresponding to the current mode, so that an interrupt control device is prevented from having an invoking error when invoking the interrupt functions corresponding to the different modes, meanwhile, the operation that the interrupt functions corresponding to the interrupt vector addresses are frequently set as the interrupt functions corresponding to the current mode when the interrupt control device responds to an interrupt event is avoided, and the possibility of erroneous operation is reduced.
For example, the interrupt sources used by the application program are GPT2 and GPT1 interrupt sources, and the upgrade boot program does not have the GPT2 and GPT1 interrupt sources, so an interrupt vector address is set separately for the GPT2 and GPT1 interrupt sources corresponding to the application mode, when the interrupt control device responds to a GPT2 or GPT1 interrupt event, an interrupt function corresponding to the interrupt vector address is set as the GPT2 or GPT1 interrupt function, when the interrupt control device detects that the implanted medical device meets an interrupt prohibition condition in the application mode, the application mode calls the GPT2 or GPT1 interrupt function through the interrupt vector address, and the boot mode cannot call the GPT2 or GPT1 interrupt function through the interrupt vector address. Similarly, the boot mode may correspond to an interrupt vector address that is not available to other applications.
The embodiment of the present application further provides an interrupt control device, and a specific implementation manner of the interrupt control device is consistent with the implementation manner and the achieved technical effect described in the embodiment of the interrupt control method, and details of a part of the implementation manner are not repeated.
The interrupt control device is configured to enable and disable one-level interrupts for a plurality of modes of the implantable medical device, the plurality of modes including a boot mode corresponding to an upgraded boot program and an application mode corresponding to an application program, the interrupt control device configured to:
upon detecting that the implantable medical device satisfies an interrupt disable condition, disabling one-level interrupts for the plurality of modes to complete execution of operations of the implantable medical device that triggered the interrupt disable condition;
obtaining an interruption allowing condition corresponding to the interruption prohibiting condition;
when the implantable medical device is detected to meet the interrupt-enable condition corresponding to the interrupt-disable condition, enabling one-level interrupts for the plurality of modes.
In some optional embodiments, the interrupt disable condition is: the implantable medical device performs a mode switching operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: completing the execution of the mode switching operation of the implantable medical device, and entering a main loop of a current mode; or,
the interrupt disable condition is: performing an erase/write flash operation; the interrupt allowance condition corresponding to the interrupt prohibition condition is as follows: the flash memory erasing/writing operation is completed; or,
the interrupt disable condition is: performing assignment and calculation operation of atomic operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: assignment of the atomic operation and execution of the computing operation are completed; or,
the interrupt prohibition conditions are: entering a subroutine that is executing the interrupt; the interrupt allowance condition corresponding to the interrupt prohibition condition is as follows: exiting the subroutine that is executing the interrupt.
In some alternative embodiments, the interrupt disabled condition is a secondary interrupt occurring at an interrupt source of the implantable medical device;
the interrupt control device is further configured to:
and when secondary interruption of the interruption source of the implantable medical device is monitored, after primary interruption of the multiple modes is forbidden, processing one or more secondary interruptions corresponding to the current mode.
In some optional embodiments, the interrupt control device is further configured to process each secondary interrupt corresponding to the current mode in the following manner:
acquiring an event mark corresponding to the secondary interrupt;
when the event mark corresponding to the secondary interrupt is used for indicating to-be-processed, executing a preset operation corresponding to the secondary interrupt;
and when the event mark corresponding to the secondary interrupt is used for indicating the completion of the processing, exiting the secondary interrupt.
In some optional embodiments, the interrupt control device is further configured to process each secondary interrupt corresponding to the current mode in the following manner:
acquiring an interrupt function corresponding to the current mode;
and processing one or more secondary interrupts corresponding to the current mode by using the interrupt function corresponding to the current mode.
The processing one or more secondary interrupts corresponding to the current mode by using the interrupt function corresponding to the current mode includes:
acquiring an interrupt function of each interrupt source corresponding to the current mode by using the interrupt function corresponding to the current mode;
and processing one or more secondary interrupts generated by one of the interrupt sources by using the interrupt function of the one of the interrupt sources corresponding to the current mode.
In some alternative embodiments, the plurality of modes correspond to the same interrupt vector address;
the interrupt control device is further configured to:
setting an interrupt function corresponding to the interrupt vector address as an interrupt function corresponding to the current mode;
the interrupt control device is further configured to obtain an interrupt function corresponding to the current mode as follows:
and when the implantable medical equipment is detected to meet an interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address.
In some alternative embodiments, the plurality of modes correspond to different interrupt vector addresses;
the interrupt control device is further configured to obtain an interrupt function corresponding to the current mode as follows:
and when the implantable medical equipment is detected to meet the interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address corresponding to the current mode.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an interrupt control device according to an embodiment of the present application, where the interrupt control device 200 includes at least one memory 210, at least one processor 220, and a bus 230 connecting different platform systems.
The memory 210 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)211 and/or cache memory 212, and may further include Read Only Memory (ROM) 213.
The memory 210 further stores a computer program, and the computer program can be executed by the processor 220, so that the processor 220 executes the steps of any one of the methods in the embodiments of the present application, and the specific implementation manner of the method is consistent with the implementation manner and the achieved technical effect described in the embodiments of the method, and some contents are not described again.
Memory 210 may also include a utility 214 having at least one program module 215, such program modules 215 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Accordingly, the processor 220 may execute the computer programs described above, and may execute the utility 214.
Bus 230 may be a local bus representing one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or any other type of bus structure.
The interrupt control device 200 may also communicate with one or more external devices 240, such as a keyboard, pointing device, bluetooth device, etc., and may also communicate with one or more devices capable of interacting with the interrupt control device 200, and/or with any device (e.g., router, modem, etc.) that enables the interrupt control device 200 to communicate with one or more other computing devices. Such communication may be through input-output interface 250. Also, the interrupt control device 200 can communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 260. The network adapter 260 may communicate with other modules of the interrupt control device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the interrupt control device 200, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
The embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium is used for storing a computer program, and when the computer program is executed, the steps of any one of the methods in the embodiment of the present application are implemented, and a specific implementation manner of the method is consistent with the implementation manner and the achieved technical effect described in the embodiment of the method, and some contents are not described again.
Fig. 9 is a program product 300 provided in this embodiment for implementing the above-described interrupt control method, which may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product 300 of the present invention is not so limited, and in this application, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Program product 300 may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that can communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the C language or similar programming languages. The program code may execute entirely on the user's computing device, partly on an associated device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
While the present application is described in terms of various aspects, including exemplary embodiments, the principles of the invention should not be limited to the disclosed embodiments, but are also intended to cover various modifications, equivalents, and alternatives falling within the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An interrupt control device for enabling and disabling a one-level interrupt of a plurality of modes of an implantable medical device, the plurality of modes including a boot mode corresponding to an upgraded boot program and an application mode corresponding to an application program, the interrupt control device configured to:
upon detecting that the implantable medical device satisfies an interrupt disable condition, disabling one-level interrupts for the plurality of modes to complete execution of operations of the implantable medical device that triggered the interrupt disable condition;
obtaining an interruption allowing condition corresponding to the interruption prohibiting condition;
when the implantable medical device is detected to meet the interrupt-enable condition corresponding to the interrupt-disable condition, enabling one-level interrupts for the plurality of modes.
2. The interrupt control apparatus according to claim 1,
the interrupt disable condition is: the implantable medical device performs a mode switching operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: completing the execution of the mode switching operation of the implantable medical device, and entering a main loop of a current mode; or,
the interrupt prohibition conditions are: performing an erase/write flash operation; the interrupt allowance condition corresponding to the interrupt prohibition condition is as follows: the flash memory erasing/writing operation is completed; or,
the interrupt disable condition is: performing assignment and calculation operation of atomic operation; the interrupt enabling condition corresponding to the interrupt prohibiting condition is as follows: the assignment of the atomic operation and the execution of the computing operation are completed; or,
the interrupt disable condition is: entering a subroutine that is executing the interrupt; the interrupt allowance condition corresponding to the interrupt prohibition condition is as follows: exiting the subroutine that is executing the interrupt.
3. The interrupt control apparatus according to claim 1, wherein the interrupt disabled condition is a secondary interrupt occurring at an interrupt source of the implantable medical device;
the interrupt control device is further configured to:
and when secondary interruption of the interruption source of the implantable medical device is monitored, after primary interruption of the multiple modes is forbidden, processing one or more secondary interruptions corresponding to the current mode.
4. The interrupt control device of claim 3, wherein the interrupt control device is further configured to process each secondary interrupt corresponding to the current mode by:
acquiring an event mark corresponding to the secondary interrupt;
when the event mark corresponding to the secondary interrupt is used for indicating to-be-processed, executing a preset operation corresponding to the secondary interrupt;
and when the event mark corresponding to the secondary interrupt is used for indicating the completion of the processing, exiting the secondary interrupt.
5. The interrupt control device of claim 3, wherein the interrupt control device is further configured to process each secondary interrupt corresponding to the current mode by:
obtaining an interrupt function corresponding to the current mode;
and processing one or more secondary interrupts corresponding to the current mode by using the interrupt function corresponding to the current mode.
6. The apparatus according to claim 5, wherein said processing one or more secondary interrupts corresponding to the current mode using the interrupt function corresponding to the current mode comprises:
acquiring an interrupt function of each interrupt source corresponding to the current mode by using the interrupt function corresponding to the current mode;
and processing one or more secondary interrupts generated by one of the interrupt sources by using the interrupt function of the one of the interrupt sources corresponding to the current mode.
7. The interrupt control apparatus of claim 5, wherein the plurality of modes correspond to a same interrupt vector address;
the interrupt control device is further configured to:
setting the interrupt function corresponding to the interrupt vector address as the interrupt function corresponding to the current mode;
the interrupt control device is further configured to obtain an interrupt function corresponding to the current mode as follows:
and when the implantable medical equipment is detected to meet an interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address.
8. The interrupt control apparatus of claim 5, wherein the plurality of modes correspond to different interrupt vector addresses;
the interrupt control device is further configured to obtain an interrupt function corresponding to the current mode as follows:
and when the implantable medical equipment is detected to meet the interrupt prohibition condition, acquiring an interrupt function corresponding to the current mode based on the interrupt vector address corresponding to the current mode.
9. An interrupt control method for enabling and disabling a one-level interrupt of a plurality of modes of an implantable medical device, the plurality of modes including a boot mode corresponding to an upgraded boot program and an application mode corresponding to an application program, the interrupt control method comprising:
upon detecting that the implantable medical device satisfies an interrupt disable condition, disabling one-level interrupts for the plurality of modes to complete execution of operations of the implantable medical device that triggered the interrupt disable condition;
obtaining an interruption allowing condition corresponding to the interruption prohibiting condition;
when the implantable medical device is detected to meet the interrupt-enable condition corresponding to the interrupt-disable condition, enabling one-level interrupts for the plurality of modes.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when being executed by a processor, carries out the steps of the method as claimed in claim 9.
CN202210307755.0A 2022-03-25 2022-03-25 Interrupt control apparatus, method and computer-readable storage medium Pending CN114664427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210307755.0A CN114664427A (en) 2022-03-25 2022-03-25 Interrupt control apparatus, method and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210307755.0A CN114664427A (en) 2022-03-25 2022-03-25 Interrupt control apparatus, method and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN114664427A true CN114664427A (en) 2022-06-24

Family

ID=82033215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210307755.0A Pending CN114664427A (en) 2022-03-25 2022-03-25 Interrupt control apparatus, method and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN114664427A (en)

Similar Documents

Publication Publication Date Title
US10269452B2 (en) Downloading and booting method and system for a wearable medical device
CN108255582B (en) Method, system, equipment and storage medium for garbage recovery of java virtual machine
TWI667588B (en) Computing device, method and machine readable storage media for detecting unauthorized memory accesses
US8782643B2 (en) Device and method for controlling communication between BIOS and BMC
CN103631656A (en) Task scheduling in big and little cores
US8930318B1 (en) Systems and methods for handling interruptions while updating of an electronic device
CN107391174B (en) Control method and control device for online upgrading of system
US7134050B2 (en) Method and system for containing software faults
JP2009129463A (en) Processing method of temporary error in real time system of vehicle controller
CN114664427A (en) Interrupt control apparatus, method and computer-readable storage medium
CN1877471A (en) Task management apparatus and method for control apparatus
CN117234729B (en) Dynamic memory protection method, device, computer equipment and storage medium
US8347149B2 (en) System and method for providing fault tolerant processing in an implantable medical device
TWI603265B (en) Integrated-circuit radio
CN111400087A (en) Control method of operating system, terminal and storage medium
CN109151144B (en) Hardware management method, device, system, computer equipment and storage medium
CN110362448A (en) A kind of GPU management-control method and relevant apparatus
CN112540871A (en) Method for realizing general register reservation and recovery
US20040268332A1 (en) Memory access control method and processing system with memory access check function
CN102214134A (en) System and method for terminating computer process
CN113569231B (en) Multiprocess MPU protection method and device and electronic equipment
CN110928827B (en) Optimized method and device for accessing PCIe device
CN114741223A (en) Watchdog control apparatus, method and computer-readable storage medium
CN113271367B (en) Parallel limitation method and device, electronic equipment and computer readable storage medium
US20240221927A1 (en) Implantable medical device (imd) with code path metrics

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 215000 building C16, bio nano Park, 218 Xinghu street, Suzhou Industrial Park, Jiangsu Province

Applicant after: Jingyu Medical Technology (Suzhou) Co.,Ltd.

Address before: 215000 building C16, bio nano Park, 218 Xinghu street, Suzhou Industrial Park, Jiangsu Province

Applicant before: SCENERAY Co.,Ltd.