Serial-based ARM and UWB wireless data transparent transmission processing method

By using data interaction between the serial port and the UWB module, and employing frame number detection and verification, the problem of reduced data transmission rate and stability caused by wireless network bandwidth congestion was solved, thus achieving efficient data transmission.

CN115734286BActive Publication Date: 2026-04-10RESERCH ON ELECTRICAL APPLIANCES OF SHANGHAI ASTRONAUTICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
RESERCH ON ELECTRICAL APPLIANCES OF SHANGHAI ASTRONAUTICS CO LTD
Filing Date
2022-10-19
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing civilian or dedicated wireless network frequency band resources are becoming increasingly congested as they develop, leading to reduced data transmission rates, decreased signal transmission stability, and increased signal transmission latency.

Method used

A serial port-based ARM and UWB wireless data pass-through processing method is adopted. Data is transmitted by adding frame numbers through data interaction between data interaction modules A and B. DMA channels and interrupts are set in the circular buffer. Data interaction is carried out using UART and SPI serial ports to realize the detection and verification of data frames.

Benefits of technology

Successful data transmission is confirmed by comparing frame numbers, reducing system load, increasing data transmission speed, avoiding signal instability caused by network bandwidth congestion, and ensuring the stability and speed of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115734286B_ABST
    Figure CN115734286B_ABST
Patent Text Reader

Abstract

The application relates to the field of wireless data processing, in particular to an ARM and UWB wireless data transparent transmission processing method based on a serial port, which comprises the following steps: a data interaction module B detects data transmitted by a data interaction module A after adding a frame number to the data, and transmits the data with the added frame number to the data interaction module A and other users; the data interaction module A performs next data transmission and adds the frame number added by the data interaction module B in the previous data transmission to the data in the next data transmission. According to the application, the frame number is added to the transmitted data, whether the data transmission is successful can be confirmed in the form of frame number comparison in multiple data interactions, the load of the system is reduced, the data transmission speed of the system is provided, and the problem that network frequency band resources are crowded and signal transmission is unstable is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of wireless data processing, in particular to a serial port-based ARM and UWB wireless data transparent transmission processing method. BACKGROUND

[0002] With the development of technology, distributed systems are becoming larger and larger, and the original cable network communication method can also realize the function of data exchange, but its space volume and weight are increasing, which brings an increase in cost that even exceeds the key equipment. In order to solve this problem, wireless communication emerges as the times require, that is, data transmission is performed in a wireless manner. However, the existing civilian or dedicated wireless network frequency band resources are becoming more and more crowded with the development, which will lead to a decrease in data transmission rate, and further lead to a great decrease in signal transmission stability and an increase in signal transmission delay time. SUMMARY

[0003] The present application provides a serial port-based ARM and UWB wireless data transparent transmission processing method to solve the problems in the prior art, and the specific technical solutions are as follows.

[0004] A serial port-based ARM and UWB wireless data transparent transmission processing method comprises the following steps:

[0005] S1: establishing at least two groups of data interaction modules (A, B);

[0006] S2: receiving data sent by a user through the data interaction module A, and transmitting the received data to the data interaction module B after adding information identification to the data;

[0007] S3: the data interaction module B adds a frame number to the data transmitted by the data interaction module A, detects the data after adding the frame number, and transmits the data to the data interaction module A and other users;

[0008] S4: performing the next data transmission through the data interaction module A, and adding the frame number added by the data interaction module B in the previous data transmission to the data in the next data transmission.

[0009] As an improvement of the above technical solution, the data interaction module (A, B) comprises an ARM processor, a UWB module, and a serial port module.

[0010] As an improvement of the above technical solution, the step S1 further comprises: establishing four ring storage areas through the ARM processor, and setting four DMA channels and four interrupts.

[0011] As the improvement of the above technical scheme, the data interaction module A interacts with the user and the data interaction module B, the data interaction module B responds to the data transmitted by the data interaction module A, the data interaction module A is configured with a current frame number of a sending end, and the data interaction module B is configured with a current frame number of a receiving end.

[0012] As the improvement of the above technical scheme, the serial port module comprises an SPI serial port and a UART serial port, the ARM processor interacts with the UWB through the SPI serial port, and the ARM processor interacts with the user through the URAT serial port.

[0013] As the improvement of the above technical scheme, the four ring-shaped storage areas are respectively a data sending buffer area, a data receiving buffer area, a length sending buffer area and a length receiving buffer area, the data sending buffer area and the length sending buffer area are a group of ring-shaped buffer areas, the data receiving buffer area and the length receiving buffer area are another group of ring-shaped buffer areas, the four DMA channels are respectively a UART serial port sending channel, a UART serial port receiving channel, a SPI serial port sending channel and a SPI serial port receiving channel, and the four interrupts are respectively a UART serial port idle interrupt, a DMA sending completion interrupt of the UART serial port, a DMA sending completion interrupt of the SPI serial port and a data receiving / sending interrupt of the UWB module.

[0014] As the improvement of the above technical scheme, the ring-shaped buffer area is provided with a current data to be received pointer and a current data to be sent pointer.

[0015] As the improvement of the above technical scheme, the data sending buffer area and the data receiving buffer area are composed of a two-dimensional array, a single frame data frame is stored in the two-dimensional array, the single frame data frame comprises a command frame, a frame control, a sending end frame number, a network ID, a destination address, a source address, a receiving end frame number, a payload and a CRC, the length sending buffer area and the length receiving buffer area are composed of a one-dimensional array, a length storage value of the data sending buffer area is stored in the one-dimensional array of the length sending buffer area, and a length storage value of the data receiving buffer area is stored in a one-bit data of the length receiving buffer area. 。

[0016] The present application has the following advantages:

[0017] 1. By attaching the frame number to the transmitted data, the frame number attached to the data can be compared in the data transmission process, and whether the data transmission is successful can be confirmed only by the frame number comparison in multiple data interactions, so that the system load is reduced, the data transmission speed of the system is provided, and the problem of network frequency band resource congestion leading to unstable signal transmission is avoided.

[0018] 2. By setting two groups of ring buffer, one group for storing data sent by the user, and one group for storing data received by the user, each data buffer is composed of an array, and each array is provided with a command frame, a frame control, a sending end frame number, a network ID, a destination address, a source address, a receiving end frame number in advance, so that the intermediate storage consumption system operation capability can be saved. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 The system block diagram of the present application is shown in the figure.

[0020] Figure 2 The flowchart of the present application is shown in the figure.

[0021] Figure 3 The ring buffer of the present application is shown in the figure.

[0022] Figure 4 The data flow direction diagram of the present application is shown in the figure.

[0023] Figure 5 The logic flowchart of the present application is shown in the figure. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below in combination with the figures and examples. It should be understood that the specific examples described herein are only used to explain the present application, and do not limit the present application.

[0025] The existing civil or special wireless network frequency band resources are becoming more and more crowded with the development, which will lead to the reduction of data transmission rate, and further lead to the great reduction of signal transmission stability and the increase of signal transmission delay time.

[0026] In order to solve the above problems, the present embodiment provides an ARM and UWB wireless data transparent processing method based on serial port, which comprises the following steps:

[0027] S1: establishing at least two groups of data interaction modules (A, B);

[0028] Please refer to Figure 1 In step S1, the data interaction module (A, B) comprises an ARM processor, a UWB module and a serial port module.

[0029] Among them, the data interaction module A interacts with the user and the data interaction module B, and the data interaction module B responds to the data transmitted by the data interaction module A, that is, the data interaction module A is used to receive the data sent by the user, the data interaction module B is used to respond to the data transmitted by the data interaction module A and is responsible for transmitting the data to other users, and the serial port module comprises a UART serial port and a SPI serial port.

[0030] Specifically, please refer to Figure 2 , step S1 also includes establishing 4 ring memory areas and setting 4 DMA channels and 4 interrupts by the ARM processor.

[0031] Among them, the 4 ring memory areas are respectively a data sending buffer, a data receiving buffer, a length sending buffer, and a length receiving buffer, the data sending buffer and the length sending buffer are a group of ring buffers, the data receiving buffer and the length receiving buffer are another group of ring buffers, the 4 DMA channels are respectively a UART serial port sending channel, a UART serial port receiving channel, an SPI serial port sending channel, and an SPI serial port receiving channel, and the 4 interrupts are respectively a UART serial port idle interrupt, a UART serial port DMA sending completion interrupt, an SPI serial port DMA sending completion interrupt, and a UWB module data receiving / sending interrupt.

[0032] Please refer to Figure 3 , the ring buffer is provided with a current data to be received pointer and a current data to be sent pointer.

[0033] In addition, the data sending buffer and the data receiving buffer are each composed of a two-dimensional data array, the two two-dimensional arrays are used for temporarily storing data to be transmitted and data to be sent, a single frame of data is stored in the two-dimensional array, and the single frame of data includes a command frame, a frame control, a sending end frame number, a network ID, a destination address, a source address, a receiving end frame number, a payload, and a CRC.

[0034] After step S1 is executed, a whole initialization operation needs to be performed before step S2 is executed, that is, each ring buffer needs to be initialized, and network ID, destination address, source address and other data need to be written, and the serial port module and the UWB module also need to be initialized, the initialization of the serial port module includes configuring parameters such as baud rate and DMA channel, and the initialization of the UWB module includes configuring parameters of the UWB module, the SPI serial port, and the DMA channel.

[0035] Among them, the command frame, the sending end frame number, and the receiving end frame number are changed according to the running situation, and the CRC is automatically generated by the UWB module.

[0036] CRC, which stands for cyclic redundancy check, is a fast algorithm for generating a short fixed-bit check code according to network data packets or computer files and other data, and is mainly used to detect or check possible errors after data transmission or saving.

[0037] S2: The data interaction module A accepts data sent by a user, and transmits the accepted data to the data interaction module B after attaching information identification to the accepted data.

[0038] The data interaction module A periodically sends data frames or heartbeat frames without load, and the data interaction module B immediately responds to the data frames or heartbeat frames without load received from the data interaction module A. That is, a high-speed data interaction channel is established between the data interaction module A and the data interaction module B in real time, and data is continuously transmitted in the high-speed channel. When there is data, normal data frames are transmitted, and when there is no data, heartbeat frames without load are transmitted. The transmission of normal data frames and the transmission of heartbeat frames are carried out in an uninterrupted cycle. Each received data is directly stored in the "data sending buffer", and the length of the received data is stored in the "length sending buffer". Each single data frame sent by the data interaction module A to the data interaction module B carries the current frame number. The UWB module checks and determines that it is a new frame, and updates the current data to be received pointer of the data sending buffer and the length sending buffer after the continuous frame, and updates the current frame number of the sending end and the current frame number of the receiving end.

[0039] Specifically, the data interaction module A receives the transparent data of the user through the UART serial port, and stores the data in the array of the "data receiving buffer" at a specific position, i.e. the payload of the data frame, and stores the length in the "length receiving buffer". Due to data generation update, the "current data to be received pointer" is increased, and the "current frame number of the sending end" is increased. When the ARM processor detects that the "current data to be sent pointer" lags behind the "current data to be received pointer", it means that there is data to be sent. The ARM processor sends the data from the DMA channel to the UWB module through the SPI serial port. The ARM processor of the data interaction module B detects the interruption of the UWB module, and then reads the data received by the UWB module from the DMA channel through the SPI serial port. The data is stored in the "data sending buffer" of the data interaction module B, and the length is stored in the "length sending buffer". At the same time, the data is judged. If the judgment result is a valid frame, the "current data to be received pointer" points to the next position.

[0040] The information attached to the data by the data interaction module A includes command frame, frame control, network ID, destination address, source address, payload, and receiving end frame number, sending end frame number, etc. The receiving end frame number needs to be attached in the second and subsequent data transmission. There is no receiving end frame number in the first data transmission because no interaction with the data interaction module B is completed. The sending end frame number is attached to the data frame and transmitted to the data interaction module B in the initial data transmission.

[0041] S3: The data interaction module B detects the data transmitted by the data interaction module A after attaching the frame number, and transmits the data detected after attaching the frame number to the data interaction module A and other users.

[0042] Wherein, for the part of data transmission to other users: since the "current data to be received pointer" points to the next position, the ARM processor of the data interaction module B will detect that the "current data to be sent pointer" and the "current data to be received pointer" of the "data sending buffer" are 1 apart, and the ARM processor will send the data of the "current data to be received pointer" from the DMA channel to the effective payload of other users through the UART serial port, to complete the data transmission.

[0043] For the part of data transmission to the data interaction module A: after the data interaction module A sends the data frame to the data interaction module B, the data interaction module B writes the current frame number of the sending end in the data interaction module A into the data frame, and performs CRC calculation on the data frame with the written current frame number of the sending end through the UWB module, to check whether there is an error in the data transmission or saving, and to store the obtained CRC data into the tail frame of the data frame. After the data frame with the current frame number of the sending end and the CRC data is appended with the current frame number of the receiving end of the data interaction module B, it is re-sent to the data interaction module A. The data interaction module A performs CRC calculation on the sent data frame again. If the sent data passes the CRC calculation, that is, the current frame number of the sending end in the data frame sent by the data interaction module B is consistent with the frame number recorded in the data interaction module A, it indicates that the data interaction module B has received the data frame sent by the data interaction module A.

[0044] When the data interaction module A and the data interaction module B establish a connection, the data interaction module B is always in a listening state, regardless of whether the data interaction module A is powered on first or the data interaction module B is powered on first. The data interaction module A sends a handshake frame, and the data interaction module B sends a response frame to establish a connection, that is, the data interaction is always initiated by the data interaction module A. The establishment of the connection includes the initialization of the information preset of the newly powered "data receiving buffer", that is, the initialization of the "current data to be received pointer", the "current data to be sent pointer", the "current frame number of the sending end", and the "current frame number of the receiving end" of the data receiving buffer.

[0045] S4: performing the next data transmission by the data interaction module A and appending the frame number appended by the data interaction module B in the last data transmission in the data of the next transmission.

[0046] Before performing the "performing the next data transmission by the data interaction module A" in step S4, the two steps of "judging whether the UWB module is sent successfully" and "detecting whether the data receiving / sending interrupt of the UWB module is generated" need to be performed.

[0047] After the initialization operation is performed, before step S2 is performed, it is necessary to first determine whether the UWB module is successfully sent, that is, to determine whether the data receiving buffer has new data. If there is new data, the data frame is written into the UWB module through the SPI module and the sending is started. If there is no new data, the heartbeat frame without load is written into the UWB module through the SPI module and the sending is started. The heartbeat frame without load is an empty frame without data load.

[0048] The "determining whether the UWB module is successfully sent" here refers to the determination after the data interaction module A and the data interaction module B start the first interaction. The determination here is to ensure that, in the case of no new data transmission, the UWB module maintains the periodic data transmission in the form of sending the heartbeat frame without load. Through this way, it is ensured that there is always data transmission between the data interaction module A and the data interaction module B, and it is ensured that the high-speed channel can be tested to normally transmit data, so that the problem of the channel can be found in time.

[0049] After the UWB module confirms the sending of the data, it is detected whether the data receiving / sending interrupt of the UWB module is generated. The data receiving / sending interrupt flag of the UWB module usually includes the module error interrupt, the sending completion interrupt and the receiving completion interrupt.

[0050] If the sending completion interrupt is generated, the data transmission is performed. If the receiving completion interrupt is generated, step S2 is performed. If the module error interrupt is determined to be no, that is, the UWB module is not successfully sent, the UWB module is reset and the data is re-sent. The re-sent data here refers to the information of the first UWB module sending failure detected in the second time of sending data. Therefore, the re-sent data here refers to the data sent by the first UWB module. If multiple data interactions are generated, the re-sent data here refers to the data sent by the last UWB module.

[0051] The "performing the next data transmission by the data interaction module A" in step S4 refers to step S2. Please refer to Figure 4 While the data is sent to other users and the next data transmission is performed, the frame number receiving end frame sequence number of the data interaction module B in the data frame is written into the next frame data frame of the data interaction module A for sending. The sending and receiving are repeatedly performed, that is, the sent data frame carries the frame response of the last received data frame, that is, each data frame answers the received data frame and also carries the data to be sent to form a return frame. The sending and receiving are repeatedly performed, so that the data transmission speed of the system is improved.

[0052] Similarly, the steps of "judging whether the UWB module has successfully sent" and "detecting whether the data receiving / sending interrupt of the UWB module is generated" are needed to be performed before each time the step S2 is performed, so as to detect whether new data transmission is generated this time and whether the data transmission is completed normally last time.

[0053] Figure 1 With Figure 3 ACK mark in the figure indicates that the data sent is confirmed to be received without error.

[0054] Figure 5 The logic flow chart of the embodiment is shown in the figure, and the cycle logic condition of the embodiment is recorded in the figure.

[0055] The above merely describes the preferred embodiment of the present application, and is not used to limit the present application, any modification, equivalent replacement and improvement within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A serial port-based ARM and UWB wireless data transparent transmission processing method, characterized in that, The method comprises the following steps: S1: establishing at least one group of data interaction module A and one group of data interaction module B; S2: accepting data sent by a user through the data interaction module A, and transmitting the accepted data to the data interaction module B after adding information identification; S3: the data interaction module B detects the data transmitted by the data interaction module A after adding a frame number, and transmits the data after detection to the data interaction module A and other users; S4: executing the next data transmission through the data interaction module A, and adding the frame number added by the data interaction module B in the last data transmission in the data of the next transmission; The data interaction module A and the data interaction module B each comprise an ARM processor, a UWB module, and a serial port module, the serial port module comprises an SPI serial port and a UART serial port, the ARM processor interacts with the UWB module through the SPI serial port, and the ARM processor interacts with a user through the URAT serial port; The step S1 further comprises: The data interaction module A and the data interaction module B each establish four ring-shaped storage areas through the ARM processor, and set four DMA channels and four interrupts; The four ring-shaped storage areas are respectively a data sending buffer area, a data receiving buffer area, a length sending buffer area, and a length receiving buffer area, the data sending buffer area and the length sending buffer area are a group of ring-shaped buffer areas, the data receiving buffer area and the length receiving buffer area are another group of ring-shaped buffer areas, the four DMA channels are respectively a UART serial port sending channel, a UART serial port receiving channel, an SPI serial port sending channel, and an SPI serial port receiving channel, and the four interrupts are respectively a UART serial port idle interrupt, a UART serial port DMA sending completion interrupt, an SPI serial port DMA sending completion interrupt, and a UWB module data receiving / sending interrupt; The data sending buffer area and the data receiving buffer area are composed of a two-dimensional array, a single-frame data frame is stored in the two-dimensional array, the single-frame data frame comprises a command frame, a frame control, a sending end frame number, a network ID, a destination address, a source address, a receiving end frame number, a payload, and a CRC, the length sending buffer area and the length receiving buffer area are composed of a one-dimensional array, a length storage value of the data sending buffer area is stored in the one-dimensional array of the length sending buffer area, and a length storage value of the data receiving buffer area is stored in a one-bit data of the length receiving buffer area.

2. The serial port-based ARM and UWB wireless data transparent transmission processing method according to claim 1, characterized in that: The data interaction module A interacts with a user and the data interaction module B, the data interaction module B responds to the data transmitted by the data interaction module A, the data interaction module A is configured with a sending end current frame number, and the data interaction module B is configured with a receiving end current frame number.

3. The serial port-based ARM and UWB wireless data transparent transmission processing method according to claim 1, characterized in that: The ring-shaped buffer area is provided with a current data to-be-received pointer and a current data to-be-sent pointer.

Citation Information

Patent Citations

  • Ultra-wideband transparent transmission-based Kinect wireless communication method

    CN103473199A

  • A LoRa-based data transmission terminal and a communication system with the same

    CN109698710A

  • Low-delay 5G wireless transparent transmission method for industrial control data transmission

    CN113691397A