Smart Device MCU Data Debugging via Serial Number Tagging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for debugging data transmission between MCUs in smart devices via Wi-Fi modules require two serial lines, making it inconvenient to determine data receiving and sending sequences, and are costly and prone to packet loss.
Innovation Solution
A method and device that acquire and process data packets with serial numbers between MCUs, allowing for sorting and displaying based on these numbers, and sending debug commands to modify programs, using wireless communication or UDP/IP protocols to reduce costs and packet loss.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If two serial lines are used to debug data transmission between MCUs, then data transmission can be monitored, but it is inconvenient to determine data receiving and sending sequences and requires two serial debugging tools
Solution Approach 1:
A serial number field is introduced as an intermediary element in the data packet structure. This serial number acts as a mediator that links transmitting and receiving data packets, enabling the terminal to determine data sequences without requiring two separate debugging tools. The serial number is added by the transmitting MCU and used by the terminal to sort and reconstruct the original data transmission sequence.
2Reliability
If two serial lines are used for debugging, then data can be checked, but the cost increases and packet loss becomes more prone
Solution Approach 1:
The patent merges the debugging function into a single serial line communication channel. Instead of using two separate serial lines for monitoring data transmission and reception, the system combines both debugging capabilities into one serial line by packaging transmission and reception data into structured data packets with serial numbers, reducing hardware complexity while maintaining debugging functionality.
3Productivity
If data packets are transmitted without serial numbers, then transmission is simpler, but it is difficult to determine data sequences and identify transmission issues
Solution Approach 1:
The transmitting MCU performs preliminary action by adding serial numbers to data packets before transmission. This preliminary tagging of data packets with sequential identifiers enables the terminal to later sort and reconstruct the original transmission sequence, preventing loss of sequence information while maintaining efficient transmission.
Data Source
Figure 1~2
Figure 3~4
Figure 5A~5B
AI summary
The present invention relates to a data processing method, a data processing device, a terminal and a smart device. The data processing method includes: acquiring (401), at a second MCU of the smart device, data streams transmitted between the second MCU and a first MCU of the smart device; packing (402), at the second MCU, the acquired data streams into data packets; adding (403), at the second MCU, respective serial numbers to the data packets; and sending (404) the data packets added with the respective serial numbers to the terminal. In the embodiments of the present invention, the terminal is enabled to conveniently and directly determine data receiving and sending sequences based on the respective serial numbers, in this way, it is convenient to discover problems existing in data transmission timely, and also facilitate the user's operations.