CN113609040A - STM 32-based serial data receiving method and system - Google Patents

STM 32-based serial data receiving method and system Download PDF

Info

Publication number
CN113609040A
CN113609040A CN202111148024.8A CN202111148024A CN113609040A CN 113609040 A CN113609040 A CN 113609040A CN 202111148024 A CN202111148024 A CN 202111148024A CN 113609040 A CN113609040 A CN 113609040A
Authority
CN
China
Prior art keywords
data
manchester
array
waveform
adc
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
CN202111148024.8A
Other languages
Chinese (zh)
Other versions
CN113609040B (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.)
Shenzhen Zhongke Xianjian Medical Technology Co ltd
Original Assignee
Shenzhen Zhongke Xianjian Medical Technology 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 Shenzhen Zhongke Xianjian Medical Technology Co ltd filed Critical Shenzhen Zhongke Xianjian Medical Technology Co ltd
Priority to CN202111148024.8A priority Critical patent/CN113609040B/en
Publication of CN113609040A publication Critical patent/CN113609040A/en
Application granted granted Critical
Publication of CN113609040B publication Critical patent/CN113609040B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a serial data receiving method and system based on STM 32; the method comprises the following steps: receiving an OOK radio frequency signal through an onboard wireless communication chip, and demodulating a defective Manchester data signal; the STM32 receives a defective Manchester data signal from an ADC module, converts the Manchester data signal into a series of ADC data corresponding to waveforms, and buffers the ADC data in a first array in a DMA receiving mode; calling an ADC data processing function to convert ADC data into corresponding Manchester coded data; decoding the Manchester coded data stored in the second array through a Manchester decoding function, and caching the Manchester coded data in a third array; and a C language structure body pointer is predefined according to a data packet protocol, and then specific data and contents cached in the third array are read out. The invention can directly receive serial data, and reduces the cost and power consumption of hardware circuits.

Description

STM 32-based serial data receiving method and system
Technical Field
The application relates to the technical field of serial data processing, in particular to a serial data receiving method and system based on STM 32.
Background
The chip embedded in the body transmits back Serial data with a fixed baud rate, which does not conform to Serial Communication (Serial Communication) protocol. There is no such directly available serial communication peripheral on a single chip or other SOCs. If data returned by a chip implanted in a human body needs to be received, the data is generally received in a plug-in FPGA mode, although the plug-in FPGA mode is simple and direct and has high efficiency, the hardware circuit cost is increased, and meanwhile, because the plug-in FPGA consumes power, especially because the retinal prosthesis external equipment adopts a lithium battery mode for power supply, the retinal prosthesis external equipment is sensitive to power consumption.
Disclosure of Invention
Based on this, it is necessary to provide a serial data receiving method and system based on STM32, aiming at the problems that the data returned by the implant chip can only be received by means of the plug-in FPGA, and the cost and power consumption are increased due to the addition of the plug-in circuit.
In order to achieve the above object, an embodiment of the present application provides a serial data receiving method based on STM32, including the following steps:
receiving an OOK radio frequency signal through an onboard wireless communication chip, and demodulating a defective Manchester data signal;
the STM32 receives a defective Manchester data signal from an ADC module, converts the Manchester data signal into a series of ADC data corresponding to waveforms, and stores the ADC data in a first array buffer area in a DMA receiving mode;
calling an ADC data processing function to convert the ADC data into corresponding Manchester encoded data, and storing the data in a second array buffer area;
decoding the Manchester coded data stored in the second array by a Manchester decoding function, and storing the Manchester coded data in a third array buffer area;
a C language structure pointer is predefined according to a data packet protocol, the C language structure pointer points to a previous buffer array, and specific data and content of the previous buffer array are read out.
Preferably, the first array is an array of length 1023, and the sampling frequency of the ADC module is 4 MHZ.
Preferably, the invoking of the ADC data processing function converts the ADC data into corresponding manchester encoded data, and the storing in the second array buffer specifically includes the following steps:
processing the received ADC data according to a preset waveform rule;
judging whether leading 10bit continuous 0 or 1 exists;
if not, jumping out of the processing process and discarding the waveform data received this time, and adding 1 to the error count value;
if continuous 0 or 1 of leading 10bit is found, judging whether 1 same leading waveform still exists, and recording the bit position of leading waveform data as the initial position of next analysis.
Preferably, if 0 or 1 with 10 bits of leading continuous is found, judging whether 1 same leading waveform exists next, and recording the bit position of the leading waveform data as the initial position of next analysis;
judging whether more than 2 continuous pulses which are not changed by 0 and 1 exist in the current waveform data or not, wherein the pulse width is 3-5 waveform pulses;
if the number of waveform pulses with the pulse width between 3 and 5 in the current waveform data is less than 2, jumping out of the processing process, discarding the received waveform data, and adding 1 to the error count value;
if more than 2 continuous pulses which are not changed by 0 and 1 exist in the current waveform data and the waveform pulses with the pulse width between 3 and 5 exist in the current waveform data, each waveform pulse is converted into corresponding digital signal data according to the rule of Manchester codes, filtering is carried out by adopting an average value filtering method, and abnormal data are filtered;
and processing the converted digital signal data according to bit in sequence, storing the processed digital signal data into a buffer area of a Manchester coding array, and waiting for the next processing.
Preferably, the preset waveform rule is a waveform rule observed by an oscilloscope.
Preferably, the decoding the second array of stored manchester encoded data by the manchester decoding function and storing the manchester encoded data in the third array buffer specifically includes the following steps:
searching a 16-bit packet header of Manchester coded data;
if no packet header is found, jumping out of the processing process and discarding the data received this time, and adding 1 to the error count value;
if the packet header is found, the current bit position is recorded as the starting position of Manchester decoding data.
Preferably, if the packet header is found, recording the current bit position, and further including the following steps after the current bit position is used as the starting position of the manchester decoded data:
if the digital signal data of 2bit Manchester coding appears in the decoding process is 2 'b 11 or 2' b00, receiving an error, jumping out of the processing process, discarding the data received this time, and adding 1 to an error count value;
if the 2-bit Manchester coded data is not 2 'b 11 or 2' b00 in the decoding process, 1-bit decoded data are converted from every 2-bit Manchester coding according to the rule that the Manchester coded 2 bits correspond to the 1-bit decoded data, and the decoded data are sequentially stored in a buffer area of a decoded data array according to the bits.
Preferably, the searching for the header of the 16-bit manchester encoded data specifically includes the following steps:
processing 8-bit header data into corresponding 16-bit data after Manchester coding;
and comparing the 16-bit Manchester coded data with the Manchester coded data stored in the second array in sequence according to bit shift, and searching for a packet header.
Preferably, when the error count value reaches a limit value, the received return signal is abnormal, and a coil falling alarm sound is sent out.
The invention also provides a serial data receiving system based on STM32, and the serial data receiving method based on STM32 is realized by the serial data receiving system based on STM 32.
One of the above technical solutions has the following advantages and beneficial effects:
under the condition that the single chip microcomputer does not have an external FPGA circuit, the serial data can be directly received, the cost and the power consumption of a hardware circuit are effectively reduced, and the device is particularly applied to retina prosthesis external equipment powered by a lithium battery and used for receiving data returned by an implant chip;
the method can receive and process defective serial data at high speed and high efficiency, and is widely applied to various data processing processes.
Drawings
FIG. 1 is a schematic flow chart of a preferred embodiment of a serial data receiving method based on STM32 according to the present application;
FIG. 2 is a schematic flowchart of step S300 in FIG. 1;
FIG. 3 is a flowchart illustrating the step S400 in FIG. 1;
fig. 4 is a graph of data received by the serial data receiving method based on STM32 of the present application.
Fig. 5 is a graph corresponding to the curve data of fig. 4.
Detailed Description
To facilitate an understanding of the present application, the present application will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present application are shown in the drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element and be integral therewith, or intervening elements may also be present. The term "mounted" and the like are used herein for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In one embodiment, as shown in fig. 1, there is provided an STM 32-based serial data receiving method, including the steps of:
s100, receiving an OOK radio frequency signal through an onboard wireless communication chip, and demodulating a defective Manchester data signal;
s200, receiving a defective Manchester data signal by an ADC module of the STM32, converting the Manchester data signal into a series of ADC data corresponding to waveforms, and storing the ADC data in a first array buffer area in a DMA (direct memory access) receiving mode;
s300, calling an ADC data processing function to convert the ADC data into corresponding Manchester encoded data, and storing the data in a second array cache region;
s400, decoding the Manchester coded data stored in the second array through a Manchester decoding function, and storing the Manchester coded data in a third array buffer area;
s500, a C language structure pointer is predefined according to a data packet protocol, the C language structure pointer points to the previous cache array, and then specific data and content of the previous cache array are read out.
The invention utilizes the high-speed ADC module carried by STM32 (concretely STM32H 7) to realize the receiving of serial data returned by an implant chip, firstly, returned OOK radio frequency signal data is demodulated to obtain a defective manchester coded digital signal through an onboard Trf7970 chip (wireless communication chip); then the digital signal is sent to an input pin corresponding to an STM32H7 ADC, the ADC module converts the signal into a series of ADC data corresponding to the waveform, and the ADC data is read and stored in an array in a DMA mode; then, an ADC data processing function is called, the data are matched according to the content of the returned data packet, and when data receiving is wrong, for example, the returned radio frequency signal is received under the condition of weak, the next data processing process is directly skipped; and if the matching is not in error, continuing to process the ADC data according to the assumed data waveform condition, then converting the ADC data into corresponding manchester encoded data, and storing the encoded data in another array buffer area. And finally, executing a manchester decoding processing function, decoding and processing buffered manchester coded data according to a specific returned data packet protocol, such as a packet header, data and a packet tail, storing the data in another new buffer array, predefining a C language structure pointer according to the data packet protocol in the last step, pointing to the previous buffer array by the pointer, and finally reading out specific data and content, thereby realizing the reception of serial data returned by the implant chip.
In specific implementation, because the signal returned by the implant chip is only available when the signal is returned, and the pin level is 0 at other times, the STM32H7 adopts a mode that an external rising edge triggers ADC conversion, so that the data volume of ADC conversion and the difficulty of data processing are greatly saved, and the digital signal can be analyzed through ADC conversion. The total data packet content returned here adds up to 100 bits, which is 200 bits after Manchester coding. And through observation of an oscilloscope, the front of the returned data packet head is fixed with about 10 bits of leading continuous 0 or continuous 1. Thus, the ADC is here set to receive 1023Bytes of data at a time, i.e. 1023 data are received each time with a rising edge triggered transition. And because the sampling frequency of the ADC is set to be 4MHZ, the requirement of the communication speed of the ADC can be met, the baud rate of the coded return data is fixed to be 1Mbit/s, and the sampling speed can be 2MHZ according to the nyquist sampling theorem. I.e. here every 4 ADC data correspond to 1 manchester code data bit. Thus 4 x 200+4 x 10=840bytes < 1023bytes, it is clear that it can cover the entire return packet, i.e. the first array is an array of length 1023.
In specific implementation, as shown in fig. 2, the step S300 of calling an ADC data processing function to convert ADC data into corresponding manchester encoded data, and storing the manchester encoded data in the second array buffer specifically includes the following steps:
processing the received ADC data according to a preset waveform rule;
judging whether leading 10bit continuous 0 or 1 exists;
if not, jumping out of the processing process and discarding the waveform data received this time, and adding 1 to the error count value;
if continuous 0 or 1 of leading 10bit is found, judging whether 1 same leading waveform still exists, and recording the bit position of leading waveform data as the initial position of next analysis.
In specific implementation, as shown in fig. 2, if a continuous 0 or 1 of 10 bits of the preamble is found, the following steps are further included after determining whether 1 identical preamble waveform still exists next and recording the bit position of the preamble waveform data as the start position of the next analysis.
Judging whether more than 2 waveform pulses with the high-low level width between 3 and 5 continuously exist in the current waveform data;
on the contrary, if the number of waveform pulses with the high-low level width between 3 and 5 in the current waveform data is less than 2, jumping out of the processing process and discarding the received waveform data, and adding 1 to the error count value;
if more than 2 waveform pulses with pulse widths between 3 and 5 continuously exist in the current waveform data, converting each waveform pulse into corresponding digital signal data according to the rule of Manchester codes, and filtering by adopting an average filtering method to filter out abnormal data;
and processing the converted digital signal data according to bit in sequence, storing the processed digital signal data into a buffer area of a Manchester coding array, and waiting for the next processing.
In specific implementation, after the ADC data is received, the received ADC data is processed according to a preset waveform rule (the waveform rule is mainly obtained by observing with an oscilloscope). Firstly, judging whether leading 10bit continuous 0 or 1 exists, if not, the waveform is not right, jumping out of the processing process and discarding the waveform data received this time. If continuous 0 or 1 of the leading 10bit is found, judging whether 1 leading waveform exists next, and recording the bit position of the waveform data as the initial position of the next analysis. Then, a rough statistic is performed on the whole waveform data, and it is expected that 4 sampled data bits correspond to 1 decoded bit, so that the number of waveform pulses with waveform high and low level widths continuously ranging from 3 to 5 is counted. When the number of the waveform pulses is less than 2, the waveform is obviously incorrect, the same processing procedure is skipped, and the waveform data received this time is discarded. Then, according to the rule of manchester coding, each pulse corresponds to 4 conversion data, and the abnormal data is filtered out simply by using an average value filtering method. And processing the received conversion data according to bits in sequence, storing the conversion data into a manchester coding cache array (a second array), and waiting for the next processing.
In a specific implementation, as shown in fig. 3, the decoding the second array of stored manchester encoded data by using the manchester decoding function, and storing the manchester encoded data in the third array buffer specifically includes the following steps:
searching a 16-bit packet header of Manchester coded data;
if no packet header is found, jumping out of the processing process and discarding the data received this time, and adding 1 to the error count value;
if the packet header is found, the current bit position is recorded as the starting position of Manchester decoding data.
In specific implementation, as shown in fig. 3, if the packet header is found, the following steps are further included after recording the current bit position as the start position of the manchester decoded data:
on the contrary, if the digital signal data of 2bit Manchester coding appears in the decoding process is 2 'b 11 or 2' b00, the receiving is wrong, the processing process is skipped, the received data is discarded, and meanwhile, the error count value is added with 1;
if the 2-bit Manchester coded data is not 2 'b 11 or 2' b00 in the decoding process, 1-bit decoded data are converted from every 2-bit Manchester coding according to the rule that the Manchester coded 2 bits correspond to the 1-bit decoded data, and the decoded data are sequentially stored in a buffer area of a decoded data array according to the bits.
In specific implementation, the searching for the packet header of the 16-bit manchester encoded data specifically includes the following steps:
processing 8-bit header data into corresponding 16-bit data after Manchester coding;
and comparing the 16-bit Manchester coded data with the Manchester coded data stored in the second array in sequence according to bit shift, and searching for a packet header.
In specific implementation, the process of manchester decoding function decoding is that firstly, 8-bit packet headers are processed into corresponding data of 16 bits after manchester coding, and the data are compared with manchester coded data in a cache array (second array) in sequence according to bit shift, and packet header searching processing is carried out. If the header is found, recording the current bit position as the starting position of the next manchester decoding data. Otherwise, the process is skipped and the data received this time is discarded. Then, according to the rule that 2 bits of manchester codes correspond to 1bit of data, 1bit of data is converted from every 2 bits of decoding, and the data are sequentially stored and processed in a decoding data cache array (a third array) according to the bits. If 2 'b 11 or 2' b00 non-manchester code data appear in 2bit of manchester codes in the processing process, the receiving is in error, and the processing process is also jumped out and the data received this time is discarded. The 8-bit header data refers to a data header returned by the implant chip.
Note here that at each error, 1 needs to be added to the error count value, and when the error count value reaches a certain limit value, we consider that the received return signal has a problem, and at this time, a coil falling alarm flag is set, and then alarm processing is performed.
The invention has been run and validated on a retinal prosthesis in vitro VPU apparatus, shown in FIGS. 4 and 5. Fig. 4 is a waveform (data displayed after being amplified) displayed by a graphic mode of data received by the ADC module. Each of the pulses in fig. 5 corresponds to the data in fig. 4, with 1 pulse containing 1023Bytes of data.
The invention also provides a serial data receiving system based on STM32, and the serial data receiving method based on STM32 is realized by the serial data receiving system based on STM 32.
In summary, the present application provides a serial data receiving method and system based on STM 32; the method comprises the following steps: receiving an OOK radio frequency signal through an onboard wireless communication chip, and demodulating a defective Manchester data signal; the STM32 receives a defective Manchester data signal from an ADC module, converts the Manchester data signal into a series of ADC data corresponding to waveforms, and stores the ADC data in a first array buffer area in a DMA receiving mode; calling an ADC data processing function to convert the ADC data into corresponding Manchester encoded data, and storing the data in a second array buffer area; decoding the Manchester coded data stored in the second array by a Manchester decoding function, and storing the Manchester coded data in a third array buffer area; the method comprises the steps that a C language structure body pointer is predefined according to a data packet protocol, points to the previous cache array, and then reads out specific data and content of the previous cache array, so that serial data can be directly received, the cost and power consumption of a hardware circuit are effectively reduced, and the method is particularly applied to retinal prosthesis external equipment powered by a lithium battery and used for receiving data returned by an implant chip; meanwhile, the method can receive and process defective serial data at high speed and high efficiency, and is widely applied to various data processing processes.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An STM 32-based serial data receiving method is characterized by comprising the following steps:
receiving an OOK radio frequency signal through an onboard wireless communication chip, and demodulating a defective Manchester data signal;
the STM32 receives a defective Manchester data signal from an ADC module, converts the Manchester data signal into a series of ADC data corresponding to waveforms, and stores the ADC data in a first array buffer area in a DMA receiving mode;
calling an ADC data processing function to convert the ADC data into corresponding Manchester encoded data, and storing the data in a second array buffer area;
decoding the Manchester coded data stored in the second array by a Manchester decoding function, and storing the Manchester coded data in a third array buffer area;
a C language structure pointer is predefined according to a data packet protocol, the C language structure pointer points to a previous buffer array, and specific data and content of the previous buffer array are read out.
2. The STM 32-based serial data receiving method of claim 1, wherein the first array is an array of length 1023 and the sampling frequency of the ADC module is 4 MHZ.
3. The STM 32-based serial data receiving method according to claim 1, wherein the step of calling the ADC data processing function to convert the ADC data into corresponding manchester encoded data and storing the converted data in the second array buffer comprises the steps of:
processing the received ADC data according to a preset waveform rule;
judging whether leading 10bit continuous 0 or 1 exists;
if not, jumping out of the processing process and discarding the waveform data received this time, and adding 1 to the error count value;
if continuous 0 or 1 of leading 10bit is found, judging whether 1 same leading waveform still exists, and recording the bit position of leading waveform data as the initial position of next analysis.
4. The STM 32-based serial data receiving method according to claim 3, wherein if consecutive 0 or 1 leading 10 bits are found, then determining if 1 identical leading waveform exists next, and recording the bit position of the leading waveform data as the starting position of the next parsing further comprises the following steps:
judging whether more than 2 continuous pulses which are not changed by 0 and 1 exist in the current waveform data or not, wherein the pulse width is 3-5 waveform pulses;
if the number of waveform pulses with the pulse width between 3 and 5 in the current waveform data is less than 2, jumping out of the processing process, discarding the received waveform data, and adding 1 to the error count value;
if more than 2 continuous pulses which are not changed by 0 and 1 exist in the current waveform data and the waveform pulses with the pulse width between 3 and 5 exist in the current waveform data, each waveform pulse is converted into corresponding digital signal data according to the rule of Manchester codes, filtering is carried out by adopting an average value filtering method, and abnormal data are filtered;
and processing the converted digital signal data according to bit in sequence, storing the processed digital signal data into a buffer area of a Manchester coding array, and waiting for the next processing.
5. The STM 32-based serial data receiving method according to claim 3, wherein the preset waveform rule is a waveform rule observed by an oscilloscope.
6. The STM 32-based serial data receiving method according to claim 1, wherein the decoding of the second array of stored manchester encoded data by the manchester decoding function and the storing in the third array buffer specifically comprises the steps of:
searching a 16-bit packet header of Manchester coded data;
if no packet header is found, jumping out of the processing process and discarding the data received this time, and adding 1 to the error count value;
if the packet header is found, the current bit position is recorded as the starting position of Manchester decoding data.
7. The STM 32-based serial data receiving method according to claim 6, wherein if a packet header is found, recording a current bit position as a start position of manchester decoded data, further comprising the steps of:
if the digital signal data of 2bit Manchester coding appears in the decoding process is 2 'b 11 or 2' b00, receiving an error, jumping out of the processing process, discarding the data received this time, and adding 1 to an error count value;
if the 2-bit Manchester coded data is not 2 'b 11 or 2' b00 in the decoding process, 1-bit decoded data are converted from every 2-bit Manchester coding according to the rule that the Manchester coded 2 bits correspond to the 1-bit decoded data, and the decoded data are sequentially stored in a buffer area of a decoded data array according to the bits.
8. An STM 32-based serial data receiving method according to claim 6, wherein the step of finding the header of 16-bit Manchester encoded data specifically comprises the steps of:
processing 8-bit header data into corresponding 16-bit data after Manchester coding;
and comparing the 16-bit Manchester coded data with the Manchester coded data stored in the second array in sequence according to bit shift, and searching for a packet header.
9. An STM 32-based serial data receiving method according to any one of claims 3, 4, 6 and 7, wherein when the error count value reaches a limit value, indicating that there is an abnormality in the received backtransmission signal, a coil-off warning sound is generated.
10. An STM 32-based serial data receiving system, characterized in that the STM 32-based serial data receiving method according to any one of claims 1 to 9 is implemented by an STM 32-based serial data receiving system.
CN202111148024.8A 2021-09-29 2021-09-29 STM 32-based serial data receiving method and system Active CN113609040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111148024.8A CN113609040B (en) 2021-09-29 2021-09-29 STM 32-based serial data receiving method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111148024.8A CN113609040B (en) 2021-09-29 2021-09-29 STM 32-based serial data receiving method and system

Publications (2)

Publication Number Publication Date
CN113609040A true CN113609040A (en) 2021-11-05
CN113609040B CN113609040B (en) 2022-01-28

Family

ID=78343221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111148024.8A Active CN113609040B (en) 2021-09-29 2021-09-29 STM 32-based serial data receiving method and system

Country Status (1)

Country Link
CN (1) CN113609040B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946329A (en) * 2012-11-08 2013-02-27 成都华太航空科技有限公司 Manchester code transceiver test bench
CN103971074A (en) * 2013-02-04 2014-08-06 成都摩宝网络科技有限公司 RFID (radio frequency identification) reader for near-field communication by mobile phone
CN104064150A (en) * 2014-07-08 2014-09-24 苏州卓能微电子技术有限公司 Two-channel signal transmitting method for LED driving chips
US20170024354A1 (en) * 2014-04-09 2017-01-26 Nxp B.V. Single-wire interface bus transciver system based on i2c-bus, and associated method for communication of single-wire interface bus
CN106502949A (en) * 2016-12-15 2017-03-15 重庆川仪自动化股份有限公司 Synchronization transmission circuit, method and system
CN109756303A (en) * 2019-03-04 2019-05-14 北方天穹信息技术(西安)有限公司 A kind of asynchronous Manchester code reception coding/decoding method of either simplex

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946329A (en) * 2012-11-08 2013-02-27 成都华太航空科技有限公司 Manchester code transceiver test bench
CN103971074A (en) * 2013-02-04 2014-08-06 成都摩宝网络科技有限公司 RFID (radio frequency identification) reader for near-field communication by mobile phone
US20170024354A1 (en) * 2014-04-09 2017-01-26 Nxp B.V. Single-wire interface bus transciver system based on i2c-bus, and associated method for communication of single-wire interface bus
CN104064150A (en) * 2014-07-08 2014-09-24 苏州卓能微电子技术有限公司 Two-channel signal transmitting method for LED driving chips
CN106502949A (en) * 2016-12-15 2017-03-15 重庆川仪自动化股份有限公司 Synchronization transmission circuit, method and system
CN109756303A (en) * 2019-03-04 2019-05-14 北方天穹信息技术(西安)有限公司 A kind of asynchronous Manchester code reception coding/decoding method of either simplex

Also Published As

Publication number Publication date
CN113609040B (en) 2022-01-28

Similar Documents

Publication Publication Date Title
Deepu et al. A joint QRS detection and data compression scheme for wearable sensors
EP0810532B1 (en) A lossless data compression method and apparatus that also facilitates signal analysis
JPH10234868A (en) System and method for data compression and non-linear sampling used to implant type device and battery driving type device, etc.
US6473008B2 (en) System for sampling a data signal
US20080243012A1 (en) Method of compressing electrocardiogram data and electrocardiogram telemetry system using the same
US20090259672A1 (en) Synchronizing timing mismatch by data deletion
KR20130060317A (en) Method and apparatus for low complexity compression of signals
CN113609040B (en) STM 32-based serial data receiving method and system
RU99127341A (en) DEVICE AND METHOD OF CHANNEL CODING / DECODING FOR COMMUNICATION SYSTEM
RU2009105130A (en) DEVICE, SYSTEM AND METHOD FOR MONITORING HEART REDUCTIONS
CN104159108A (en) Real-time lossless electrocardiosignal compression method and device based on adaptive prediction and variable length coding improvement
US11456075B2 (en) Implantable medical device having a coding module
CN109167650B (en) Bluetooth receiver and method for detecting Bluetooth coding frame
CN116489236A (en) Electroencephalogram signal real-time lossless compression method and device, electronic equipment and storage medium
CN109199361B (en) Method, storage medium and device for extracting R peak time in electrocardiosignal data
Marzencki et al. Miniature wearable wireless real-time health and activity monitoring system with optimized power consumption
WO2017031581A1 (en) System and method for detecting spikes in noisy signals
JP2004056803A (en) Programmable glitch filter for asynchronous data communication interface
Mukhopadhyay et al. A combined application of lossless and lossy compression in ECG processing and transmission via GSM-based SMS
CN108763109B (en) Data storage method and device and application thereof
CN114266264A (en) Signal demodulation method, apparatus, receiver and computer readable storage medium
CN110151182B (en) Apnea type identification method and device
CN114205054A (en) Signal processing method and device, electronic device and storage medium
CN111769835A (en) Manchester code decoding method based on FPGA and IEC60044-8 standard
US20100079251A1 (en) Frame processing circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: He Chuanmin

Inventor after: Liang Yexing

Inventor before: He Chuanmin

Inventor before: Liang Yexing