Implantable neurostimulation devices
By designing a strategy for the default slave mode DMA module to switch the master sending mode in the implanted neurostimulation device, the master-slave mode mixed communication of the IIC bus is realized, which improves the communication speed and reliability between the units in the device and solves the problem of solves the problem of insufficient transmission speed and flexibility.
Patent Information
- Application Number
- CN202010276300.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-09
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-04-09
AI Technical Summary
The traditional IIC bus has a master-slave mode conflict in implantable neurostimulation devices, resulting in insufficient transmission flexibility from the slave device and difficulty in meeting data transmission needs.
An implantable neurostimulation device is designed, in which the pulse output unit and communication unit are respectively equipped with a direct memory access module and an integrated circuit bus module. All units default to slave mode and are switched to the master sending mode through the DMA module for data transmission. And after the data is sent, it switches back to the slave receiving mode to achieve mixed communication in the master-slave mode.
It improves the communication speed and reliability between units in the device and solves the problem of insufficient transmission speed and flexibility.
Smart Images

Figure CN111420277B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic medical devices, and in particular to an implantable neural stimulation device. Background Art
[0002] An implantable neurostimulation device is an electronic medical device with multiple functional units. The device needs to communicate with an external control device, receive control data or send device data, etc., and various functional units such as pulse generators and communication units often need to send and receive data to maintain the normal operation of each unit.
[0003] IIC (Inter-Integrated Circuit) modules are widely used in data transmission. Compared with other buses, IIC only needs one clock line and one data line to achieve data interaction. It also has the characteristics of fast transmission rate and high accuracy. IIC has two working modes: host and slave. When two devices equipped with IIC modules communicate, they usually need to negotiate their respective modes, that is, one is the host and the other is the slave, and match their respective addresses to achieve correct transmission. Due to the possible conflict between the master and slave modes, IIC can be a bit tricky to apply and has limitations in some application scenarios.
[0004] In the traditional IIC transmission mode, a device can only implement one master-slave mode. In this transmission mode, the bus is controlled by the master device. The slave device can only passively receive, but cannot actively seize the bus. When the slave device has a transmission requirement, the master device can only control the bus to achieve data transmission. This mode greatly limits the flexibility of slave device transmission and is difficult to meet the data transmission requirements of implantable neural stimulation devices. Summary of the invention
[0005] In view of this, the present invention provides an implantable neural stimulation device, comprising: a pulse output unit for outputting an electrical stimulation signal, and a communication unit for performing data interaction with an external control device, wherein the pulse output unit and the communication unit are respectively provided with a direct memory access module and an integrated circuit bus module, and are connected via an integrated circuit bus;
[0006] The pulse output unit and the communication unit are initialized to a data receiving mode. When any one of the units needs to send data, it switches to a data sending mode, reads data through the direct memory access module, sends data through the integrated circuit bus module, and switches to a data receiving mode after the data is sent.
[0007] Optionally, it also includes an accelerometer unit for determining human body posture, which is provided with an integrated circuit bus module, connected to the pulse output unit and the communication unit through the integrated circuit bus, and its initialization state is a data receiving mode. When data needs to be sent, it switches to a data sending mode, sends data through the integrated circuit bus module, and switches to a data receiving mode after the data is sent.
[0008] Optionally, when multiple units send data simultaneously, the unit that outputs a low-level data bit first maintains a data sending mode, and the other units switch to a data receiving mode.
[0009] Optionally, the data sending unit compares each bit of data output by its integrated circuit bus module with the original data, and when a data bit with inconsistent level is detected, stops sending data and switches to data receiving mode.
[0010] Optionally, the pulse output unit and the communication unit are respectively provided with two direct memory access modules, and the two direct memory access modules are respectively associated with the receiving end and the sending end of the integrated circuit bus module; the event source of the two direct memory access modules is configured as the integrated circuit bus module; the buffer of the two direct memory access modules is associated with the receiving and sending buffer areas of the integrated circuit bus module.
[0011] Optionally, after the direct memory access module is enabled, the integrated circuit bus module receives data and stores the data in the cache area into a receiving buffer of the direct memory access module.
[0012] Optionally, after the direct memory access module is enabled, data in the buffer is taken out to a sending buffer area of the integrated circuit bus module, so that the integrated circuit bus module sends the data.
[0013] Optionally, the data sent through the integrated circuit bus module includes address information for indicating a unit that receives the data.
[0014] Optionally, the communication unit is a Bluetooth communication unit.
[0015] According to the implantable neural stimulation device provided by the present invention, the pulse output unit and the communication unit therein have a DMA module and an IIC module respectively, and all units on the IIC bus are slave devices by default and are configured in receiving mode. When data needs to be sent, switch to the master sending mode to complete the data transmission, and then switch to the default slave mode. Under such a control strategy, the master and slave mode mixed communication of the bus unit can be cleverly realized, the storage unit in the single-chip microcomputer is directly operated based on the DMA transmission method, and the use of IIC communication can transmit data at a higher rate, thereby improving the communication speed and reliability between the units in the implantable neural stimulation device. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 An implantable neural stimulation device according to an embodiment of the present invention;
[0018] Figure 2 This is another implantable neural stimulation device in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0021] An embodiment of the present invention provides an implantable neural stimulation device, such as Figure 1 As shown, it includes a pulse output unit 11 for outputting an electrical stimulation signal for treating human diseases, and a communication unit 12 for exchanging data with an external control device. The pulse output unit 11 outputs stimulation signals according to set parameters, such as pulse frequency, amplitude, pulse width, etc. The external control device can set these parameters through the communication unit 12; the communication unit 12 can also send the current working parameters to the external control device. Therefore, data transmission is often required between the pulse output unit 11 and the communication unit 12.
[0022] In order to improve the data transmission speed, the pulse output unit 11 and the communication unit 12 in this embodiment adopt IIC (Inter-Integrated Circuit) communication based on DMA (Direct Memory Access) transmission mode. The pulse output unit 11 and the communication unit 12 are respectively provided with a direct memory access (DMA) module and an integrated circuit bus (IIC) module, and the two are connected through IIC.
[0023] The pulse output unit 11 and the communication unit 12 are initialized to the data receiving mode, that is, all the units on the IIC are slaves by default. When any of the units needs to send data, it switches to the data sending mode (master sending mode), reads data through the DMA module, sends data through the IIC module, and switches to the data receiving mode after the data is sent. The specific implementation requires turning on the two-way DMA modules of the microcontroller, which are respectively associated with the reception and transmission of the IIC module; configuring the event source of the two DMA modules to be IIC, and defining the DMA array cache to associate the IIC reception and transmission buffer areas.
[0024] For example, when the communication unit 12 receives the setting data of the working parameters sent by the in vitro control device and needs to transmit the setting data to the pulse output unit 11, the communication unit 12 switches from the data receiving mode to the data sending mode. In the master sending mode, the IIC data is sent to the bus and the slave address is specified so that the slave can receive the data. Specifically, after the communication unit 12 turns on the DMA module, the IIC module sends data, and the DMA module directly takes out the data from the sending buffer defined by the DMA to the IIC sending buffer, thereby speeding up the sending rate of the IIC. After the data is sent, the communication unit 12 switches back to the default slave receiving mode to receive the response data sent back by other devices or the data sent by the host.
[0025] As a slave, the pulse output unit 11 determines whether the data is sent to the local machine according to the address information in the IIC data. For data determined to be sent to the local machine, the pulse output unit 11 turns on the DMA module, and the IIC module receives the data. The data in the receiving buffer area will be directly stored in the receiving buffer defined by the DMA. After the reception is completed, data processing can be performed, such as changing the working parameters according to the set data. The data reception process needs to be completed in the IIC receiving interrupt, and the IIC module uses interrupt reception to realize data reception in slave mode.
[0026] When the pulse output unit 11 needs to send the current working parameters to the in vitro control device, similar to the above example, the pulse output unit 11 switches to the data sending mode, sends IIC data as the host, and switches back to the data receiving mode after the transmission is completed; the communication unit 12 receives IIC data as a slave, and can perform data processing after the reception is completed, such as sending the working parameters to the in vitro control device.
[0027] According to the implantable neural stimulation device provided by the embodiment of the present invention, the pulse output unit and the communication unit therein have a DMA module and an IIC module respectively, and all units on the IIC bus are slave devices by default and are configured in receiving mode. When data needs to be sent, switch to the master sending mode to complete the data transmission, and then switch to the default slave mode. Under such a control strategy, the master and slave mode mixed communication of the bus unit can be cleverly realized, the storage unit in the single-chip microcomputer can be directly operated based on the DMA transmission method, and the use of IIC communication can transmit data at a higher rate, thereby improving the communication speed and reliability between the units in the implantable neural stimulation device.
[0028] Another embodiment of the present invention provides an implantable neural stimulation device, such as Figure 2 As shown, it includes a pulse output unit 21, a Bluetooth communication unit 22, and an accelerometer unit 23 for determining the posture of the human body. The pulse output unit 21 outputs a stimulation signal according to the set parameters, such as pulse frequency, amplitude, pulse width, etc. The external control device can set these parameters through the Bluetooth communication unit 22, the Bluetooth communication unit 22 can also send the current working parameters to the external control device, and the accelerometer unit 23 can send the human posture information to the external control device. Therefore, data transmission is often required between the pulse output unit 21 and the Bluetooth communication unit 22, and between the accelerometer unit 23 and the Bluetooth communication unit 22.
[0029] The pulse output unit 21, the Bluetooth communication unit 22 and the accelerometer unit 23 are all devices on the IIC, and all three are initialized to the data receiving mode and are slaves by default. The data transmission process between the pulse output unit 21 and the Bluetooth communication unit 22 can refer to the previous embodiment. This embodiment mainly introduces the communication process between the accelerometer unit 23 and the Bluetooth communication unit 22, as well as the situation and response method of the bus conflict.
[0030] The accelerometer unit 23 generates acceleration data according to the movement of the human body. When the acceleration data needs to be sent to the external control device, it switches from the data receiving mode to the data sending mode. In the master sending mode, IIC data is sent to the bus and the slave address is specified so that the slave can receive data. After the data is sent, the accelerometer unit 23 switches back to the default slave receiving mode to receive the response data sent back by other devices or the data sent by the host.
[0031] The Bluetooth communication unit 22 acts as a slave and determines whether the data is sent to the local device according to the address information in the IIC data. For data determined to be sent to the local device, the Bluetooth communication unit 22 turns on the DMA module, and the IIC module receives the data. The data in the receiving buffer area will be directly stored in the receiving buffer defined by the DMA. After the reception is completed, the data can be processed, such as sending the acceleration data to the external control device.
[0032] There are three devices on the IIC in this embodiment. When two or more devices switch to the main transmission mode at the same time, a bus conflict problem may occur. For example, when the pulse output unit 21 and the accelerometer unit 23 send data to the Bluetooth communication unit 22 at the same time, bus arbitration occurs.
[0033] In order to ensure the normal operation of each unit on the IIC, reasonable bus arbitration is required. In this regard, the bus preemption flag in the IIC module can be judged to determine whether the bus preemption occurs. In view of the "line and" characteristics of the IIC, the signal waveform obtained on the data line is the result of the data sent by the pulse output unit 21 and the accelerometer unit 23. Each time the two units send a data bit, they detect the signal level at their output end. If the detection result is consistent with the expected level (the data bit of the original data), they continue to occupy the bus, otherwise they give up the bus control.
[0034] For example, after the bus is started, the pulse output unit 21 wants to send data "101...", and the accelerometer unit 23 wants to send data "100...". After starting to send these data, the third bit of the pulse output unit 21 is expected to send "1", that is, to send a high level in the third clock cycle. During the high level period of this clock cycle, when the pulse output unit 21 detects an unmatched level "0", the pulse output unit 21 abandons the bus control right and switches back to the data receiving mode, thereby making the accelerometer unit 23 the only sender, and the bus control right obtains the arbitration result, thereby realizing the function of bus arbitration.
[0035] According to the above bus arbitration process, the pulse output unit 21 and the accelerometer unit 23 will not lose data during the arbitration process, and each master device has no priority level. The bus control right is randomly determined, and even the unit that sends data first does not necessarily have the control right. The implant device of this embodiment follows the arbitration principle of "low level first", and the bus is awarded to the unit that sends a low level on the data line first, while other units that send a high level will lose the bus control right.
[0036] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0037] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0038] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0039] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0040] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.
Claims
1. An implantable neural stimulation device, characterized in that: include: A pulse output unit for outputting electrical stimulation signals, and a communication unit for performing data interaction with an external control device, wherein the pulse output unit and the communication unit are respectively provided with a direct memory access module and an integrated circuit bus module, and are directly connected via an integrated circuit bus; The pulse output unit outputs a stimulation signal according to set parameters, wherein the parameters include pulse frequency, amplitude, and pulse width. The external control device can set the parameters through the communication unit, and the communication unit can send the parameters currently used by the pulse output unit to the external control device; The pulse output unit and the communication unit are initialized to a data receiving mode. When any one of the units needs to send data, it switches to a data sending mode, reads data through the direct memory access module, sends data through the integrated circuit bus module, and switches to a data receiving mode after the data is sent.
2. The implantable neural stimulation device according to claim 1, characterized in that: It also includes an accelerometer unit for determining human body posture, which is provided with an integrated circuit bus module, connected to the pulse output unit and the communication unit through the integrated circuit bus, and its initialization state is a data receiving mode. When data needs to be sent, it switches to a data sending mode, sends data through the integrated circuit bus module, and switches to a data receiving mode after the data is sent.
3. The implantable neural stimulation device according to claim 1 or 2, characterized in that: When multiple units send data at the same time, the unit that outputs a low-level data bit first maintains the data sending mode, and the other units switch to the data receiving mode.
4. The implantable neural stimulation device according to claim 3, characterized in that: The unit sending data compares each bit of data output by its integrated circuit bus module with the original data. When a data bit with inconsistent level is detected, it stops sending data and switches to data receiving mode.
5. The implantable neural stimulation device according to claim 1, characterized in that: The pulse output unit and the communication unit are respectively provided with two direct memory access modules, and the two direct memory access modules are respectively associated with the receiving end and the sending end of the integrated circuit bus module; the event source of the two direct memory access modules is configured as the integrated circuit bus module; the buffer of the two direct memory access modules is associated with the receiving and sending buffer areas of the integrated circuit bus module.
6. The implantable neural stimulation device according to claim 5, characterized in that: After the direct memory access module is turned on, the integrated circuit bus module receives data and stores the data in the cache area into the receiving buffer of the direct memory access module.
7. The implantable neural stimulation device according to claim 5, characterized in that: After the direct memory access module is turned on, the data in the buffer is taken out to the sending buffer area of the integrated circuit bus module, so that the integrated circuit bus module sends the data.
8. The implantable neural stimulation device according to claim 1 or 2, characterized in that: The data sent through the integrated circuit bus module includes address information for indicating a unit receiving the data.
9. The implantable neural stimulation device according to claim 1 or 2, characterized in that: The communication unit is a Bluetooth communication unit.
