CN104539494A - Method and system for identifying awakening signals - Google Patents

Method and system for identifying awakening signals Download PDF

Info

Publication number
CN104539494A
CN104539494A CN201510017196.XA CN201510017196A CN104539494A CN 104539494 A CN104539494 A CN 104539494A CN 201510017196 A CN201510017196 A CN 201510017196A CN 104539494 A CN104539494 A CN 104539494A
Authority
CN
China
Prior art keywords
dominant
data
dominant position
signal
continuous
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.)
Granted
Application number
CN201510017196.XA
Other languages
Chinese (zh)
Other versions
CN104539494B (en
Inventor
郭锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech 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 Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN201510017196.XA priority Critical patent/CN104539494B/en
Publication of CN104539494A publication Critical patent/CN104539494A/en
Application granted granted Critical
Publication of CN104539494B publication Critical patent/CN104539494B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method and system for identifying awakening signals. The method includes the steps that after a local area internet LIN node gets into the sleeping state, an SCI is enabled to receive interrupt signals and transmit the received interrupt signals to a receiving register, wherein the interrupt signals include data interrupt signals and error interrupt signals; data of the interrupt signals in the receiving register are read; the duration time of dominant bits in the data is calculated; when a value of the duration time is larger than a preset numerical value, the interrupt signals are the awakening signals; the awakening signals are identified through the adoption of the method.

Description

A kind of method and system identifying wake-up signal
Technical field
The present invention relates to communication technical field, particularly relate to a kind of method and system identifying wake-up signal.
Background technology
Existing LIN (Local Interconnect Network, Local Interconnect Network) be the network that these simple control appliances of switch, display, transducer and actuator are coupled together, LIN utilizes a kind of agreement of opening to be therefore widely used in automobile because its cost is low, industry or household electrical appliances etc.; LIN is a kind of network firmly, to be limited in scope, and connects simple control appliance in short distance.
LIN communication can realize based on SCI (Serial Communication Interface, serial communication interface) module, and from the angle of communications protocol, a LIN network is made up of from machine task module a host task module and several.In host node, existing host task module has again from machine task module; Only from machine task module in other node.In LIN network, host task module determines when in bus, transmit what message frame, then provides each frame to need the data transmitted from machine task module.Host task module and be all the part of frame processing layer from task module.According to LIN normalized definition, when bus free exceedes certain hour, LIN host node should jump to Sleep (sleep) state with other intra-node states and task module, should be able to correct identification bus wake-up signal under Sleep state, according to LIN normalized definition, it is 150 microseconds to the dominant level of 5 milliseconds that wake-up signal requires.
LIN is the wake-up signal identifying that LIN bus occurs from one of them function of machine task module.While LIN intra-node state transfers Sleep state to, SCI module should be made to be in the wake-up signal that can receive LIN bus, present common way is, starts the timer of a pulse width measure, and whether the wake-up signal occurred for measuring bus meets the demands.
But identify in prior art that the method for wake-up signal needs to take the timer resource of micro-control unit MCU, first, unnecessary timer is there is no in the realization with cost-saving being main purpose LIN bus, transplant hardware-related software in addition more a lot of with the complex software of hardware independent than simple transplanting, because when LIN software module needs the problem of implementation more also will considering the situation such as timer function of related hardware when transplanting, so, if make to wake Signal analysis function and hardware independent up, greatly can reduce the hardware independence of software, thus improve the flexibility of software.
Therefore, how to make identification wake-up signal function and hardware independent, reducing the hardware independence of software, is those skilled in the art's technical issues that need to address.
Summary of the invention
The object of this invention is to provide a kind of method identifying wake-up signal, the method can identify wake-up signal accurately; Another object of the present invention is to provide a kind of system identifying wake-up signal.
For solving the problems of the technologies described above, the invention provides a kind of method identifying wake-up signal, the method comprises:
After local internet LIN node enters sleep state, enable serial communication interface SCI, make SCI receive interruption signal, and make SCI that received interrupt signal is sent to receiving register, described interrupt signal comprises data interrupt signal and error interrupt signal;
Read the data of the interrupt signal in described receiving register;
Calculate the duration of the dominant position in described data;
When the described duration be greater than predetermined value then described interrupt signal be wake-up signal.
Wherein, the duration of the dominant position in the described data of described calculating comprises:
The bit time in described data is calculated according to baud rate;
Calculate the number of continuous dominant position in described data;
According to the number of dominant position continuous in institute's bit time and described data, calculate the duration of the continuous dominant position in data.
Wherein, the duration of the dominant position in the described data of described calculating comprises:
Calculate the bit time in described data according to baud rate, wherein, when institute, bit time is greater than predetermined value, then described interrupt signal is wake-up signal.
Wherein, the method calculating the number of continuous dominant position in described data described in comprises:
Detect the data bit in described data, by each data bit in described data and 1 phase with, calculate result;
When described result is 0, the count value of dominant digit counter is added 1;
When described result is 1, records the number of the continuous dominant position in current dominant digit counter, and the count value of dominant digit counter is set to 0;
Each data bit in described data all with 1 phase with after, determining the individual count value in dominant digit counter, is the number of continuous dominant position each in described data.
Wherein, the number calculating continuous dominant position in described data described in comprises:
Detect the data bit in described data, by each data bit in described data and 1 phase with, calculate result;
When described result is 0, the count value of dominant digit counter is added 1; When described result is 1, records the number of the continuous dominant position in current dominant digit counter, the count value of dominant digit counter is set to 0;
If the number of the continuous dominant position in the dominant digit counter of current record, when the duration of corresponding dominant position is greater than described predetermined value, then determining the count value of current dominant digit counter, is the number of dominant position continuous in described data.
Wherein, the number calculating continuous dominant position in described data described in comprises:
Detect the data bit in described data, by each data bit in described data and 1 phase with, calculate result;
When described result is 0, the count value of dominant digit counter is added 1, record the number of the continuous dominant position in current dominant digit counter;
If the number of the continuous dominant position in the dominant digit counter of current record, when the duration of corresponding dominant position is greater than described predetermined value, then determining the count value of current dominant digit counter, is the number of dominant position continuous in described data.
The invention provides a kind of system identifying wake-up signal, this system comprises: enable module, read module, computing module, determination module, wherein,
Enable module, for after local internet LIN node enters sleep state, enable serial communication interface SCI, makes SCI receive interruption signal, and makes SCI that received interrupt signal is sent to receiving register;
Read module, for reading the data of the interrupt signal in described receiving register;
Computing module, for calculating the duration of the dominant position in described data;
Determination module, for whether being greater than predetermined value according to the described duration, judges whether described interrupt signal is wake-up signal.
Wherein, described computing module comprises: bit time computing unit, dominant position number computing unit, duration calculation unit, wherein,
Bit time computing unit, for calculating the bit time in described data according to baud rate;
Dominant position number computing unit, for calculating the number of continuous dominant position in described data;
Duration calculation unit, for the number according to dominant position continuous in institute's bit time and described data, calculates the duration of the continuous dominant position in data.
Wherein, described dominant position number computing unit comprises: dominant position computation subunit, record subelement, wherein,
Dominant position computation subunit, for detecting the data bit in described data, by each data bit in described data and 1 phase with, calculate result;
Record subelement, calculates result for described in basis, records the numerical value of dominant position number.
Wherein, described determination module comprises: identifying unit, wherein,
Identifying unit, for whether being greater than predetermined value according to the described duration, judges whether described interrupt signal is wake-up signal.
Based on technique scheme, the method and system of the identification wake-up signal that the embodiment of the present invention provides, after local internet LIN node enters sleep state, enable serial communication interface SCI, make SCI receive interruption signal, and making SCI that received interrupt signal is sent to receiving register, described interrupt signal comprises data interrupt signal and error interrupt signal; Read the data of the interrupt signal in described receiving register; Calculate the duration of the dominant position in described data; When the described duration be greater than predetermined value then described interrupt signal be wake-up signal; Function and the hardware independent of identification wake-up signal can be made by said method, improve the hardware independence of software, decrease the dependence of LIN software to hardware resource, thus improve the portability of LIN software.
Accompanying drawing explanation
In order to the technical scheme of the clearer explanation embodiment of the present invention or prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The method flow diagram of the identification wake-up signal that Fig. 1 provides for the embodiment of the present invention;
The flow chart of the duration of the dominant position in described data is calculated in the method for the identification wake-up signal that Fig. 2 provides for the embodiment of the present invention;
The method flow diagram of the number of continuous dominant position in described data is calculated in the method for the identification wake-up signal that Fig. 3 provides for the embodiment of the present invention;
In the method for the identification wake-up signal that Fig. 4 provides for the embodiment of the present invention, another calculates the method flow diagram of the number of continuous dominant position in described data;
Calculate the method flow diagram of the number of continuous dominant position in described data one in the method for the identification wake-up signal that Fig. 5 provides for the embodiment of the present invention;
The method for optimizing flow chart of the identification wake-up signal that Fig. 6 provides for the embodiment of the present invention;
The structured flowchart of the system of the identification wake-up signal that Fig. 7 provides for the embodiment of the present invention;
The structured flowchart of the enable module that Fig. 8 provides for the embodiment of the present invention;
The structured flowchart of the read module that Fig. 9 provides for the embodiment of the present invention;
The structured flowchart of the computing module that Figure 10 provides for the embodiment of the present invention;
The structured flowchart of the dominant position number computing unit that Figure 11 provides for the embodiment of the present invention;
The structured flowchart of the determination module that Figure 12 provides for the embodiment of the present invention.
Embodiment
Core of the present invention is to provide a kind of method identifying wake-up signal, and the method can identify wake-up signal accurately; Another object of the present invention is to provide a kind of system identifying wake-up signal.
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Please refer to Fig. 1, Fig. 1 gives the method flow diagram of the identification wake-up signal that the embodiment of the present invention provides; The method comprises:
Step s100, after LIN (Interconnected network) node enters sleep state, enable SCI (serial communication interface), make SCI receive interruption signal, and making SCI that received interrupt signal is sent to receiving register, described interrupt signal comprises data interrupt signal and error interrupt signal;
After LIN enters sleep state, enable SCI, even if make LIN in a sleep state also can the wake-up signal of correct identification bus like this, here SCI can receive interruption signal, wherein, interrupt signal comprises: data interrupt signal and error interrupt signal, after SCI correctly receives interrupt signal, enter interrupt processing flow process, make SCI that the interrupt signal received is sent to receiving register.
Step s110, read the data of the interrupt signal in described receiving register;
In LIN communication, a signal comprises start bit, data bit, position of rest, wherein the form of start bit and position of rest is all 1 i.e. 1Bit, and start bit is the dominant level of a bit time and dominant position, and position of rest is the recessive level of a bit time and recessive position, the form carrying out the data bit in transfer of data is 8 i.e. 8Bit, and adopts LSB mode to send; Therefore, can see that interrupt signal is a digital signal.
Here deposit this interrupt signal by receiving register, in described receiving register, read the data entrained by interrupt signal, information of ascending the throne and low and high level.
The duration of step s120, the dominant position calculated in described data;
By the data of interrupt signal, the time that the dominant position calculating this interrupt signal continues.
Step s130, when the described duration be greater than predetermined value then described interrupt signal be wake-up signal.
Due in LIN communication, wake-up signal requires it is 150 delicate to 5 delicate dominant level, therefore when the time that the dominant position of this interrupt signal calculated continues, that is itself and predetermined value 150 delicately to be compared, be greater than 150 delicate when the time that the dominant position of this interrupt signal calculated continues, then this interrupt signal is wake-up signal.
The invention discloses a kind of method identifying wake-up signal, the method comprises: after local internet LIN node enters sleep state, enable serial communication interface SCI, make SCI receive interruption signal, and making SCI that received interrupt signal is sent to receiving register, described interrupt signal comprises data interrupt signal and error interrupt signal; Read the data of the interrupt signal in described receiving register; Calculate the duration of the dominant position in described data; When the described duration be greater than predetermined value then described interrupt signal be wake-up signal; Utilize said method identification wake-up signal, and make identification wake-up signal function and hardware independent, improve the hardware independence of software, decrease the dependence of LIN software to hardware resource, thus improve the portability of LIN software.
Optionally, Fig. 2 gives the flow chart of the duration calculating the dominant position in described data in the method for the identification wake-up signal that the embodiment of the present invention provides; With reference to Fig. 2, the method calculating the duration of the dominant position in described data comprises:
Step s200, calculate the bit time in described data according to baud rate;
Wherein, baud rate is: single-chip microcomputer or the speed of computer when serial communication; Refer to the modulated change later within the unit interval of signal, i.e. the number of times of unit interval intercarrier Parameters variation.Therefore the bit time of data in interrupt signal can be calculated according to baud rate.
Step s210, calculate the number of continuous dominant position in described data;
Step s220, number according to dominant position continuous in institute's bit time and described data, calculate the duration of the continuous dominant position in data.
Due to the quantity of the continuous dominant position of length=bit time * of wake-up signal;
Therefore both can have been calculated the duration of continuous dominant position in interrupt signal data by step s200 and step s210, just can judge this interrupt signal whether as wake-up signal according to this duration.
Preferably, calculate the bit time in described data according to baud rate, wherein, when institute, bit time is greater than predetermined value, then described interrupt signal is wake-up signal.
Here after calculating bit time, just once compared with predetermined value by the numerical value of bit time, if be greater than described predetermined value, then this interrupt signal is wake-up signal, can not the sequence of operations such as the calculating of data bit in interrupt signal be carried out, decrease the complexity of operation; Also can save time, identify this wake-up signal fast.
Optionally, Fig. 3 gives the method flow diagram of the number calculating continuous dominant position in described data in the method for the identification wake-up signal that the embodiment of the present invention provides; With reference to Fig. 3, the method calculating the number of continuous dominant position in described data comprises:
Step s300, the data bit detected in described data, by each data bit in described data and 1 phase with, calculate result;
Whether calculating is here dominant position to calculate this data bit, and be " 0 " because dominant position is dominant level, recessive position is recessive level is " 1 "; Not only can use with " 1 " with calculate, can also use with " 0 " mutually or, as long as etc. can judge that this position is low level or high level; But be a preferred version herein, reason is, can avoid signal disturbing like this and produce erroneous judgement, is judged to be recessive position by dominant position, and recessive position is judged to be dominant position, improve the accuracy calculated.
Step s310, when described result is 0, the count value of dominant digit counter is added 1;
Here result be 0 explanation with 1 phase and position be 0, be then dominant position.Utilize dominant digit counter to count, added 1.
Wherein, when calculating first data bit, the dominant digit counter of initialization, is set to 1 by its numerical value, because the start bit of interrupt signal is dominant position, therefore, is set to 1 when this is in beginning.
Step s320, when described result is 1, records the number of the continuous dominant position in current dominant digit counter, and the count value of dominant digit counter is set to 0;
Here result be 1 explanation with 1 phase and position be 1, be then recessive position; So just show that the dominant position of continuous print stops, therefore the count value in current dominant digit counter is recorded, be the number of the dominant position of continuous print, after record, will by its clear 0, because be not the dominant position of continuous print, the number recording continuous dominant position to be recalculated from next data bit below.
Step s330, each data bit in described data all with 1 phase with after, determining the individual count value in dominant digit counter, is the number of continuous dominant position each in described data.
Here be data bit all in this interrupt signal are all carried out calculating to judge, we can obtain all in an interrupt signal is like this numerical value of the number of the dominant position of continuous print,
Therefore, when calculating prolongeding time afterwards, the greatest measure of the continuous dominant position number recorded can be looked in dominant digit counter, utilize this numerical value can calculate the maximum dominant bit duration of this interrupt signal.
When this duration is greater than predetermined value, then this interrupt signal is wake-up signal.
Optionally, Fig. 4 gives in the method for the identification wake-up signal that the embodiment of the present invention provides that another calculates the method flow diagram of the number of continuous dominant position in described data; With reference to Fig. 4, another method calculating the number of continuous dominant position in described data comprises:
Step s400, the data bit detected in described data, by each data bit in described data and 1 phase with, calculate result;
Step s410, when described result is 0, the count value of dominant digit counter is added 1; Step s420, when described result is 1, records the number of the continuous dominant position in current dominant digit counter, the count value of dominant digit counter is set to 0;
If the number of the continuous dominant position in the dominant digit counter of step s430 current record, when the duration of corresponding dominant position is greater than described predetermined value, then determining the count value of current dominant digit counter, is the number of dominant position continuous in described data.
Here successively the number record of dominant position continuous in dominant digit counter is gone out in this interrupt signal, with Fig. 3 unlike, here not data bit all in this interrupt signal are all carried out calculating to judge, but when often recording once the number of the continuous dominant position in current dominant digit counter, then determine the count value of current dominant digit counter, for the number of dominant position continuous in described data, the number of this continuous dominant position in dominant digit counter is taken out and is multiplied with bit time, calculate this duration, and this duration and predetermined value are compared, the duration of dominant position is when being greater than described predetermined value, then this interrupt signal is wake-up signal.
Compared with the method corresponding to Fig. 3, the method all can not calculate data bit all in described interrupt signal, namely identifies wake-up signal, more effectively.
Optionally, Fig. 5 to give in the method for the identification wake-up signal that the embodiment of the present invention provides a method flow diagram calculating the number of continuous dominant position in described data again; With reference to Fig. 5, then a method calculating the number of continuous dominant position in described data comprises:
Step s500, the data bit detected in described data, by each data bit in described data and 1 phase with, calculate result;
Step s510, when described result is 0, the count value of dominant digit counter is added 1, record the number of the continuous dominant position in current dominant digit counter;
Here be in the recording process of continuous dominant position, often increase by one, just a record numerical value.
If the number of the continuous dominant position in the dominant digit counter of step s520 current record, when the duration of corresponding dominant position is greater than described predetermined value, then determining the count value of current dominant digit counter, is the number of dominant position continuous in described data.
When often recording a numerical value in dominant digit counter, just utilize the number of the continuous dominant position in the dominant digit counter of current record, then determine the count value of current dominant digit counter, for the number of dominant position continuous in described data, the number of this continuous dominant position in dominant digit counter is taken out and is multiplied with bit time, calculate this duration, and this duration and predetermined value are compared, the duration of dominant position, when being greater than described predetermined value, then this interrupt signal was wake-up signal.
The method is compared with the method corresponding to Fig. 4, be while carry out the calculating of dominant position in fact, carry out the calculating of dominant bit duration, until when occurring that the duration of dominant position is greater than described predetermined value, then stop calculating, and described interrupt signal is wake-up signal.
Preferably, Fig. 6 gives the method for optimizing flow chart of the identification wake-up signal that the embodiment of the present invention provides; With reference to Fig. 6, identify that the method for optimizing of wake-up signal comprises:
Step s600, dominant digit counter are set to 1;
Here be because the start bit of interrupt signal is dominant position in LIN communication, therefore dominant digit counter be set to 1 herein, represent this dominant position of start bit.
Step s610, calculate bit time according to baud rate;
Here bit time is also the duration of this dominant position of start bit.
Step s620, judge whether institute's bit time is greater than predetermined value;
When bit time is greater than the scheduled time, then perform step s630;
When bit time is not more than the scheduled time, then perform step s640.
Step s630, this interrupt signal are wake-up signal;
When judging that this interrupt signal is wake-up signal, with regard to detection of end.
Whether step s640, current data position & 1 are 0;
Here present bit is from first of data bit, carries out successively according to testing process.
When result is 0, perform step s650;
When result is not 0, perform step s660.
Step s650, dominant digit counter is added 1, and the duration of the continuous dominant position of numerical computations according to bit time and dominant digit counter;
Step s660, by clear for dominant digit counter 0;
Described in step s670, determining step s650, whether the duration is greater than predetermined value;
When the described duration is greater than predetermined value, then perform step s630;
When the described duration is not more than predetermined value, then perform step s680.
Step s680, to judge whether total data position checks complete;
When total data position checks complete, then terminate;
When total data position does not check complete, then perform step s690.
Step s690, move to right one;
When described data bit does not check complete, check next bit data bit.
Based on technique scheme, the method of identification wake-up signal provided by the present invention, after local internet LIN node enters sleep state, enable serial communication interface SCI, make SCI receive interruption signal, and making SCI that received interrupt signal is sent to receiving register, described interrupt signal comprises data interrupt signal and error interrupt signal; Read the data of the interrupt signal in described receiving register; Calculate the duration of the dominant position in described data; When the described duration be greater than predetermined value then described interrupt signal be wake-up signal; The method can identify wake-up signal fast, function and the hardware independent of identification wake-up signal can be made by said method, improve the hardware independence of software, decrease the dependence of LIN software to hardware resource, thus improve the portability of LIN software.
The method of identification wake-up signal provided by the present invention, can carry out identification wake-up signal by said method.
Be introduced the system of identification wake-up signal provided by the present invention below, the system of identification wake-up signal described below can mutual corresponding reference with the method for above-described identification wake-up signal.
The structured flowchart of the system of the identification wake-up signal that Fig. 7 provides for the embodiment of the present invention; System with reference to Fig. 7 identification wake-up signal can comprise:
Enable module 100, for after local internet LIN node enters sleep state, enable serial communication interface SCI, makes SCI receive interruption signal, and makes SCI that received interrupt signal is sent to receiving register;
Read module 200, for reading the data of the interrupt signal in described receiving register;
Computing module 300, for calculating the duration of the dominant position in described data;
Determination module 400, for whether being greater than predetermined value according to the described duration, judges whether described interrupt signal is wake-up signal.
Optionally, the structured flowchart of enable module that provides for the embodiment of the present invention of Fig. 8; Comprise see Fig. 8 enable module 100:
Enable unit 110, for after local internet LIN node enters sleep state, enable serial communication interface SCI, makes SCI receive interruption signal, and makes SCI that received interrupt signal is sent to receiving register.
Optionally, the structured flowchart of read module that provides for the embodiment of the present invention of Fig. 9; Comprise see Fig. 9 read module 200:
Reading unit 210, for calculating the duration of the dominant position in described data.
Optionally, the structured flowchart of computing module that provides for the embodiment of the present invention of Figure 10; Comprise see Figure 10 computing module 300:
Bit time computing unit 310, for calculating the bit time in described data according to baud rate;
Dominant position number computing unit 320, for calculating the number of continuous dominant position in described data;
Duration calculation unit 330, for the number according to dominant position continuous in institute's bit time and described data, calculates the duration of the continuous dominant position in data.
Optionally, the structured flowchart of dominant position number computing unit that provides for the embodiment of the present invention of Figure 11; Comprise see Figure 11 dominant position number computing unit 320:
Dominant position computation subunit 321, for detecting the data bit in described data, by each data bit in described data and 1 phase with, calculate result;
Record subelement 322, calculates result for described in basis, records the numerical value of dominant position number.
Optionally, the structured flowchart of determination module that provides for the embodiment of the present invention of Figure 12; Comprise see Figure 12 determination module 400:
Identifying unit 410, for whether being greater than predetermined value according to the described duration, judges whether described interrupt signal is wake-up signal.
The system of identification wake-up signal provided by the present invention, can carry out identification wake-up signal by said system.
In specification, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For device disclosed in embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part illustrates see method part.
Professional can also recognize further, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with electronic hardware, computer software or the combination of the two, in order to the interchangeability of hardware and software is clearly described, generally describe composition and the step of each example in the above description according to function.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
The software module that the method described in conjunction with embodiment disclosed herein or the step of algorithm can directly use hardware, processor to perform, or the combination of the two is implemented.Software module can be placed in the storage medium of other form any known in random asccess memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Above the method and system of identification wake-up signal provided by the present invention are described in detail.Apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping.It should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention, can also carry out some improvement and modification to the present invention, these improve and modify and also fall in the protection range of the claims in the present invention.

Claims (10)

1. identify a method for wake-up signal, it is characterized in that, the method comprises:
After local internet LIN node enters sleep state, enable serial communication interface SCI, make SCI receive interruption signal, and make SCI that received interrupt signal is sent to receiving register, described interrupt signal comprises data interrupt signal and error interrupt signal;
Read the data of the interrupt signal in described receiving register;
Calculate the duration of the dominant position in described data;
When the described duration be greater than predetermined value then described interrupt signal be wake-up signal.
2. the method for claim 1, is characterized in that, the duration of the dominant position in the described data of described calculating comprises:
The bit time in described data is calculated according to baud rate;
Calculate the number of continuous dominant position in described data;
According to the number of dominant position continuous in institute's bit time and described data, calculate the duration of the continuous dominant position in data.
3. the method for claim 1, is characterized in that, the duration of the dominant position in the described data of described calculating comprises:
Calculate the bit time in described data according to baud rate, wherein, when institute, bit time is greater than predetermined value, then described interrupt signal is wake-up signal.
4. method as claimed in claim 2, is characterized in that, described in calculate the number of continuous dominant position in described data method comprise:
Detect the data bit in described data, by each data bit in described data and 1 phase with, calculate result;
When described result is 0, the count value of dominant digit counter is added 1;
When described result is 1, records the number of the continuous dominant position in current dominant digit counter, and the count value of dominant digit counter is set to 0;
Each data bit in described data all with 1 phase with after, determining the individual count value in dominant digit counter, is the number of continuous dominant position each in described data.
5. method as claimed in claim 2, is characterized in that, described in calculate continuous dominant position in described data number comprise:
Detect the data bit in described data, by each data bit in described data and 1 phase with, calculate result;
When described result is 0, the count value of dominant digit counter is added 1; When described result is 1, records the number of the continuous dominant position in current dominant digit counter, the count value of dominant digit counter is set to 0;
If the number of the continuous dominant position in the dominant digit counter of current record, when the duration of corresponding dominant position is greater than described predetermined value, then determining the count value of current dominant digit counter, is the number of dominant position continuous in described data.
6. method as claimed in claim 2, is characterized in that, described in calculate continuous dominant position in described data number comprise:
Detect the data bit in described data, by each data bit in described data and 1 phase with, calculate result;
When described result is 0, the count value of dominant digit counter is added 1, record the number of the continuous dominant position in current dominant digit counter;
If the number of the continuous dominant position in the dominant digit counter of current record, when the duration of corresponding dominant position is greater than described predetermined value, then determining the count value of current dominant digit counter, is the number of dominant position continuous in described data.
7. identify a system for wake-up signal, it is characterized in that, this system comprises: enable module, read module, computing module, determination module, wherein,
Enable module, for after local internet LIN node enters sleep state, enable serial communication interface SCI, makes SCI receive interruption signal, and makes SCI that received interrupt signal is sent to receiving register;
Read module, for reading the data of the interrupt signal in described receiving register;
Computing module, for calculating the duration of the dominant position in described data;
Determination module, for whether being greater than predetermined value according to the described duration, judges whether described interrupt signal is wake-up signal.
8. system as claimed in claim 7, it is characterized in that, described computing module comprises: bit time computing unit, dominant position number computing unit, duration calculation unit, wherein,
Bit time computing unit, for calculating the bit time in described data according to baud rate;
Dominant position number computing unit, for calculating the number of continuous dominant position in described data;
Duration calculation unit, for the number according to dominant position continuous in institute's bit time and described data, calculates the duration of the continuous dominant position in data.
9. system as claimed in claim 8, it is characterized in that, described dominant position number computing unit comprises: dominant position computation subunit, record subelement, wherein,
Dominant position computation subunit, for detecting the data bit in described data, by each data bit in described data and 1 phase with, calculate result;
Record subelement, calculates result for described in basis, records the numerical value of dominant position number.
10. system as claimed in claim 7, it is characterized in that, described determination module comprises: identifying unit, wherein,
Identifying unit, for whether being greater than predetermined value according to the described duration, judges whether described interrupt signal is wake-up signal.
CN201510017196.XA 2015-01-13 2015-01-13 A kind of method and system for identifying wake-up signal Active CN104539494B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510017196.XA CN104539494B (en) 2015-01-13 2015-01-13 A kind of method and system for identifying wake-up signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510017196.XA CN104539494B (en) 2015-01-13 2015-01-13 A kind of method and system for identifying wake-up signal

Publications (2)

Publication Number Publication Date
CN104539494A true CN104539494A (en) 2015-04-22
CN104539494B CN104539494B (en) 2017-12-12

Family

ID=52854963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510017196.XA Active CN104539494B (en) 2015-01-13 2015-01-13 A kind of method and system for identifying wake-up signal

Country Status (1)

Country Link
CN (1) CN104539494B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109982416A (en) * 2017-12-27 2019-07-05 珠海市魅族科技有限公司 A kind of data receiver and the method and device of transmission
CN111857841A (en) * 2020-06-16 2020-10-30 恒天益科技(深圳)有限公司 Awakening method of main control chip, storage medium and intelligent terminal
CN112565034A (en) * 2019-09-10 2021-03-26 意法半导体(格勒诺布尔2)公司 Apparatus and method for communicating over a serial bus
CN114500153A (en) * 2022-01-24 2022-05-13 易展 LIN controller design and operation method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580969A (en) * 2012-07-19 2014-02-12 杭州三花研究院有限公司 LIN network slave node control system and LIN network slave node control method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580969A (en) * 2012-07-19 2014-02-12 杭州三花研究院有限公司 LIN network slave node control system and LIN network slave node control method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
靳希: ""LIN总线技术及其应用研究"", 《技术长廊》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109982416A (en) * 2017-12-27 2019-07-05 珠海市魅族科技有限公司 A kind of data receiver and the method and device of transmission
CN112565034A (en) * 2019-09-10 2021-03-26 意法半导体(格勒诺布尔2)公司 Apparatus and method for communicating over a serial bus
CN112565034B (en) * 2019-09-10 2023-02-10 意法半导体(格勒诺布尔2)公司 Apparatus and method for communicating over a serial bus
CN111857841A (en) * 2020-06-16 2020-10-30 恒天益科技(深圳)有限公司 Awakening method of main control chip, storage medium and intelligent terminal
CN114500153A (en) * 2022-01-24 2022-05-13 易展 LIN controller design and operation method thereof

Also Published As

Publication number Publication date
CN104539494B (en) 2017-12-12

Similar Documents

Publication Publication Date Title
US20060265617A1 (en) Power management in a system having multiple power modes
CN104539494A (en) Method and system for identifying awakening signals
CN111737173B (en) I2C bus communication control method, device, system and readable storage medium
JP6380875B2 (en) Detection distance calibration method, apparatus, and device
JP2001352350A (en) Measurement system and method by statistic eye-diagram of continuous bit stream
CN104811273A (en) Implement method for high speed single bus communication
US9778971B2 (en) Slave device, master device, and communication method
CN104378260A (en) CAN bus load rate testing method, device and system
WO2022135220A1 (en) Control method and system for adjusting vibration frequency on the basis of pressure, and storage medium
US20070168580A1 (en) Apparatus to improve the firmware efficiency for a multiframe serial interface
WO2013100748A1 (en) Watchdogable register-based i/o
CN112069098B (en) Baud rate identification method and device
US8738939B2 (en) System and method for testing WOL function of computers
CN100440158C (en) A testing method and system for timer in embedded system
CN113254247A (en) Server BMC I2C exception recovery method and related device
US20230231937A1 (en) EtherCAT Device with Clock Generation Mode and Clock Propagation Mode
CN107229858B (en) PECI bus master-slave machine verification system and method supporting crc8 verification
JP2004527056A5 (en)
CN111611186B (en) Transmission control method and device in embedded chip
JP5140556B2 (en) Weighing system
JP2998727B2 (en) Pulse width measuring device and pulse width measuring method for rotation detection
JPH07264263A (en) Serial communication interface device
CN107885638A (en) Hard disk backboard
WO2023226061A1 (en) Instruction test method and device, test platform, and readable storage medium
TWI512303B (en) Hot plugging device for establishing and testing data channel by switching protocol automatically and method thereof

Legal Events

Date Code Title Description
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Patentee after: Beijing Jingwei Hengrun Technology Co., Ltd

Address before: 8 / F, block B, No. 11, Anxiang Beili, Chaoyang District, Beijing 100101

Patentee before: Beijing Jingwei HiRain Technologies Co.,Ltd.