Multi-device polling communication system configuration method based on UART controller
By acquiring and managing the serial communication parameters and status of multiple devices in the satellite embedded system through a UART controller, and utilizing buffers and status structure arrays combined with a time series prediction model, centralized control and status tracking of multi-device serial communication are achieved. This solves the problems of poor system scalability and maintenance difficulties, and improves the system's reliability and consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-03-31
AI Technical Summary
In satellite embedded systems, the serial communication parameters and status management of multiple devices are highly dispersed, resulting in poor system scalability and maintenance difficulties. Existing technologies require individual configuration and monitoring for each device, increasing complexity and consistency risks.
The UART controller hardware interface collects serial communication parameters and initial status information of multiple devices. By utilizing temporary configuration buffers, master configuration structure arrays, and slave device status structure arrays, combined with time series prediction models and policy distribution mechanisms, centralized control and status tracking are achieved, and communication parameters and status consistency are dynamically adjusted.
It enables centralized control and status tracking of serial communication between multiple devices, reduces the complexity of system expansion and maintenance difficulty, improves the scalability and reliability of the system, and reduces the risk of failure caused by inconsistent configurations.
Smart Images

Figure CN121770933A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication data processing technology, and in particular to a configuration method for a multi-device polling communication system based on a UART controller. Background Technology
[0002] Satellite embedded systems play a core role in data processing and equipment control during space missions. Multi-device serial communication technology enables data exchange between the system and multiple peripheral devices through serial interfaces. Its design is based on serial communication protocols such as UART or RS-232, and utilizes hardware interrupts and buffer management to coordinate concurrent access, thereby improving communication efficiency. The advantages of this approach are simplified hardware connections, reduced power consumption, and enhanced anti-interference capabilities. It is suitable for the harsh environment of satellites. Through logical address allocation and error detection mechanisms, the system can reliably transmit commands and telemetry data, supporting mission-critical operations.
[0003] Existing serial communication technologies for multi-device satellite embedded systems suffer from the following technical pain points: The distributed management architecture handles communication parameters and status information for different devices, requiring separate configuration and integration for each device during system expansion. Maintenance necessitates independent monitoring and adjustment of each device's status, introducing significant complexity and consistency risks. For example, when integrating UART communication transponders, magnetometers, fiber optic gyroscopes, or other serial devices into a satellite platform, the lack of a unified configuration mechanism necessitates engineers repeatedly writing device-specific initialization code and status handling routines. This not only increases development workload but also increases the risk of communication failures due to inconsistent configurations, impacting overall system stability and maintainability. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a configuration method for a multi-device polling communication system based on a UART controller. This invention solves the technical problem of poor system scalability and maintenance difficulties caused by the highly dispersed communication parameters and status management of various serial port devices in satellite embedded systems.
[0005] To solve the above-mentioned technical problems, the specific contents of the present invention are as follows:
[0006] This invention provides a configuration method for a multi-device polling communication system based on a UART controller, comprising:
[0007] Step 1: Collect serial communication parameters and initial status information of multiple devices through the UART controller hardware interface, obtain device type identifier, data buffer address, communication cycle parameters and initial status flag, and store the collected data in a temporary configuration buffer;
[0008] Step 2: Initialize the main configuration structure array using the device parameters in the temporary configuration buffer. The main configuration structure includes fields for device name, data receive buffer pointer, power-on wait time, data receive cycle, wait strategy, data receive function and parsing function. A configuration version management mechanism records structure changes.
[0009] Step 3: Initialize the slave device status structure array based on the device parameters in the master configuration structure. The slave device status structure includes the device name, data content identifier, data receive buffer pointer, timestamp, data packet status and sending status fields. The time series prediction mechanism builds a prediction model based on historical status data.
[0010] Step 4: Set the serial port communication parameters of each device using the communication cycle and waiting policy parameters in the main configuration structure. The policy distribution mechanism allocates differentiated configurations based on the device type identifier.
[0011] Step 5: Execute polling scheduling, use the periodic parameters and priority algorithm defined in the main configuration structure to access each device, the UART controller receives data from the serial port to the position specified by the data receive buffer pointer, and calls the data receive function and parsing function to process the data;
[0012] Step 6: Update the device status structure. After data parsing is complete, adjust the timestamp and data packet status, monitor the sending status, and use the status consistency verification algorithm to verify the status data. This completes the centralized control and status tracking of multi-device serial communication.
[0013] Furthermore, in the configuration method of the multi-device polling communication system based on a UART controller described in this invention, step 1 includes:
[0014] Access the UART controller via memory-mapped registers to obtain the current values of each device's configuration registers;
[0015] The acquired register values are transferred via DMA and stored in a temporary configuration area with a double buffer structure.
[0016] Perform CRC check on the data in the temporary configuration area;
[0017] Data that passes the CRC check is stored in a temporary configuration buffer.
[0018] Furthermore, in the configuration method of a multi-device polling communication system based on a UART controller described in this invention, step 2 includes:
[0019] Create a configuration version management table and write the configuration version number and update timestamp for each device.
[0020] Use pointer swapping to load the data in the temporary configuration buffer into the runtime environment;
[0021] Compare the version number in the configuration version management table with the currently running version number;
[0022] The decision on whether to assign a separate configuration segment to the device type is based on the version number comparison result.
[0023] Furthermore, in the configuration method of a multi-device polling communication system based on a UART controller described in this invention, step 3 includes:
[0024] Construct a five-state machine model that includes initialization, ready, transmission, verification, and completion states;
[0025] Create a corresponding state machine instance for each device instance;
[0026] Historical communication data is processed using a time series forecasting algorithm to generate predictions of device status change trends.
[0027] System resources are pre-allocated based on the predicted trends of state changes.
[0028] Furthermore, in the configuration method of the multi-device polling communication system based on a UART controller described in this invention, step 4 includes:
[0029] Parse the device type identifier and match it with a predefined policy template;
[0030] Bit-field encoding is used to process differential parameters and compress storage space.
[0031] Obtain specific configuration parameters for the device by querying the configuration table;
[0032] Adjust strategy parameters based on changes in device state during runtime.
[0033] Furthermore, in the configuration method of a multi-device polling communication system based on a UART controller described in this invention, step 5 includes:
[0034] Use the periodic parameters in the main configuration structure to generate the device access sequence;
[0035] Adjust the polling interval based on equipment importance and data urgency;
[0036] Use an interrupt mask to handle device access conflicts.
[0037] The data receiving and parsing functions are executed to process the received data.
[0038] Furthermore, in the configuration method of a multi-device polling communication system based on a UART controller described in this invention, step 6 includes:
[0039] Perform a hash check on the parsed data to verify the integrity of the state data;
[0040] Compare the current state with the updated state, and only modify the changed state fields;
[0041] Use timestamps to synchronize the status update sequence of multiple devices;
[0042] The updated state data will be provided for use in the next round of scheduling.
[0043] Furthermore, the configuration method for a multi-device polling communication system based on a UART controller according to the present invention further includes:
[0044] Detect configuration update events and trigger state synchronization operations;
[0045] Identify faulty devices and perform isolation and reinitialization operations;
[0046] Regularly send heartbeat signals to monitor the device's communication status;
[0047] Record device status change data for system performance optimization.
[0048] Furthermore, the configuration method for a multi-device polling communication system based on a UART controller according to the present invention further includes:
[0049] The raw data collected in step 1 is processed in step 2 to provide initialization parameters for step 3;
[0050] Step 4 uses the output data from Steps 2 and 3 to generate a device configuration strategy;
[0051] Step 5 executes the configuration strategy to generate runtime data;
[0052] Step 6: Process operational data and update device status;
[0053] The configuration version management in step 2 and the status prediction in step 3 work together to adjust the system operating parameters.
[0054] Furthermore, the configuration method for a multi-device polling communication system based on a UART controller according to the present invention further includes:
[0055] Set a 1000ms communication cycle for the telemetry and control transponder equipment, a 250ms communication cycle for magnetometer 1, magnetometer 2, and magnetometer 3, and a no-wait strategy for the ground test equipment;
[0056] The policy distribution mechanism reads the device type identifier and obtains the corresponding parameters from the main configuration structure;
[0057] The status prediction mechanism analyzes time series data and adjusts the device polling priority.
[0058] The state consistency verification algorithm processes the state data of multiple devices to complete the state synchronization update.
[0059] Beneficial effects of this invention:
[0060] This method acquires serial communication parameters and initial status information of multiple devices through the UART controller hardware interface and stores them in a temporary configuration buffer. Using the device parameters in the buffer, a main configuration structure array is initialized, containing device name, data receive buffer pointer, power-on wait time, data receive cycle, and waiting strategy. Based on the main configuration structure parameters, a slave device status structure array is initialized, and a time series prediction model is established. The serial communication parameters of each device are set using communication cycle and waiting strategy parameters. A polling scheduling algorithm based on cycle parameters and priority is executed. Finally, a state consistency verification algorithm is used to achieve centralized control and status tracking of multi-device serial communication. This method solves the problems of poor system scalability and maintenance difficulties caused by the decentralized management of multi-device communication parameters and status in satellite embedded systems. Attached Figure Description
[0061] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on the drawings without creative effort.
[0062] Figure 1 This is a flowchart illustrating the configuration method for a multi-device polling communication system based on a UART controller, as provided in an embodiment of the present invention. Detailed Implementation
[0063] To make the technical solution of the present invention clearer, the present invention will be clearly and completely described below with reference to specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The present invention provided by various embodiments will be described in detail below with reference to the accompanying drawings. To better understand the purpose of the present invention, the present invention will be described in further detail below.
[0064] Please see Figure 1 The present invention provides a configuration method for a multi-device polling communication system based on a UART controller, comprising:
[0065] Step 1: Collect serial communication parameters and initial status information of multiple devices through the UART controller hardware interface, obtain device type identifier, data buffer address, communication cycle parameters and initial status flag, and store the collected data in a temporary configuration buffer;
[0066] Step 2: Initialize the main configuration structure array using the device parameters in the temporary configuration buffer. The main configuration structure includes fields for device name, data receive buffer pointer, power-on wait time, data receive cycle, wait strategy, data receive function and parsing function. A configuration version management mechanism records structure changes.
[0067] Step 3: Initialize the slave device status structure array based on the device parameters in the master configuration structure. The slave device status structure includes the device name, data content identifier, data receive buffer pointer, timestamp, data packet status and sending status fields. The time series prediction mechanism builds a prediction model based on historical status data.
[0068] Step 4: Set the serial port communication parameters of each device using the communication cycle and waiting policy parameters in the main configuration structure. The policy distribution mechanism allocates differentiated configurations based on the device type identifier.
[0069] Step 5: Execute polling scheduling, use the periodic parameters and priority algorithm defined in the main configuration structure to access each device, the UART controller receives data from the serial port to the position specified by the data receive buffer pointer, and calls the data receive function and parsing function to process the data;
[0070] Step 6: Update the device status structure. After data parsing is complete, adjust the timestamp and data packet status, monitor the sending status, and use the status consistency verification algorithm to verify the status data. This completes the centralized control and status tracking of multi-device serial communication.
[0071] The UART controller hardware interface is used to collect serial communication parameters and initial status information from multiple devices, obtaining device type identifiers, data buffer addresses, communication cycle parameters, and initial status flags. The collected data is then stored in a temporary configuration buffer. Specifically, the UART controller is accessed via memory-mapped registers to obtain the current values of each device's configuration registers. These register values are then transferred via DMA to a double-buffered temporary configuration area. A CRC check is performed on the data in the temporary configuration area, and finally, data that passes the CRC check is stored in the temporary configuration buffer.
[0072] The main configuration structure array is initialized using device parameters from the temporary configuration buffer. The main configuration structure includes fields for device name, data receive buffer pointer, power-on wait time, data receive cycle, wait strategy, data receive function, and parsing function. A configuration version management mechanism records structure changes. Specifically, a configuration version management table is created, containing the configuration version number and update timestamp for each device. Pointer swapping is used to load the data from the temporary configuration buffer into the runtime environment. The version number in the configuration version management table is compared with the current runtime version number, and the result of the version number comparison determines whether to allocate an independent configuration segment for the device type.
[0073] The slave device state structure array is initialized based on the device parameters in the master configuration structure. Each slave device state structure includes the device name, data content identifier, data receive buffer pointer, timestamp, data packet status, and transmission status fields. A time series prediction mechanism builds a prediction model based on historical state data. Specifically, a five-state machine model is constructed, encompassing initialization, ready, transmission, verification, and completion states. A corresponding state machine instance is created for each device instance. A time series prediction algorithm processes historical communication data to generate device state change trend predictions, and system resources are pre-allocated based on these predictions.
[0074] The application's main configuration structure sets the serial port communication parameters for each device using the communication cycle and waiting policy parameters. The policy distribution mechanism allocates differentiated configurations based on the device type identifier. Specifically, it parses the device type identifier, matches it with a predefined policy template, uses bit-field encoding technology to process differentiated parameters, compresses storage space, retrieves device-specific configuration parameters by querying the configuration table, and adjusts the policy parameters according to changes in the device's state during runtime.
[0075] The system executes a polling schedule, accessing each device using the periodic parameters and priority algorithm defined in the main configuration structure. The UART controller receives data from the serial port to the specified position in the data receive buffer pointer, and calls the data receive function and parsing function to process the data. Specifically, it uses the periodic parameters in the main configuration structure to generate a device access sequence, adjusts the polling interval according to the importance of the device and the urgency of the data, applies an interrupt mask to handle device access conflicts, and executes the data receive function and parsing function to process the received data.
[0076] The process involves updating the device state structure, adjusting timestamps and data packet states after data parsing, monitoring transmission status, and using a state consistency verification algorithm to validate state data. This enables centralized control and state tracking of multi-device serial communication. Specifically, it performs hash verification on the parsed data to verify state data integrity, compares the current state with the updated state, modifies only changed state fields, synchronizes the state update sequence of multiple devices using timestamps, and provides the updated state data for use in the next round of scheduling.
[0077] Specifically, in the configuration method of a multi-device polling communication system based on a UART controller described in this invention, step 1 includes:
[0078] Access the UART controller via memory-mapped registers to obtain the current values of each device's configuration registers;
[0079] The acquired register values are transferred via DMA and stored in a temporary configuration area with a double buffer structure.
[0080] Perform CRC check on the data in the temporary configuration area;
[0081] Data that passes the CRC check is stored in a temporary configuration buffer.
[0082] In step 1, this invention accesses the UART controller via memory-mapped registers to directly read the current values of each device's configuration registers, achieving efficient acquisition of hardware parameters. Subsequently, the acquired register values are transferred via DMA and stored in a temporary configuration area with a double-buffered structure, leveraging DMA's direct memory access feature to reduce CPU overhead. A CRC check is performed on the data in the temporary configuration area to verify data integrity. Finally, data that passes the CRC check is stored in a temporary configuration buffer, providing a reliable data foundation for subsequent configuration initialization. These steps are logically connected, from hardware interface acquisition to data storage, ensuring the accuracy and efficiency of parameter acquisition.
[0083] Specifically, in the configuration method of a multi-device polling communication system based on a UART controller described in this invention, step 2 includes:
[0084] Create a configuration version management table and write the configuration version number and update timestamp for each device.
[0085] Use pointer swapping to load the data in the temporary configuration buffer into the runtime environment;
[0086] Compare the version number in the configuration version management table with the currently running version number;
[0087] The decision on whether to assign a separate configuration segment to the device type is based on the version number comparison result.
[0088] In step 2 of this invention, a configuration version management table is created, and the configuration version number and update timestamp of each device are written to achieve configuration history tracking. Pointer swapping technology is used to load data from the temporary configuration buffer into the runtime environment, enabling rapid configuration switching through pointer operations without data copying. The version number in the configuration version management table is compared with the current running version number to identify configuration changes. Based on the version number comparison result, a decision is made on whether to allocate an independent configuration segment for the device type, thereby supporting dynamic configuration management. This step forms a complete process for version control and configuration loading, enhancing system adaptability and maintainability.
[0089] Specifically, in the configuration method of a multi-device polling communication system based on a UART controller described in this invention, step 3 includes:
[0090] Construct a five-state machine model that includes initialization, ready, transmission, verification, and completion states;
[0091] Create a corresponding state machine instance for each device instance;
[0092] Historical communication data is processed using a time series forecasting algorithm to generate predictions of device status change trends.
[0093] System resources are pre-allocated based on the predicted trends of state changes.
[0094] In step 3, this invention constructs a five-state machine model encompassing initialization, ready, transmission, verification, and completion states, providing a structured framework for device state management. A corresponding state machine instance is created for each device instance to achieve individual state tracking. A time series prediction algorithm is used to process historical communication data, generating predictions of device state change trends and inferring future behavior based on historical patterns. System resources are pre-allocated based on the state change trend prediction results to optimize resource utilization. This step, from state modeling to predictive resource allocation, logically supports the intelligence and foresight of state management.
[0095] Specifically, in the configuration method of the multi-device polling communication system based on a UART controller described in this invention, step 4 includes:
[0096] Parse the device type identifier and match it with a predefined policy template;
[0097] Bit-field encoding is used to process differential parameters and compress storage space.
[0098] Obtain specific configuration parameters for the device by querying the configuration table;
[0099] Adjust strategy parameters based on changes in device state during runtime.
[0100] In step 4, this invention parses the device type identifier and matches it with a predefined policy template to achieve rapid mapping of device-specific configurations; it uses bit-field encoding technology to process differentiated parameters, compressing storage space and reducing memory usage; it obtains device-specific configuration parameters by querying the configuration table, centrally managing configuration information; and it adjusts policy parameters according to changes in device status during runtime, dynamically adapting to system requirements. This step, from identifier parsing to parameter adjustment, forms an adaptive mechanism for policy distribution, improving configuration flexibility.
[0101] Specifically, in the configuration method of the multi-device polling communication system based on a UART controller described in this invention, step 5 includes:
[0102] Use the periodic parameters in the main configuration structure to generate the device access sequence;
[0103] Adjust the polling interval based on equipment importance and data urgency;
[0104] Use an interrupt mask to handle device access conflicts.
[0105] The data receiving and parsing functions are executed to process the received data.
[0106] In step 5 of this invention, the periodic parameters in the main configuration structure are used to generate a device access sequence and plan the polling order; the polling interval is adjusted according to the importance of the devices and the urgency of the data, prioritizing the processing of critical data; interrupt masks are applied to handle device access conflicts and avoid resource contention; and data receiving and parsing functions are executed to process the received data, completing data acquisition and preliminary processing. This step, from sequence generation to data execution, logically achieves both the orderliness and efficiency of polling scheduling.
[0107] Specifically, in the configuration method of a multi-device polling communication system based on a UART controller described in this invention, step 6 includes:
[0108] Perform a hash check on the parsed data to verify the integrity of the state data;
[0109] Compare the current state with the updated state, and only modify the changed state fields;
[0110] Use timestamps to synchronize the status update sequence of multiple devices;
[0111] The updated state data will be provided for use in the next round of scheduling.
[0112] In step 6, this invention performs hash verification on the parsed data to verify the integrity of the state data and prevent data corruption; compares the current state with the updated state, modifying only the changed state fields to reduce unnecessary update operations; uses timestamps to synchronize the state update sequence of multiple devices to maintain state consistency; and provides the updated state data for the next round of scheduling, forming a closed loop of state tracking. This step, from verification to synchronization, ensures the accuracy and timing coordination of state updates.
[0113] Specifically, the configuration method for a multi-device polling communication system based on a UART controller according to the present invention further includes:
[0114] Detect configuration update events and trigger state synchronization operations;
[0115] Identify faulty devices and perform isolation and reinitialization operations;
[0116] Regularly send heartbeat signals to monitor the device's communication status;
[0117] Record device status change data for system performance optimization.
[0118] This invention also includes detecting configuration update events, triggering state synchronization operations, and responding promptly to configuration changes; identifying faulty devices, performing isolation and re-initialization operations, and restoring normal system functionality; periodically sending heartbeat signals to monitor device communication status and detect connection health in real time; and recording device status change data for system performance optimization and accumulating historical data to support analysis. These additional steps extend the system's monitoring and self-healing capabilities from event detection to optimization.
[0119] Specifically, the configuration method for a multi-device polling communication system based on a UART controller according to the present invention further includes:
[0120] The raw data collected in step 1 is processed in step 2 to provide initialization parameters for step 3;
[0121] Step 4 uses the output data from Steps 2 and 3 to generate a device configuration strategy;
[0122] Step 5 executes the configuration strategy to generate runtime data;
[0123] Step 6: Process operational data and update device status;
[0124] The configuration version management in step 2 and the status prediction in step 3 work together to adjust the system operating parameters.
[0125] This invention also includes: Step 1: The raw data collected in Step 1 is processed in Step 2 to provide initialization parameters for Step 3, forming a data stream transformation; Step 4: The output data from Steps 2 and 3 are used to generate a device configuration strategy, integrating configuration and status information; Step 5: The configuration strategy is executed to generate operational data, realizing the transformation from strategy to action; Step 6: The operational data is processed to update the device status, completing status feedback; The configuration version management in Step 2 and the status prediction in Step 3 jointly adjust the system operating parameters to achieve collaborative optimization. This step logically links data processing, strategy generation, and execution updates, constructing a complete control loop.
[0126] Specifically, the configuration method for a multi-device polling communication system based on a UART controller according to the present invention further includes:
[0127] Set a 1000ms communication cycle for the telemetry and control transponder equipment, a 250ms communication cycle for magnetometer 1, magnetometer 2, and magnetometer 3, and a no-wait strategy for the ground test equipment;
[0128] The policy distribution mechanism reads the device type identifier and obtains the corresponding parameters from the main configuration structure;
[0129] The status prediction mechanism analyzes time series data and adjusts the device polling priority.
[0130] The state consistency verification algorithm processes the state data of multiple devices to complete the state synchronization update.
[0131] This invention also includes setting long communication cycles for telemetry and control transponder equipment, short communication cycles for magnetometer equipment, and a no-wait strategy for ground testing equipment to adapt to different equipment needs; a strategy distribution mechanism reads the equipment type identifier and obtains the corresponding parameters from the main configuration structure to achieve differentiated configuration; a state prediction mechanism analyzes time-series data, adjusts equipment polling priorities, and dynamically optimizes scheduling; and a state consistency verification algorithm processes the state data of multiple devices, completes state synchronization updates, and ensures system consistency. This step, from equipment-specific settings to global synchronization, enhances the system's customization and coordination.
[0132] This invention addresses the scalability and maintenance challenges arising from the dispersed parameters of multiple serial port devices in satellite embedded systems by constructing a centralized configuration and state management architecture. Specifically, a master configuration structure array is used to uniformly store the communication parameters and processing functions of all devices. A configuration version management mechanism tracks parameter change history, avoiding version inconsistencies caused by maintaining configuration information separately for each device in traditional methods. Regarding state management, a slave device state structure array based on a time-series prediction mechanism records and predicts device operating states in real time, while a state consistency verification algorithm ensures the accuracy of synchronized state updates across multiple devices.
[0133] The system employs a differentiated configuration engine to automatically allocate communication policies based on device type identifiers. A policy distribution mechanism dynamically adjusts parameter configurations, eliminating the risk of configuration errors caused by manual intervention. An intelligent polling scheduling algorithm adaptively adjusts the access order based on device importance and data urgency, effectively preventing device access conflicts in conjunction with an interrupt masking mechanism. Furthermore, through a configuration-state linkage design, state synchronization is automatically triggered when a configuration update is detected, achieving collaborative management of parameters and states.
[0134] In terms of maintenance, the system continuously monitors the communication status of devices through a heartbeat detection mechanism, and quickly locates and handles abnormal devices by combining fault device identification and isolation strategies. The recording and analysis of historical status data provides data support for system performance optimization. The entire solution significantly reduces the maintenance complexity of multi-device systems and improves configuration consistency and reliability when the system is expanded through unified configuration management, intelligent status prediction, and adaptive scheduling strategies.
Claims
1. A method for configuring a multi-device polling communication system based on UART controllers, the method comprising: The application relates to a multi-device serial communication centralized control method based on UART controller, which comprises the following steps: Step 1: collecting multi-device serial communication parameters and initial state information through a UART controller hardware interface, obtaining device type identification, data buffer address, communication cycle parameters and initial state markers, and storing the collected data into a temporary configuration buffer; Step 2: initializing a main configuration structure array using the device parameters in the temporary configuration buffer, wherein the main configuration structure comprises a device name, a data receiving buffer pointer, a power-on waiting time, a data receiving cycle, a waiting strategy, a data receiving function and an analysis function field, and a configuration version management mechanism records structure changes; Step 3: initializing a slave device state structure array according to the device parameters in the main configuration structure, wherein the slave device state structure comprises a device name, a data content identification, a data receiving buffer pointer, a time marker, a data packet state and a sending state field, and a time sequence prediction mechanism establishes a prediction model according to historical state data; Step 4: setting serial communication parameters of each device using the communication cycle and waiting strategy parameters in the main configuration structure, and a strategy distribution mechanism allocates differential configurations according to device type identification; Step 5: executing a polling scheduling, accessing each device using the cycle parameters and priority algorithm defined in the main configuration structure, receiving data from a serial port to a position specified by the data receiving buffer pointer of the UART controller, and calling a data receiving function and an analysis function to process the data; Step 6: updating the slave device state structure, adjusting the time marker and the data packet state after completing data analysis, monitoring the sending state, verifying the state data by a state consistency verification algorithm, and completing centralized control and state tracking of multi-device serial communication.
2. The UART controller based multi-device polling communication system configuration method of claim 1, wherein, The step 1 comprises: Accessing the UART controller through a memory mapping register mode to obtain current values of configuration registers of each device; Storing the obtained register values into a temporary configuration area of a double-buffer structure through DMA transmission; Performing CRC check on the data in the temporary configuration area; Storing the data passing the CRC check into a temporary configuration buffer.
3. The method of claim 2, wherein, The step 2 comprises: Creating a configuration version management table and writing device configuration version numbers and update time stamps into the table; Loading the data in the temporary configuration buffer into a running environment using a pointer exchange technology; Comparing the version numbers in the configuration version management table with current running version numbers; Deciding whether to allocate independent configuration segments for device types according to the comparison results of the version numbers.
4. The method of claim 3, wherein, The step 3 comprises: Building a five-state machine model comprising initialization, readiness, transmission, verification and completion states; Creating corresponding state machine instances for each device instance; Processing historical communication data using a time sequence prediction algorithm to generate a device state change trend prediction; Preallocating system resources according to the prediction results of the state change trend.
5. The method of claim 4, wherein, The step 4 comprises: Analyzing device type identification and matching a predefined strategy template; Processing differential parameters using a bit field coding technology to compress storage space; Obtaining device specific configuration parameters by querying a configuration table; Adjusting strategy parameters according to running device state changes.
6. The UART controller based multi-device polling communication system configuration method of claim 5, wherein, The step 5 comprises: Generating a device access sequence using the cycle parameters in the main configuration structure; Adjusting a polling interval according to device importance and data urgency; Handling device access conflicts using an interrupt mask. The data receiving function and the parsing function are executed to process the received data.
7. The UART controller based multi-device polling communication system configuration method of claim 6, wherein, The step 6 includes: Hash check is performed on the parsed data to verify the integrity of the state data; The current state is compared with the updated state, and only the changed state field is modified; The time stamp is used to synchronize the state update timing of multiple devices; The updated state data is provided for the next round of scheduling.
8. The method of claim 7, wherein, Also includes: Detecting configuration update events to trigger state synchronization operations; Identify faulty devices and perform isolation and re-initialization operations; Periodically send heartbeat signals to monitor device communication status; Record device state change data for system performance optimization.
9. The method of claim 8, wherein, Also includes: The raw data collected in step 1 is processed in step 2 to provide initialization parameters for step 3; Step 4 uses the output data of steps 2 and 3 to generate device configuration strategies; Step 5 executes the configuration strategy to generate running data; Step 6 processes the running data to update the device state; The configuration version management of step 2 and the state prediction of step 3 jointly adjust the system running parameters.
10. The method of claim 9, wherein, Also includes: Set the communication cycle of the measurement and control communication equipment (such as X-band measurement and control transponder) to 1000ms, set the communication cycle of the magnetometer 1, magnetometer 2, and magnetometer 3 devices to 250ms, and set the ground test equipment to no waiting strategy; The strategy distribution mechanism reads the device type identifier and obtains the corresponding parameters from the main configuration structure; The state prediction mechanism analyzes the time series data and adjusts the device polling priority; The state consistency check algorithm processes the state data of multiple devices to complete the state synchronization update.