Communication Management System Based on Domestic Microcontroller
By adopting dynamic memory management, simulated serial communication, and time synchronization strategies using domestically produced microcontrollers in the communication management system, the problem of high cost in existing systems has been solved, enabling efficient operation on the GD32F103 platform, reducing costs, and improving system stability and flexibility.
Patent Information
- Application Number
- CN202510300193.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-03-14
AI Technical Summary
Existing communication management systems are based on the Linux operating system, resulting in high costs and low cost-effectiveness, limited functionality, and high development costs and technical requirements.
It adopts a domestic microcontroller and optimizes memory usage and time synchronization by dynamically allocating memory resources, simulating serial communication ports, hardening configuration information, and managing dual time synchronization, combined with an RC oscillator and software time.
Running on the more cost-effective GD32F103 platform reduces costs, improves system efficiency, stability and flexibility, reduces resource consumption, and ensures the security of configuration data and the accuracy of time synchronization.
Smart Images

Figure CN119807129B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication management system technology, specifically a communication management system based on a domestically produced microcontroller. Background Technology
[0002] A communication management system is an intelligent device system used to realize data transmission and conversion between different communication protocols and different types of devices. It usually acts as an intermediate bridge, connecting various devices with different communication interfaces and protocols to achieve efficient, accurate, and reliable data transmission and interaction.
[0003] Current communication management systems are generally based on the Linux operating system, which requires high microcontroller clock speeds and memory capacity, resulting in high costs. Furthermore, the development of these devices also requires significant investment. However, the functions implemented by these devices are relatively simple, mainly focusing on data collection, processing, and forwarding. By eliminating some non-core additional functions and peripherals, and optimizing program algorithms, space occupation and resource consumption can be significantly reduced. This optimization strategy allows the communication management machine to run on the more cost-effective GD32F103 platform. Existing communication management systems are generally based on the Linux operating system, requiring high microcontroller clock speeds and memory capacity, resulting in high costs. At the same time, the development of these devices not only requires significant investment but also demands high technical skills from developers. However, the functions implemented by these devices are relatively simple, mainly focusing on data collection, processing, and forwarding, resulting in low cost-effectiveness. Summary of the Invention
[0004] This invention aims to at least partially solve one of the technical problems in the prior art by dynamically allocating and managing the memory resources of the communication management machine during operation; processing ordinary I / O ports into simulated serial communication ports to obtain simulated serial communication ports and managing them; customizing and fixing the configuration information of the communication management machine; and using the RC oscillator inside the microcontroller in conjunction with software time for dual time synchronization management. This addresses the problem that existing communication management machine systems are generally based on the Linux operating system, requiring high microcontroller clock speeds and memory capacities, resulting in high costs.
[0005] To achieve the above objectives, in the first aspect, this application provides a communication management system based on a domestically produced microcontroller, including a space optimization module, a serial port simulation module, a configuration management module, and a time synchronization module;
[0006] The space optimization module is used to dynamically allocate and manage the memory resources of the communication management machine during operation;
[0007] The serial port simulation module performs simulated communication serial port processing on ordinary I / O ports to obtain simulated communication serial ports, and manages the simulated communication serial ports.
[0008] The configuration management module is used to customize and solidify the configuration information of the communication management machine;
[0009] The time synchronization module utilizes the RC oscillator inside the microcontroller and combines it with software time synchronization for dual time management.
[0010] Furthermore, the space optimization module is configured with space optimization strategies, which include:
[0011] During the operation of the communication management unit, the size of the microcontroller's memory pool is counted at the first time interval within the first time period, and sorted in ascending order of size, and marked as periodic memory size information, denoted as GAi=[R1, R2, R3, ..., Rn], where i represents the i-th first time period; where the first time period is T0, and the first time interval is t1.
[0012] Furthermore, spatial optimization strategies also include:
[0013] Set the first time window as c2, and divide the periodic memory size information into periods. For any first time window within the divided periodic memory size information, select the largest memory pool size within the first time window, denoted as RM, and calculate q0*RM. Mark q0*RM as the reference size of the corresponding first time window. After completion, the reference memory size information is obtained, denoted as GBi, where q0 is the scaling factor q0∈[0.5,1].
[0014] Furthermore, spatial optimization strategies also include:
[0015] During the operation of the communication management machine, if the operation enters a new first time window, it is denoted as BR based on the reference size of the first time window corresponding to the previous first time period. i-1 And the reference size of the first time window corresponding to the previous first time period, denoted as BR. i-2 The predicted reference size is calculated using the first reference formula; the first reference formula is as follows: Where BRi represents the prediction reference size, q1 and q2 are weight coefficients, q1+q2=1, and q1>0, q2>0; and the size of the memory pool is adjusted to the prediction reference size;
[0016] Otherwise, the utilization rate of the memory pool is collected. When the utilization rate of the memory pool is greater than K1 for K0 consecutive first time intervals, the memory pool is increased. When the utilization rate of the memory pool is less than K2, the memory pool is decreased. Here, K0 is the number of thresholds set, and K1 and K2 are the threshold utilization rates set.
[0017] Furthermore, the serial port simulation module is configured with a serial port simulation strategy, which includes:
[0018] For the microcontroller's ordinary I / O ports, select A1 ordinary I / O ports and sort them, where k is an even number. Pair the I / O port with the odd-numbered sequence number with the next I / O port with the even-numbered sequence number, and call them paired I / O ports. For the paired I / O ports, select the I / O port with the odd-numbered sequence number as the transmit pin and the I / O port with the even-numbered sequence number as the receive pin, and mark them as analog communication serial ports. Use a timer to control the baud rate of the analog communication serial ports, and use time-division multiplexing technology to manage multiple analog communication serial ports with one timer.
[0019] Furthermore, the configuration management module is configured with configuration management policies, which include:
[0020] Based on the microcontroller's Flash memory, the microcontroller's Flash memory is divided into a configuration data partition, a configuration backup partition, a default configuration partition, and a configuration log partition; a copy of the default configuration data is stored in the default configuration partition.
[0021] The microcontroller's configuration data is divided into ordinary configuration data and sensitive configuration data;
[0022] When new microcontroller configuration data is received, it is recorded as the first configuration data. The check value of the first configuration data is calculated, and the version number of the first configuration data is defined. Then, it is determined whether the new configuration data is sensitive configuration data. If it is, the new configuration data is encrypted; otherwise, it is not encrypted. After completion, the second configuration data is obtained.
[0023] Furthermore, configuration management strategies also include:
[0024] Write the second configuration data and the corresponding checksum together to the configuration backup partition; verify the data integrity of the configuration backup partition. If the verification fails, issue a write error warning; if the verification passes, erase the configuration data in the configuration data partition, then copy the second configuration data from the configuration backup partition to the configuration data partition; and update the configuration update log in the configuration log partition to record the time and version number of the new configuration data update.
[0025] Furthermore, configuration management strategies also include:
[0026] When reading configuration data, the corresponding checksum is recalculated based on the read configuration data and compared with the stored checksum. If they are the same, the read is successful; otherwise, an error warning is issued.
[0027] If the configuration data of the configuration data partition causes the communication management machine system to malfunction, the corresponding configuration data will be rolled back to the previous version based on the configuration update log and the data of the configuration backup partition.
[0028] Furthermore, the time synchronization module is configured with a time synchronization strategy, which includes:
[0029] An accurate timestamp is obtained from an external high-precision clock source and recorded as external time P1. The current time is recorded as internal time P2 using a timer driven by the microcontroller's internal RC oscillator. The frequency deviation PC is then calculated using the frequency deviation formula, which is as follows: ; The frequency of the RC oscillator is calibrated based on the frequency deviation;
[0030] The calibration trigger cycle is set, including: calibrating the frequency of the RC oscillator when the communication management system starts up; calibrating the frequency of the RC oscillator at a second time interval, the second time interval being t2; setting temperature change thresholds and voltage change thresholds, and calibrating the frequency of the RC oscillator when the temperature change exceeds the temperature change threshold or the voltage change exceeds the voltage change threshold.
[0031] Furthermore, time synchronization strategies also include:
[0032] A high-precision time base is generated based on a hardware timer of a microcontroller, which is recorded as the first reference time; and a 32-variable is used to record the microsecond-level time, which is recorded as the second reference time.
[0033] Each time communication or event occurs, the communication management unit records the current timestamp, performs local time synchronization using the first and second reference times at a third time interval, and synchronizes time with other devices through the microcontroller's communication interface. The third time interval is t3.
[0034] The beneficial effects of this invention are as follows: This invention dynamically allocates and manages the memory resources of the communication management machine during operation; it performs simulated serial port processing on ordinary I / O ports to obtain simulated serial ports and manages them; it customizes and solidifies the configuration information of the communication management machine; and it utilizes the RC oscillator inside the microcontroller combined with software time for dual time synchronization management. This allows the communication management machine to run on the more cost-effective GD32F103 platform. By precisely matching the actual needs of the communication management machine, we can avoid using unnecessary peripherals, further reducing costs and complexity.
[0035] This invention dynamically adjusts the microcontroller's memory pool, offering advantages such as avoiding memory waste caused by static allocation by allocating and releasing resources on demand; significantly reducing memory usage and resource consumption; further improving system efficiency and stability; utilizing ordinary I / O ports to simulate serial communication ports, expanding the serial communication port to address insufficient serial port resources; storing configuration data in Flash memory and performing backup and partition management, avoiding the cost of expanding external memory while improving system reliability and startup speed, and enhancing the flexibility, reliability, and security of configuration data; utilizing an RC oscillator and software time synchronization; achieving high-precision time synchronization in resource-constrained microcontrollers; saving hardware costs while improving system flexibility and reliability. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of the system of the present invention. Detailed Implementation
[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0038] Example 1, please refer to Figure 1 As shown, this application provides a communication management system based on a domestically produced microcontroller, including a space optimization module, a serial port simulation module, a configuration management module, and a time synchronization module;
[0039] The space optimization module is used to dynamically allocate and manage the memory resources of the communication management machine during operation;
[0040] The space optimization module is configured with a space optimization strategy, which includes: during the operation of the communication management unit, the size of the microcontroller's memory pool is counted at a first time interval within a first time period, and sorted in ascending order of size, marked as periodic memory size information, denoted as GAI=[R1, R2, R3, ..., Rn], where i represents the i-th first time period; where the first time period is T0, and the first time interval is t1; in this embodiment, the first time period T0 is one day, 24 hours, and the first time interval t1 is 5 minutes;
[0041] The first time window is set as c2. The periodic memory size information is divided into periods using the first time window. For any first time window within the divided periodic memory size information, the largest memory pool size within the first time window is selected and denoted as RM. q0*RM is calculated. q0*RM is then marked as the reference size of the corresponding first time window. After completion, the reference memory size information is obtained and denoted as GBi, where q0 is the scaling factor q0∈[0.5,1]. For example, in this embodiment, the first time window c2 is 1 hour and q0 is 0.9; that is, the maximum value of the data collected within one hour is multiplied by 0.9 as the reference size for this hour.
[0042] During the operation of the communication management machine, if the operation enters a new first time window, it is denoted as BR based on the reference size of the first time window corresponding to the previous first time period. i-1 And the reference size of the first time window corresponding to the previous first time period, denoted as BR. i-2 The predicted reference size is calculated using the first reference formula; the first reference formula is as follows: Where BRi represents the prediction reference size, q1 and q2 are weight coefficients, q1+q2=1, and q1>0, q2>0; and the size of the memory pool is adjusted to the prediction reference size; in this embodiment, q1=0.6, q2=0.4;
[0043] Otherwise, the utilization rate of the memory pool is collected. When the utilization rate of the memory pool is greater than K1 for K0 consecutive first time intervals, the memory pool is increased; when the utilization rate of the memory pool is less than K2, the memory pool is decreased. Here, K0 is the set number of thresholds, and K1 and K2 are the set threshold utilization rates. In this embodiment, K0=3, K1=90%, and K3=0.3.
[0044] In the specific implementation process, the purpose of setting the proportional coefficient q0 is to prevent the reference size from becoming larger and larger and failing to change according to the actual usage. Dynamic resource management can significantly reduce memory usage and resource consumption by allocating and releasing resources on demand, thereby further improving the efficiency and stability of the system.
[0045] The serial port simulation module performs simulated serial communication processing on ordinary I / O ports to obtain simulated serial communication ports, and manages the simulated serial communication ports.
[0046] The serial port simulation module is configured with a serial port simulation strategy, which includes: for ordinary I / O ports of the microcontroller, select A1 ordinary I / O ports and sort them, where k is an even number; pair the I / O port with the odd-numbered sequence number with the next even-numbered sequence number, and mark them as paired I / O ports; for empty paired I / O ports, select the I / O port with the odd-numbered sequence number as the transmit pin and the I / O port with the even-numbered sequence number as the receive pin, and mark them as simulated communication serial ports; use a timer to control the baud rate of the simulated communication serial port, and use time-division multiplexing technology to manage multiple simulated communication serial ports with one timer;
[0047] For example, simulation can be performed based on the UART communication protocol. The UART communication protocol is an asynchronous serial communication protocol, and its data frame format includes: start bit, 1 bit low level; data bits, usually 8 bits, but can also be 5, 6, 7 or 9 bits; parity bit, 1 bit, which can be odd parity, even parity or no parity; stop bit, 1 or 2 bits high level.
[0048] In practical implementation, serial port functionality can be achieved using ordinary GPIO ports by simulating communication serial ports in software, thereby expanding hardware serial port resources. Combined with multi-channel simulated serial port management technology, multiple serial ports can be run in parallel on resource-constrained microcontroller platforms. The key to this method lies in precise timing control and efficient time-sharing multiplexing mechanism, which is suitable for cost-sensitive embedded systems with insufficient serial port resources.
[0049] The configuration management module is used to customize and solidify the configuration information of the communication management machine;
[0050] The configuration management module is configured with a configuration management policy, which includes: based on the microcontroller's Flash memory, the microcontroller's Flash memory is divided into a configuration data partition, a configuration backup partition, a default configuration partition, and a configuration log partition; a copy of default configuration data is stored in the default configuration partition; when the configuration data is corrupted or invalid, the system is started using the default configuration; the size of each partition is determined according to the actual needs of the configuration data.
[0051] The microcontroller's configuration data is divided into ordinary configuration data and sensitive configuration data;
[0052] When new microcontroller configuration data is received, it is recorded as the first configuration data. The check value of the first configuration data is calculated, for example, CRC16. A version number of the first configuration data is defined to identify the version of the configuration data. Then, it is determined whether the new configuration data is sensitive. If it is, the new configuration data is encrypted. If not, it is not encrypted. After completion, the second configuration data is obtained. Encryption can use a lightweight encryption algorithm, such as AES-128 or XOR encryption.
[0053] Write the second configuration data and the corresponding checksum together to the configuration backup partition; verify the data integrity of the configuration backup partition. If the verification fails, issue a write error warning; if the verification passes, erase the configuration data in the configuration data partition, then copy the second configuration data from the configuration backup partition to the configuration data partition; and update the configuration update log in the configuration log partition to record the time and version number of the new configuration data update.
[0054] When reading configuration data, the corresponding checksum is recalculated based on the read configuration data and compared with the stored checksum. If they are the same, the read is successful; otherwise, an error warning is issued. When reading configuration data, the version number is also checked to ensure compatibility with the current system.
[0055] If the configuration data of the configuration data partition causes the communication management machine system to malfunction, the corresponding configuration data will be rolled back to the previous version according to the configuration update log and the data of the configuration backup partition.
[0056] In the specific implementation process, the integrity and consistency of configuration data are ensured through dual backup and verification mechanisms; storage space utilization can be optimized through data partitioning management; the security of configuration data can be protected through data encryption; by storing configuration data in Flash, the cost of expanding external storage is avoided, while improving system reliability and startup speed; and by combining optimization strategies such as data verification, encryption, and version management, the security and integrity of configuration data can be further ensured.
[0057] The time synchronization module utilizes the RC oscillator inside the microcontroller and combines it with software time for dual time synchronization management;
[0058] The time synchronization module is configured with a time synchronization strategy, which includes: obtaining an accurate timestamp through an external high-precision clock source, such as GPS, NTP, or an external crystal oscillator; recording this as the external time P1 and using a timer driven by the microcontroller's internal RC oscillator to record the current time; recording this as the internal time P2; and calculating the frequency deviation PC using the frequency deviation formula, as follows: The frequency of the RC oscillator is calibrated based on the frequency deviation, that is, the calibration parameters of the internal RC oscillator are adjusted according to the frequency deviation.
[0059] The calibration trigger cycle is set, including: calibrating the frequency of the RC oscillator when the communication management system starts up; calibrating the frequency of the RC oscillator at a second time interval, the second time interval being t2; setting temperature change thresholds and voltage change thresholds, calibrating the frequency of the RC oscillator when the temperature change exceeds the temperature change threshold or the voltage change exceeds the voltage change threshold; because the frequency of the RC oscillator is greatly affected by temperature and voltage, it needs to be calibrated in time when the temperature change and voltage change are too large.
[0060] A high-precision time base, such as TIM2, is generated using a hardware timer based on a microcontroller and is denoted as the first reference time. A 32-bit variable, such as system_time_us, is used to record the microsecond-level time and is denoted as the second reference time. system_time_us needs to be updated in the timer interrupt.
[0061] Each time communication or event occurs, the communication management unit records the current timestamp, performs local time synchronization using the first and second reference times at a third time interval, and synchronizes time with other devices through the microcontroller's communication interface. The third time interval is t3.
[0062] In real-time processes, using an internal RC oscillator to achieve high-precision time synchronization is a low-cost solution for achieving accurate time management in resource-constrained microcontrollers. Although the accuracy of an internal RC oscillator is usually not as good as that of an external crystal oscillator, high-precision time synchronization can still be achieved through calibration and software optimization. Dynamic calibration, temperature compensation, time synchronization and optimization strategies have improved the accuracy and reliability of time synchronization.
[0063] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces. The indirect coupling or communication connection between systems, modules, and units may be electrical, mechanical, or other forms.
[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A communication management system based on a domestically produced microcontroller, characterized in that: It includes a space optimization module, a serial port simulation module, a configuration management module, and a time synchronization module; The space optimization module is used to dynamically allocate and manage the memory resources of the communication management machine during operation; The serial port simulation module performs simulated communication serial port processing on ordinary I / O ports to obtain simulated communication serial ports, and manages the simulated communication serial ports. The configuration management module is used to customize and solidify the configuration information of the communication management machine; The time synchronization module utilizes the RC oscillator inside the microcontroller and combines it with software time for dual time synchronization management. The space optimization module is configured with a space optimization strategy, which includes: During the operation of the communication management unit, the size of the microcontroller's memory pool is counted at the first time interval within the first time period, and sorted in ascending order of size, marked as the periodic memory size information, denoted as GAI = [R1, R2, R3, ..., Rn], where i represents the i-th first time period; the first time period is T0, and the first time interval is t1; the first time period T0 is 24 hours, and the first time interval t1 is 5 minutes; Space optimization strategies also include: The first time window is set as c2. The periodic memory size information is divided into two parts based on the first time window. For any first time window within the divided periodic memory size information, the largest memory pool size within the first time window is selected and denoted as RM. q0★RM is calculated. q0*RM is then marked as the reference size of the corresponding first time window. After completion, the reference memory size information is obtained and denoted as GBi, where q0 is the scaling factor q0∈[0.5,1]. The first time window c2 is 1 hour, and q0 is 0.9, that is, the maximum value of the data collected within one hour is multiplied by 0.9 as the reference size for this hour. Space optimization strategies also include: During the operation of the communication management machine, if the operation enters a new first time window, it is denoted as BR based on the reference size of the first time window corresponding to the previous first time period. i-1 And the reference size of the first time window corresponding to the previous first time period, denoted as BR. i-2 The predicted reference size is calculated using the first reference formula; the first reference formula is as follows: BR i =q1*BR i-1 +q2*BR i-2 , of which BR i The reference size is represented by q1 and q2, which are weighting coefficients. q1 + q2 = 1, and q1 > 0, q2 > 0. The size of the memory pool is adjusted to the reference size; q1 = 0.6, q2 = 0.
4. Otherwise, the utilization rate of the memory pool is collected. When the utilization rate of the memory pool is greater than K1 for K0 consecutive first time intervals, the memory pool is increased; when the utilization rate of the memory pool is less than K2, the memory pool is decreased. Here, K0 is the number of thresholds set, and K1 and K2 are the threshold utilization rates set. K0 = 3, K1 = 90%, K3 = 0.
3. The serial port simulation module is configured with serial port simulation strategies, which include: For the microcontroller's ordinary I / O ports, select A1 ordinary I / O ports and sort them, where k is an even number. Pair the I / O port with the odd-numbered sequence number with the next even-numbered sequence number, and call them paired I / O ports. For empty paired I / O ports, select the I / O port with the odd-numbered sequence number as the transmit pin and the I / O port with the even-numbered sequence number as the receive pin, and mark them as analog communication serial ports. Use a timer to control the baud rate of the analog communication serial port, and use time-division multiplexing technology to manage multiple analog communication serial ports with one timer. By simulating the communication serial port in software, serial port functions can be implemented using ordinary GPIO ports, thereby expanding hardware serial port resources. Combined with multi-channel analog serial port management technology, multiple serial ports can be run in parallel on a resource-constrained microcontroller platform. The configuration management module is configured with configuration management policies, which include: Based on the microcontroller's Flash memory, the microcontroller's Flash memory is divided into a configuration data partition, a configuration backup partition, a default configuration partition, and a configuration log partition; a copy of default configuration data is stored in the default configuration partition; when the configuration data is corrupted or invalid, the system is started using the default configuration, and the size of each partition is determined according to the actual needs of the configuration data; The microcontroller's configuration data is divided into ordinary configuration data and sensitive configuration data; When new microcontroller configuration data is received, it is recorded as the first configuration data. The check value of the first configuration data is calculated, and the version number of the first configuration data is defined. Then, it is determined whether the new configuration data is sensitive configuration data. If it is, the new configuration data is encrypted; otherwise, it is not encrypted. After completion, the second configuration data is obtained. Configuration management strategies also include: Write the second configuration data and the corresponding checksum together to the configuration backup partition; verify the data integrity of the configuration backup partition. If the verification fails, issue a write error warning; if the verification passes, erase the configuration data in the configuration data partition, then copy the second configuration data from the configuration backup partition to the configuration data partition; and update the configuration update log in the configuration log partition to record the time and version number of the new configuration data update. Configuration management strategies also include: When reading configuration data, the corresponding checksum is recalculated based on the read configuration data and compared with the stored checksum. If they are the same, the read is successful; otherwise, an error warning is issued. If the configuration data in the configuration data partition causes an anomaly in the communication management machine system, the corresponding configuration data will be rolled back to the previous version based on the configuration update log and the data in the configuration backup partition. Dual backup and verification mechanisms ensure the integrity and consistency of the configuration data. Data partition management optimizes storage space usage. Data encryption protects the security of the configuration data. Storing the configuration data in Flash avoids the cost of expanding external storage while improving system reliability and startup speed. Combined with data verification, encryption, and version management, the security and integrity of the configuration data are further ensured. The time synchronization module is configured with time synchronization strategies, which include: An accurate timestamp is obtained from an external high-precision clock source and recorded as external time P1. The current time is recorded as internal time P2 using a timer driven by the RC oscillator inside the microcontroller. The frequency deviation PC is calculated using the frequency deviation formula. The frequency deviation formula is as follows: The frequency of the RC oscillator is calibrated based on the frequency deviation. The calibration trigger cycle is set, including: calibrating the frequency of the RC oscillator when the communication management system starts up; calibrating the frequency of the RC oscillator at a second time interval, the second time interval being t2; setting temperature change thresholds and voltage change thresholds, and calibrating the frequency of the RC oscillator when the temperature change exceeds the temperature change threshold or the voltage change exceeds the voltage change threshold. Time synchronization strategies also include: A high-precision time base is generated based on a hardware timer of a microcontroller, which is recorded as the first reference time; and a 32-variable is used to record the microsecond-level time, which is recorded as the second reference time. Each time communication or event occurs, the communication management unit records the current timestamp, performs local time synchronization using the first and second reference times at a third time interval, and synchronizes time with other devices through the microcontroller's communication interface. The third time interval is t3.
Citation Information
Patent Citations
Communication managing machine capable of being comprehensively realized based on extensible markup language and dynamic library
CN102685134A
Multi-channel serial port communication method and system based on software simulation
CN114253879A
High-precision calibration method for high-precision active RC oscillator
CN115833752A