Data communication method and device, electronic equipment and storage medium

By acquiring the transmission frequency and compensating for transmission loss signal strength, the problem of signal transmission and reception interruption between the main control chip and the RF chip is solved, improving the stability and reliability of data communication.

CN121841390APending Publication Date: 2026-04-10VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610119599.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-28
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In 5G networks, signal transmission and reception between the main control chip and the radio frequency chip may be interrupted due to inconsistent path loss, affecting the reliability and stability of data communication.

Method used

By acquiring the signal transmission frequency, compensating for the signal strength based on transmission loss, adjusting the signal amplitude using a variable gain amplifier and a digital attenuator, and optimizing timing synchronization using waveform calibration and feedback circuitry, the signal strength is ensured to be within a reasonable range.

Benefits of technology

This effectively avoids signal transmission and reception interruptions, and improves the signal transmission quality and data communication reliability between the main control chip and the RF chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121841390A_ABST
    Figure CN121841390A_ABST
Patent Text Reader

Abstract

The invention discloses a data communication method and device, electronic equipment and a storage medium, and belongs to the technical field of communication. The method is applied to a main control chip in the electronic equipment, the electronic equipment comprises the main control chip and a radio frequency chip, the main control chip is used for receiving a signal sent by the radio frequency chip or sending a signal to the radio frequency chip, and the method comprises the following steps: obtaining the sending frequency of the signal; the sending frequency is the signal sending frequency of the main control chip or the radio frequency chip; compensating the signal strength of the signal according to the transmission loss corresponding to the sending frequency to obtain target signal strength; and performing data transmission with the radio frequency chip according to the target signal strength.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, specifically relating to a data communication method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the continuous enhancement of smartphone functions and the dramatic increase in users' demand for data communication speed, data communication within mobile phones is facing unprecedented challenges. In the context of the widespread adoption of 5G networks, mobile phones need to handle higher bandwidth network data, leading to the development of high-speed digital signal interfaces to meet these higher rate demands. For example, ultra-high-speed digital signal lines can be used, with transmission frequencies reaching up to 6-10 GHz.

[0003] However, high-frequency signals place higher demands on traces and components. During the bidirectional communication process between the main control chip and the radio frequency integrated circuit (RFIC), since both the main control chip and the RFIC need to transmit and receive signals, if the path loss strength of the signal transmission is inconsistent at the transmitting end or the receiving end, it will cause signal transmission and reception to be interrupted. Summary of the Invention

[0004] The purpose of this application is to provide a data communication method that can solve the problem of signal transmission and reception lag during the interaction between the main control chip and the radio frequency chip.

[0005] In a first aspect, embodiments of this application provide a data communication method applied to a main control chip in an electronic device. The electronic device includes the main control chip and a radio frequency chip. The main control chip is used to receive signals transmitted by the radio frequency chip or to transmit signals to the radio frequency chip. The method includes: The transmission frequency of the signal is obtained; the transmission frequency is the frequency at which the main control chip or the radio frequency chip transmits the signal. The signal strength is compensated for based on the transmission loss corresponding to the transmission frequency to obtain the target signal strength; Data is transmitted with the radio frequency chip based on the target signal strength.

[0006] Secondly, embodiments of this application provide a data communication device applied to a main control chip in an electronic device. The electronic device includes the main control chip and a radio frequency chip. The main control chip is used to receive signals sent by the radio frequency chip or to send signals to the radio frequency chip. The device includes: An acquisition module is used to acquire the transmission frequency of a signal; the transmission frequency is the frequency at which the main control chip or the radio frequency chip transmits signals. The compensation module is used to compensate the signal strength of the signal according to the transmission loss corresponding to the transmission frequency, so as to obtain the target signal strength; The transmission module is used to transmit data with the radio frequency chip according to the target signal strength.

[0007] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and the program or instructions, when executed by the processor, implement the steps of the data communication method as described in the first aspect.

[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the data communication method as described in the first aspect.

[0009] In this embodiment, since the transmission loss of different transmission frequencies in the same link is significantly different, the signal strength of the main control chip or the radio frequency chip is compensated according to the transmission loss corresponding to the transmission frequency. This can accurately control the transmission strength, avoid signal transmission and reception interruptions caused by fixed signal strength transmission, and enable the receiving end to receive the signal normally. This improves the signal transmission quality between the main control chip and the radio frequency chip and enhances the reliability of data communication. Attached Figure Description

[0010] Figure 1 This is a schematic diagram illustrating the interaction between the main control chip and the radio frequency chip in related technologies.

[0011] Figure 2 This is a flowchart of a data communication method provided in an embodiment of this application.

[0012] Figure 3 This is a flowchart illustrating the specific steps of a data communication method provided in an embodiment of this application.

[0013] Figure 4 This is a flowchart of a calibration transmission loss provided in an embodiment of this application.

[0014] Figure 5 This is a flowchart illustrating the specific steps of another data communication method provided in this application embodiment.

[0015] Figure 6 This is a schematic diagram of a feedback circuit provided in an embodiment of this application.

[0016] Figure 7This is a flowchart of adjusting the drive gear according to an embodiment of this application.

[0017] Figure 8 This is a block diagram of a data communication device provided in an embodiment of this application.

[0018] Figure 9 This is a block diagram of an electronic device provided in an embodiment of this application.

[0019] Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0021] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0022] Before introducing the data communication method, apparatus, electronic device, and storage medium for terminal equipment provided in this application, the application scenarios involved in the various embodiments of this application will first be described. This application can be applied to data communication devices, data communication systems, electronic devices, etc.

[0023] With the continuous enhancement of smartphone functions and the dramatic increase in users' demand for faster data communication, data communication within mobile phones faces unprecedented challenges. Currently, high-definition video playback, high-speed network connectivity, and rapid transfer of large files have become standard features of smartphones, requiring the digital signal cables within the phone to achieve high-speed and stable data communication.

[0024] From a transmission rate perspective, the previously lower data communication rates can no longer meet the needs of current application scenarios. For example, with the widespread adoption of 5G networks, mobile phones need to process higher bandwidth network data, which has led to the development of high-speed digital signal interfaces to cope with the higher rate requirements. For example, ultra-high-speed digital signal lines are used, with transmission frequencies reaching up to 6~10GHz. High-frequency signals place higher demands on wiring and components.

[0025] Figure 1 This is a schematic diagram illustrating the interaction between the main control chip and the radio frequency chip in related technologies. (See attached image) Figure 1 When receiving signals, mobile phones and other terminals receive wireless signals through their antennas. The RFIC demodulates useful information from the wireless signals and converts it into baseband signals. These baseband signals are then transmitted via high-speed digital signals to the main control chip for processing. Finally, the main control chip sends the processed signals to the phone screen for display, the speaker for sound, etc. The signal transmission path is similar, only the direction is reversed.

[0026] For example, the main control chip can be a system on chip (SOC).

[0027] It should be noted that since both the SOC and RFIC need to transmit and receive signals, the strength of the transmitted signal and the sensitivity of the receiver detection must be within a reasonable range. Otherwise, transmission or reception errors may occur, leading to a decrease in data rate, or even causing the core subsystem responsible for signal modulation and demodulation (Modem) to crash and automatically reset, resulting in dropped calls or even restarts, which seriously affects the user experience.

[0028] In some embodiments, high-speed digital signals are divided into two main groups: SOC transmission and RFIC reception, and RFIC transmission and SOC reception. Each group is further divided into two categories: clock (CLK) and input / output (IO) interfaces. CLK is a periodic pulse signal that provides a unified time reference for the circuit; the IO interface is based on the CLK timing and transmits the corresponding digital signals on the rising / falling edges.

[0029] Each time a signal needs to be sent or received through a cellular network, communication is established between the SOC and the RFIC. The complete communication process includes the SOC triggering the RFIC to wake up, interface initialization, data transmission or signal transmission and reception interaction between the SOC and the RFIC, and the RFIC returning to a low-power state after the communication ends.

[0030] In this embodiment, SOC triggering RFIC wake-up includes the SOC sending a wake-up signal via a request signal line (REQ wake-up signal line). This wake-up signal is used to switch the RFIC from a low-power mode (such as standby or hibernation) to a working mode. After detecting the wake-up signal, the RFIC completes internal power-on and core circuit reset, and then sends a wake-up success signal back to the SOC via the wake-up feedback line (ACK signal line).

[0031] In this embodiment, interface initialization includes waveform calibration, which includes CLK rising / falling edge sampling calibration, low-speed handshake calibration, and low-speed / high-speed standard sequence calibration.

[0032] In some embodiments, CLK calibration is performed by sampling the rising / falling edges of the CLK waveform, primarily to accurately obtain the rising and falling edge times of CLK at different rates, ensuring that data transmission at the rising or falling edge of CLK is synchronous and accurate; otherwise, subsequent data communication will result in errors due to timing deviations.

[0033] In some embodiments, low-speed handshake calibration occurs primarily before data transmission. This step typically involves low-speed signals used by the SOC and RFIC to exchange information before officially starting to send / receive high-speed data. Once the low-speed handshake is successful and both are ready, high-speed data communication begins, triggering the establishment of a high-speed communication channel.

[0034] In some embodiments, low-speed / high-speed standard sequence calibration is used to further ensure data communication is error-free. Before formal data transmission, fixed standard sequences are exchanged between the two parties. The other party compares the received signal with the standard sequence to ensure accurate signal transmission and reception before entering the formal data communication phase. If the received signal differs from the standard sequence, the cellular module will restart and re-initialize, leading to abnormal data communication, such as lag, call interruptions, or even SIM card loss, severely impacting the user experience.

[0035] However, while the amplitude of current digital signals transmitted at different frequencies does not differ significantly, due to their wide operating frequency range, the receiver may fail to receive the signal properly if the performance of the transmitting or receiving end is insufficient. This is because current digital signals operate over a wide frequency range, typically from several hundred megahertz (MHz) to 6-10 GHz. The higher the frequency, the shorter the signal wavelength and the weaker the penetration ability. When the signal is transmitted from the transmitting end to the receiving end through the printed circuit board (PCB) traces, the attenuation varies. For example, with the same 30 mm inner layer trace, the loss at 500 MHz is approximately 0.3 dB, meaning about 6.7% of the signal power is lost, while at 6 GHz the loss is approximately 1.4-1.5 dB, meaning about 27.6%-29.2% of the signal power is lost. Therefore, for the same transmitted signal strength, the difference in signal strength received at the receiving end can exceed 20% due to different transmission frequencies. Thus, taking SOC transmission and RFIC reception as an example, the following problems exist in high-frequency signal transmission.

[0036] 1. The signal output by the SOC (transmitter) needs to be transmitted to the RFIC (receiver) through a physical link. However, the link will inevitably produce path loss. If the loss is too large, the RFIC's reception strength will be lower than the RFIC's detection sensitivity, resulting in detection abnormalities and causing the RFIC to be unable to receive the signal normally.

[0037] 2. If the path loss is too large, the RFIC receiving strength will be lower than the receiving sensitivity. Due to the influence of link noise, the RFIC amplifier will not be able to effectively distinguish between useful signals and noise. During sampling, noise will be misjudged as a signal, resulting in sampling errors. If the loss fluctuates drastically, the receiving strength will frequently jump between meeting and not meeting the standard. The RFIC sampling results will also alternate between correct and incorrect, which will manifest as intermittent signal transmission and reception, i.e., signal transmission and reception will be interrupted.

[0038] 3. The RFIC must complete sampling within the stable window period of the SOC's transmitted signal; otherwise, it will sample data from the wrong location. Fluctuations in path loss indirectly affect signal transmission delay. When loss increases, the signal's rise / fall times are slower and less consistent. If the SOC does not compensate for the delay in time, the RFIC receiver is more prone to deviations when calibrating based on the CLK signal strength, resulting in the sampling of incorrect signal levels and causing synchronization failure. Because the RFIC needs to resynchronize frequently (e.g., recalibrating different CLK frequencies), it cannot receive data normally during synchronization, causing signal transmission and reception interruptions.

[0039] To address the aforementioned problems, this application provides a data communication method, apparatus, electronic device, and storage medium. The data communication method provided by this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0040] Figure 2 This is a flowchart illustrating the steps of a data communication method provided in an embodiment of this application, as follows: Figure 2 As shown, this method is applied to the main control chip in an electronic device. The electronic device includes a main control chip and an RF chip. The main control chip is used to receive signals sent by the RF chip or to send signals to the RF chip. The method may include the following steps.

[0041] Step 101: Obtain the signal transmission frequency.

[0042] In the embodiments of this application, the transmission frequency is the frequency at which the main control chip or the radio frequency chip transmits signals.

[0043] In some embodiments, the main control chip may be a system on chip (SOC).

[0044] In this embodiment, the transmission frequency of the transmitted signal is a fundamental parameter of the communication link, affecting the transmission loss of the signal in the communication link. The higher the transmission frequency, the faster the attenuation and the more sensitive it is to impedance matching.

[0045] In some embodiments, step 101 may include: obtaining the transmission frequency of the signal transmitted by the RF chip during the process of establishing a communication link between the main control chip and the RF chip.

[0046] In some embodiments, the transmission frequency of the main control chip is generated by an internal clock module, and the current output frequency of the main control chip is directly read by accessing the frequency control register.

[0047] In some embodiments, the main control chip and the radio frequency chip are connected through a control interface. This control interface can be a data interface for transmitting low-speed signals; for example, it can be a two-wire serial bus (Inter-Integrated Circuit, I2C) interface, or a Universal Asynchronous Receiver / Transmitter (UART) interface.

[0048] In some embodiments, the main control chip sends the transmission frequency of the transmitted signal to the RF chip via a control interface, so that the RF chip can adjust its receiving local oscillator frequency. This ensures strict alignment of the transmit and receive frequencies, avoids signal mismatch caused by frequency offset, and prevents deviations between the actual transmit frequency of the main control chip and the receive frequency of the RF chip, which could lead to a decrease in the RF chip's receiving sensitivity.

[0049] In some embodiments, the main control chip and the RF chip are connected via a control interface, simultaneously establishing a communication link with a higher signal transmission frequency. The control interface is a low-speed configuration interface, typically with a rate of 10 kilobits per second (kbps) to 10 megabits per second (Mbps), used only for transmitting lightweight data such as configuration commands and status reads, and is not suitable for high-speed service data transmission. The communication link is a high-speed data link, with a rate reaching 100 Mbps to 100 gigabits per second (Gbps), used for transmitting high-speed data such as baseband signals and service data.

[0050] In some embodiments, during the process of establishing a communication link between the main control chip and the radio frequency chip, the transmission frequency of the main control chip's transmission signal is obtained; in other embodiments, during the process of establishing a communication link between the main control chip and the radio frequency chip, the reception strength of the radio frequency chip is obtained through the control interface.

[0051] Step 102: Compensate for the signal strength according to the transmission loss corresponding to the transmission frequency to obtain the target signal strength.

[0052] In this embodiment, since dielectric materials such as PCB substrate and coaxial insulating layer absorb signal energy, the path between the transmitter and receiver will cause energy attenuation, and transmission loss is the energy loss on the transmission path.

[0053] In some embodiments, the main control transmit power is increased by 2dB to obtain the target signal strength. In this way, by adjusting the power of the main control chip's transmitted signal, which interacts with the RF chip, the insufficient performance of the receiver is compensated for.

[0054] In some embodiments, the signal amplitude of the signal transmitted by the main control chip is compensated by a variable gain amplifier (VGA) or a digital attenuator integrated into the main control chip.

[0055] In some embodiments, the above data communication method may further include: compensating for the signal amplitude of the signal transmitted by the radio frequency chip according to the target transmission loss to obtain the target signal strength.

[0056] In one possible implementation, the above data communication method may further include: increasing the power gain of the main control chip according to the target transmission loss to obtain the target signal strength.

[0057] In other embodiments, the coding rate is changed from 64QAM to QPSK. This adjusts the modulation scheme used by the main control chip and the RF chip, reducing the bit error rate through a more robust modulation method.

[0058] Step 103: Data is transmitted with the radio frequency chip based on the target signal strength.

[0059] In some embodiments, the target signal strength is already adapted to the current communication link status. Transmitting data according to the target signal strength can minimize bit errors and packet loss caused by parameter mismatch, while also taking into account transmission efficiency.

[0060] In some embodiments, prior to step 103, the data communication method may further include: performing waveform calibration on the radio frequency chip according to the target signal strength to obtain a waveform calibration result; the waveform calibration is used to synchronize the timing between the main control chip and the radio frequency chip and configure the parameters of the radio frequency chip; step 103 includes: if the waveform calibration result is that the calibration fails, the main control chip transmits data to the radio frequency chip through the communication link according to the target signal strength.

[0061] In summary, in this embodiment, since the transmission loss of different transmission frequencies in the same link varies significantly, the signal strength of the main control chip or the RF chip is compensated according to the transmission loss corresponding to the transmission frequency. This can accurately control the transmission strength, avoid signal transmission and reception interruptions caused by fixed signal strength transmission, and enable the receiving end to receive the signal normally. This improves the signal transmission quality between the main control chip and the RF chip and enhances the reliability of data communication.

[0062] Figure 3 This is a flowchart of a data communication method provided in an embodiment of this application, such as... Figure 3 As shown, the method may include the following steps.

[0063] Step 201: Obtain the signal transmission frequency.

[0064] In the embodiments of this application, the transmission frequency is the frequency at which the main control chip or the radio frequency chip transmits signals.

[0065] The method for this step has been explained in step 101 above, and will not be repeated here.

[0066] Step 202: Send calibration signals of different frequencies via the wake-up request signal line.

[0067] In this embodiment of the application, the main control chip and the radio frequency chip are connected through a preset wake-up request signal line (REQ signal line), which is used to wake up the interaction between the main control chip and the radio frequency chip.

[0068] It should be noted that the trace length of the REQ signal line in the PCB is basically the same as that of the high-speed digital signal line. The REQ signal line is reused to calibrate the transmission loss. By sending signals of different frequencies through the REQ signal line, the receiving end can calculate the attenuation degree of different frequencies after passing through the trace based on the signal strength received at different frequencies. No additional hardware design is required, which reduces hardware costs.

[0069] In some embodiments, a calibration signal of a first amplitude value is sent via a preset wake-up request signal line according to a preset calibration frequency.

[0070] In this embodiment, the calibration signal is used to obtain the transmission loss corresponding to different frequencies.

[0071] Step 203: Based on the difference between the transmitted and received strengths of the calibration signal, obtain the first correspondence between different frequencies and transmission loss.

[0072] In some embodiments, a second amplitude value corresponding to the received strength is obtained by requesting a wake-up signal line; the transmission loss corresponding to the calibration frequency point is determined based on the difference between the first amplitude value and the second amplitude value; and a first correspondence between different frequencies and transmission losses is obtained based on the calibration frequency points of different frequencies and the transmission losses corresponding to the calibration frequency points of different frequencies.

[0073] For example, the first amplitude value can be 1.8 volts (V), 1V, or 0.8V, which can be set according to the model parameters of the main control chip and the RF chip.

[0074] In this embodiment, the second amplitude value is the signal strength when the radio frequency chip receives the calibration signal.

[0075] In one possible implementation, the REQ signal line is used to transmit a low-speed wake-up pulse when waking up the interaction between the main control chip and the RF chip, and to transmit a high-speed sinusoidal signal at a specific frequency when calibrating transmission loss.

[0076] In one possible implementation, the preset calibration frequency point is an appropriate frequency point selected based on the transmission frequency of the high-speed digital signal line, and different chips have fixed frequencies.

[0077] It is understandable that the first amplitude value is the amplitude of the calibration signal transmission, i.e., the output amplitude of the transmitter, and the second amplitude value is the received strength of the RF chip, i.e., the input amplitude of the receiver. In RF communication, transmission loss is equal to the difference between the output amplitude of the transmitter and the input amplitude of the receiver.

[0078] For example, through a preset wake-up request signal line, the main control chip sends a calibration signal with an amplitude of 10dBm to the radio frequency chip. The radio frequency chip feeds back its own received signal strength of 3dBm through the control interface. The difference between the two is 7dB, so the transmission loss of the downlink at this frequency point is 7dB.

[0079] In one possible implementation, the correspondence between frequency points and transmission losses is stored in the main control chip for easy subsequent use.

[0080] In one possible implementation, the same frequency point can be calibrated repeatedly 3 to 5 times to obtain the average loss value, thereby reducing fluctuations caused by transient interference.

[0081] In another embodiment, see Figure 4 Calibrating transmission loss may also include the following steps.

[0082] Step 301: Determine the multiple frequency points to be calibrated.

[0083] Step 302: Send a calibration signal of fixed amplitude via the wake-up request signal line.

[0084] Step 303: Obtain the strength of the received signal by requesting the wake-up signal line.

[0085] Step 304: Calculate the transmission loss corresponding to the current frequency point.

[0086] Step 305: Determine if all frequency point calibrations are complete; if yes, the process ends; otherwise, proceed to step 306.

[0087] Step 306: Select the next frequency.

[0088] The above technical solution establishes a correspondence between frequency points and transmission loss by measuring the amplitude difference between the transmitted and received signals of the multi-frequency calibration signal. This is beneficial for subsequent compensation of signal parameters based on transmission loss. Furthermore, the wake-up request signal line is reused during the calibration process, reducing hardware costs.

[0089] Step 204: Determine the transmission loss corresponding to the transmission frequency based on the transmission frequency and the first correspondence.

[0090] The first correspondence is the relationship between different frequencies and transmission loss.

[0091] In some embodiments, the correspondence between frequency points and transmission loss can be a frequency point-transmission loss lookup table; in other embodiments, the correspondence between frequency points and transmission loss can also be a transmission loss fitting formula, for example, the transmission loss fitting formula is loss = k × frequency point. 2 +b, where k and b are constants obtained from the fitting.

[0092] In some embodiments, the above data communication method may further include: if the environmental parameters of the communication link change, the correspondence between the frequency point and the transmission loss is corrected in real time through the feedback circuit of the radio frequency chip, wherein the environmental parameters include temperature, vibration, etc.

[0093] Step 205: Based on the transmission loss, compensate for the signal amplitude of the signal transmitted by the main control chip or the RF chip to obtain the target signal strength.

[0094] In some embodiments, the signal amplitude of the signal transmitted by the main control chip is compensated by a variable gain amplifier (VGA) or a digital attenuator integrated into the main control chip.

[0095] In some embodiments, the above data communication method may further include: compensating for the signal amplitude of the signal transmitted by the radio frequency chip according to the target transmission loss to obtain the target signal strength.

[0096] In one possible implementation, the above data communication method may further include: increasing the power gain of the main control chip according to the target transmission loss to obtain the target signal strength.

[0097] The above technical solution calculates the target transmission loss corresponding to the transmission frequency based on the transmission frequency of the transmitted signal, and uses the target transmission loss to compensate for the signal amplitude of the transmitted signal. This reduces the high-frequency signal attenuation caused by factors such as long traces, and avoids high-speed data transmission anomalies caused by large high-frequency attenuation.

[0098] Step 206: Based on the target signal strength, perform waveform calibration on the RF chip to obtain the waveform calibration result.

[0099] In this embodiment, waveform calibration is used to synchronize the timing between the main control chip and the RF chip and to configure the parameters of the RF chip.

[0100] In some embodiments, waveform calibration includes LK rising / falling edge sampling calibration, low-speed handshake calibration, and low-speed / high-speed standard sequence calibration.

[0101] Understandably, adjusting signal parameters may cause timing offsets or configuration inconsistencies between the main controller and the RF chip. For example, after the main controller increases the transmit power, the rising edge of the signal may shift due to the response delay of the power amplifier (PA), causing misalignment in the sampling timing of the RF chip. Therefore, after adjusting the signal parameters, waveform calibration of the RF chip is necessary to ensure that the target signal strength does not affect data transmission in the communication link.

[0102] Step 207: If the waveform calibration result is that the calibration failed, a restart command is sent to the cellular module.

[0103] In this embodiment, the restart command is used to re-establish the communication link between the main control chip and the radio frequency chip. That is, if the waveform calibration fails, the communication link between the main control chip and the radio frequency chip is reset.

[0104] Understandably, a failed waveform calibration indicates a serious anomaly in the underlying communication link between the main control chip and the RF chip. Such problems often cannot be resolved by simple parameter readjustment. Re-establishing the communication link resets the state of the main control chip and the RF chip; for example, the main control chip and the RF chip reinitialize their interfaces, synchronize clocks, and load default configurations. The cellular module is the control center of the entire communication system, responsible for coordinating the link management between the main control chip and the RF chip. Therefore, sending a restart command to the cellular module can clear the abnormal states accumulated due to parameter adjustments, effectively resolving underlying link anomalies.

[0105] In some embodiments, before sending a restart command to the cellular module, the above communication method further includes: performing a secondary waveform calibration process; if the secondary waveform calibration still fails, triggering a restart process to reduce unnecessary link interruptions; In some embodiments, before sending a restart command to the cellular module, the communication method further includes: recording the calibration failure reason through the cellular module to facilitate subsequent problem localization. The calibration failure reasons include timing offset exceeding limits, configuration register not responding, etc.

[0106] By using the above technical solution, waveform calibration based on the adjusted working parameters can verify timing synchronization and parameter consistency in real time, ensuring that the adjusted parameters match the state of the communication link. When waveform calibration fails, it usually means that there is an abnormality in the link. By restarting the communication link, it is possible to quickly recover and improve the continuous operation capability of the system.

[0107] Step 208: If the waveform calibration result is that the calibration is passed, data is transmitted to the radio frequency chip through the communication link according to the target signal strength.

[0108] In some embodiments, taking the radio frequency chip transmitting a signal and the main control signal receiving a signal as an example, the above data communication method may further include: obtaining the transmission frequency of the signal transmitted by the radio frequency chip through a control interface; obtaining the correspondence between the frequency point and the transmission loss; determining the target transmission loss corresponding to the transmission frequency based on the transmission frequency and the correspondence; compensating the signal amplitude of the signal transmitted by the radio frequency chip based on the target transmission loss to obtain the target signal strength; sending the target signal strength to the radio frequency chip through the control interface; performing waveform calibration on the radio frequency chip based on the target signal strength to obtain the waveform calibration result; sending a restart command to the cellular module if the waveform calibration result is that the calibration failed; and transmitting data to the radio frequency chip through the communication link based on the target signal strength if the waveform calibration result is that the calibration passed.

[0109] In summary, in this embodiment of the application, by actively compensating for the amplitude of the transmitted signal to offset the transmission loss of the communication link, the signal amplitude at the receiver of the RF chip is kept stable within a reasonable range, ensuring that the RF chip can normally receive the signal sent by the main control chip, and significantly reducing the bit error rate caused by frequency loss differences.

[0110] Figure 5 This is a flowchart illustrating the specific steps of another data communication method provided in this application embodiment. See also... Figure 5 The method may include the following steps.

[0111] Step 401: When the main control chip sends a signal to the radio frequency chip, the transmission strength of the main control chip or the reception strength of the radio frequency chip is obtained through the feedback circuit.

[0112] In this embodiment, the received signal strength is detected by the feedback circuit integrated into the radio frequency chip.

[0113] In one possible implementation, the feedback circuit can be a Received Signal Strength Indication (RSSI) detector or a power detector.

[0114] In some embodiments, see Figure 6 Both the main control chip and the RF chip have integrated feedback circuits. When the main control chip sends a signal to the RF chip, the feedback circuit integrated in the main control chip is used to detect the signal transmission strength, and the feedback circuit integrated in the RF chip is used to detect the reception strength.

[0115] In this embodiment, the received signal strength characterizes the actual signal power received by the RF chip after the main control chip's transmit power has been reduced by link loss.

[0116] It is understandable that in radio frequency communication, factors such as increased link loss, longer distance, and increased interference can all lead to a weaker received signal. If the power is not adjusted at this time, it may lead to an increase in the bit error rate or even communication interruption.

[0117] Step 402: Obtain the detection intensity threshold corresponding to the current drive level when the RF chip receives the signal.

[0118] In this embodiment, the RF chip has multiple drive levels, each with a corresponding detection intensity threshold. When the received signal strength exceeds the detection intensity threshold, it indicates that the signal can be detected by the RF chip. The detection intensity threshold for each level is obtained by testing the actual detection capability distribution of each level at the receivers of multiple devices. Setting appropriate values ​​ensures coverage of all devices, despite the influence of line loss and device differences.

[0119] In one possible implementation, the current drive level of the RF chip when receiving a signal is the current drive level of the received signal, and the current drive level is stored in the status register inside the RF chip; the current drive level of the RF signal is positively correlated with the power of the received signal of the RF chip.

[0120] In one possible implementation, the main control chip reads the status register value of the RF chip through the control interface to obtain the current drive level of the RF chip. Based on the current drive level and a second correspondence, the detection intensity threshold corresponding to the current drive level is determined; the second correspondence is the relationship between each drive level of the RF chip and the detection intensity threshold.

[0121] By using the above technical solution, the feedback circuit is added to obtain the received strength of the RF chip. Combined with the detection strength threshold corresponding to the current drive level, it is beneficial to make precise adjustments to the signal parameters based on the received strength and the current drive level, thereby improving the adaptability of the adjusted signal parameters to the communication link.

[0122] Step 403: When the main control chip receives the signal sent by the RF chip, the receiving strength of the main control chip or the transmitting strength of the RF chip is obtained through the feedback circuit.

[0123] In some embodiments, see Figure 6 Both the main control chip and the RF chip have integrated feedback circuits. When the main control chip receives the signal sent by the RF chip, the feedback circuit integrated in the main control chip is used to detect the received strength, and the feedback circuit integrated in the RF chip is used to detect the transmitted strength.

[0124] In some embodiments, when the main control chip receives a signal sent by the radio frequency chip, the feedback circuit integrated in the main control chip is used to detect the received strength, and the feedback circuit integrated in the radio frequency chip is used to detect the transmitted strength.

[0125] Step 404: Obtain the detection intensity threshold corresponding to the current drive level when the main control chip receives the signal.

[0126] In this embodiment, the main control chip has multiple drive levels, each with a corresponding detection intensity threshold. When the received signal strength exceeds the detection intensity threshold, it indicates that the signal can be detected by the main control chip. The detection intensity threshold for each level is obtained by testing the actual detection capability distribution of each level at the receivers of multiple devices. Setting appropriate values ​​ensures coverage of all devices, despite the influence of line loss and device differences.

[0127] In some embodiments, the current drive level when the main control chip receives a signal is positively correlated with the power of the signal transmitted by the main control chip.

[0128] In one possible implementation, the current drive level of the received signal of the main controller is controlled by an internal status register. The current drive level can be obtained by reading the status register value of the main controller chip through a local interface. The detection intensity threshold corresponding to the current drive level is determined according to the current drive level and a third correspondence. The third correspondence is the correspondence between each drive level of the main controller chip and the detection intensity threshold.

[0129] Step 405: Based on the received strength and the detection strength threshold, compensate the transmitted strength or received strength to obtain the target signal strength.

[0130] It should be noted that before step 405, the data communication method can execute steps 401 to 402, and the data communication method can also execute steps 403 to 404.

[0131] In some embodiments, when the received signal strength is insufficient, the drive level of the transmitting signal of the main control signal is adjusted to improve the output of the transmitting end, or the drive level of the receiving signal of the RF chip is adjusted to improve the amplification capability of the receiving end.

[0132] For example, the main control chip can directly modify the drive level of its own transmitted signal through internal registers; and / or, the main control chip can send instructions to the RF chip through the control interface to modify the configuration register of the drive level of the device chip's received signal.

[0133] In one possible implementation, the RF receiver gain is increased first to avoid interference caused by excessive transmit power; if the receiver gain has reached its limit, the transmit gain is then increased.

[0134] In one possible implementation, based on the current drive level of the main control chip and the current drive level of the RF chip, the chip with the larger gain margin is determined; the chip with the larger adjustment margin is adjusted first.

[0135] For example, if the gain margin of the received signal of the RF chip is 10dB and the gain margin of the transmitted signal of the main control chip is 5dB, then the current drive level of the RF chip is adjusted first, and then the current drive level of the main control chip is adjusted to minimize power consumption while ensuring that the received signal strength meets the standard.

[0136] By using the above technical solution, the detection intensity threshold is determined based on the current drive level of the RF chip's received signal, which enables the real-time receiving capability matching of the RF chip. Adjustment is only triggered when the received intensity is lower than the stable receiving limit of the current drive level, thus improving the accuracy of the adjusted signal parameters. At the same time, dynamically adjusting the drive levels of the RF chip's received signal and the main control chip's transmitted signal helps improve the signal transmission quality under different device and wiring conditions, ensuring the transmission efficiency of the communication link.

[0137] In some embodiments, step 405 includes sub-steps 4051 to 4053.

[0138] Sub-step 4051: When the received strength is less than the detection strength threshold and the transmitted strength is less than the preset upper limit of the transmitted strength, the transmitted strength is compensated to obtain the target signal strength. Sub-step 4052: When the received strength is less than the detection strength threshold and the transmitted strength is equal to the upper limit of the transmitted strength, the received strength is compensated to obtain the target signal strength. Sub-step 4053: When the transmission strength is equal to the upper limit of the transmission strength and the reception strength is equal to the upper limit of the reception strength, the upper limit of the transmission strength and the upper limit of the reception strength are used as the target signal strength.

[0139] In one possible implementation, when the main control chip sends a signal to the RF chip, compensating for the transmission strength to obtain the target signal strength includes limiting the maximum gain of the transmitted signal by the upper limit of the main control chip's strength. Correspondingly, compensating for the reception strength to obtain the target signal strength includes limiting the maximum gain of the received signal by the upper limit of the RF chip's strength. This avoids excessively high transmit gain leading to PA saturation, or excessively high receive gain leading to noise introduction, thus preventing over-adjustment.

[0140] In one possible implementation, when the main control chip sends a signal to the RF chip, a first power gain value of the signal sent by the main control chip is determined. Based on the difference between the first power gain and a preset gain threshold, amplitude compensation is performed on the signal sent by the main control chip to obtain the target signal strength. The preset gain threshold can be the detection intensity threshold corresponding to the current drive level of the main control chip.

[0141] In one possible implementation, when the main control chip sends a signal to the RF chip, a second power gain value of the signal sent by the RF chip is determined. Based on the difference between the second power gain and the detection intensity threshold, amplitude compensation is performed on the received signal of the RF chip to obtain the target signal strength.

[0142] In another possible implementation, when the main control chip sends a signal to the RF chip, it controls the RF chip to adjust the second power gain to a preset second gain value to obtain the target signal strength. For example, the preset second gain value is 90% of the RF chip's gain limit, reserving a safety margin to avoid problems such as increased noise due to an excessively high preset value or failure to meet the target due to an excessively low preset value.

[0143] It is understandable that when the main control chip receives the signal sent by the RF chip, the method of compensating for the received signal strength to obtain the target signal strength is similar to that of the main control chip sending the signal to the RF chip, and will not be elaborated here.

[0144] In one possible implementation, when both the main control chip and the RF chip reach their gain limits, and the received strength is less than the detection strength threshold, the main control chip outputs a warning signal indicating that the transmission link loss has exceeded the limit.

[0145] In other embodiments, see Figure 7 When the main control chip sends a signal to the radio frequency chip, the compensation for the transmission strength or reception strength to obtain the target signal strength may also include the following steps.

[0146] Step 501: Obtain the received signal strength.

[0147] Step 502: Determine whether the received strength is greater than or equal to the detection strength threshold. If yes, return to step 501; otherwise, proceed to step 503.

[0148] Step 503: Determine whether the second drive level is less than the power limit of the main control chip. If yes, proceed to step 505; otherwise, proceed to step 504.

[0149] In this embodiment of the application, the second drive gear is the current drive gear for which the main control chip sends signals.

[0150] Step 504: Increase the second drive level of the main control chip.

[0151] Step 505: Determine whether the first drive level is less than the power limit of the RF chip. If yes, proceed to step 507; otherwise, proceed to step 506.

[0152] Step 506: Increase the first drive level of the main control chip.

[0153] In this embodiment of the application, the first drive level is the current drive level of the signal received by the radio frequency chip.

[0154] Step 507: Set the main control chip and RF chip to the power limit.

[0155] By using the above technical solution, the maximum gain of the transmitted signal is limited by the upper limit of the transmit strength, and the maximum gain of the received signal is limited by the upper limit of the receive strength. This avoids PA saturation caused by excessive transmit gain or noise introduced by excessive receive gain, thus avoiding over-adjustment. Furthermore, the transmit strength is compensated first, and the gain resources on the receive signal side are utilized only after the upper limit of transmit strength is reached. The adjustment method with faster response speed is preferred, which can quickly improve the basic signal strength and reduce unnecessary communication overhead.

[0156] Step 405: Based on the target signal strength, perform waveform calibration on the RF chip to obtain the waveform calibration result.

[0157] In this embodiment, waveform calibration is used to synchronize the timing between the main control chip and the RF chip and to configure the parameters of the RF chip.

[0158] In some embodiments, waveform calibration includes LK rising / falling edge sampling calibration, low-speed handshake calibration, and low-speed / high-speed standard sequence calibration.

[0159] Understandably, adjusting signal parameters may cause timing offsets or configuration inconsistencies between the main controller and the RF chip. For example, after the main controller increases the transmit power, the rising edge of the signal may shift due to the response delay of the power amplifier (PA), causing misalignment in the sampling timing of the RF chip. Therefore, after adjusting the signal parameters, waveform calibration of the RF chip is necessary to ensure that the adjusted signal parameters do not affect data transmission in the communication link.

[0160] Step 406: If the waveform calibration result is that the calibration failed, a restart command is sent to the cellular module. The restart command is used to re-establish the communication link between the main control chip and the radio frequency chip.

[0161] In this embodiment, the restart command is used to re-establish the communication link between the main control chip and the radio frequency chip. That is, if the waveform calibration fails, the communication link between the main control chip and the radio frequency chip is reset.

[0162] Understandably, a failed waveform calibration indicates a serious anomaly in the underlying communication link between the main control chip and the RF chip. Such problems often cannot be resolved by simple parameter readjustment. Re-establishing the communication link resets the state of the main control chip and the RF chip; for example, the main control chip and the RF chip reinitialize their interfaces, synchronize clocks, and load default configurations. The cellular module is the control center of the entire communication system, responsible for coordinating the link management between the main control chip and the RF chip. Therefore, sending a restart command to the cellular module can clear the abnormal states accumulated due to parameter adjustments, effectively resolving underlying link anomalies.

[0163] In some embodiments, before sending a restart command to the cellular module, the above communication method further includes: performing a secondary waveform calibration process; if the secondary waveform calibration still fails, triggering a restart process to reduce unnecessary link interruptions; In some embodiments, before sending a restart command to the cellular module, the communication method further includes: recording the calibration failure reason through the cellular module to facilitate subsequent problem localization. The calibration failure reasons include timing offset exceeding limits, configuration register not responding, etc.

[0164] By using the above technical solution, waveform calibration based on the adjusted working parameters can verify timing synchronization and parameter consistency in real time, ensuring that the adjusted parameters match the state of the communication link. When waveform calibration fails, it usually means that there is an abnormality in the link. By restarting the communication link, it is possible to quickly recover and improve the continuous operation capability of the system.

[0165] Step 407: If the waveform calibration result is that the calibration failed, data is transmitted to the radio frequency chip through the communication link according to the adjusted signal parameters.

[0166] In some embodiments, taking the radio frequency chip transmitting signals and the main control chip receiving signals as an example, the above data communication method may further include: obtaining the received strength of the main control chip through the feedback circuit integrated in the main control chip; obtaining the first drive level of the radio frequency chip and the second drive level of the main control chip through the control interface; determining the received strength threshold associated with the second drive level of the main control chip; and adjusting the first drive level and the second drive level to obtain the target signal strength when the received strength of the main control chip is less than the received strength threshold.

[0167] In summary, in this embodiment, by adding a feedback circuit, the receiving strength of the main control chip and the RF chip is detected in real time. Based on the driving level of the main control chip and the RF chip, the transmitter gain and the receiver driving strength are dynamically adjusted. This ensures the signal transmission quality for different devices and different wiring conditions, thereby improving the transmission efficiency of the communication link.

[0168] The data communication method provided in this application can be executed by a data communication system or an electronic device. This application uses a data communication device executing the data communication method as an example to illustrate the data communication device provided in this application.

[0169] Figure 8 This is a block diagram of a data communication device provided in an embodiment of this application, such as... Figure 8 As shown, this data communication device is used in the main control chip of an electronic device. The electronic device includes a main control chip and a radio frequency chip. The main control chip is used to receive signals sent by the radio frequency chip or to send signals to the radio frequency chip. The data communication module 600 includes: The acquisition module 601 is used to acquire the transmission frequency of the signal; the transmission frequency is the frequency at which the main control chip or the radio frequency chip transmits the signal. The compensation module 602 is used to compensate the signal strength of the signal according to the transmission loss corresponding to the transmission frequency, so as to obtain the target signal strength; The transmission module 603 is used to transmit data with the radio frequency chip according to the target signal strength.

[0170] Optionally, the compensation module 602 includes: The compensation determination submodule is used to determine the transmission loss corresponding to the transmission frequency based on the transmission frequency and the first correspondence relationship; the first correspondence relationship is the correspondence between different frequencies and transmission losses. The amplitude compensation submodule is used to compensate for the signal amplitude of the signal sent by the main control chip or RF chip based on the transmission loss, so as to obtain the target signal strength.

[0171] Optionally, the main control chip and the radio frequency chip are connected via a preset wake-up request signal line, which is used to wake up the interaction between the main control chip and the radio frequency chip; the data communication module 600 mentioned above also includes: The loss calibration module is used to send calibration signals of different frequencies via a wake-up request signal line; the calibration signals are used to obtain the transmission loss corresponding to different frequencies. The loss determination module is used to obtain the first correspondence between different frequencies and transmission loss based on the difference between the transmitted and received strengths of the calibration signal.

[0172] Optionally, both the main control chip and the RF chip integrate feedback circuits, and the aforementioned data communication module 600 also includes: The first strength acquisition module is used to acquire the transmission strength of the main control chip or the reception strength of the RF chip through a feedback circuit when the main control chip sends a signal to the RF chip. The first threshold determination module is used to obtain the detection intensity threshold corresponding to the current drive level when the radio frequency chip receives the signal. The first strength compensation module is used to compensate the transmission strength or reception strength according to the received strength and the detection strength threshold to obtain the target signal strength.

[0173] Optionally, both the main control chip and the RF chip integrate feedback circuits, and the method also includes: The second strength acquisition module is used to acquire the received strength of the main control chip or the transmitted strength of the radio frequency chip through a feedback circuit when the main control chip receives the signal sent by the radio frequency chip. The second threshold determination module is used to obtain the detection intensity threshold corresponding to the current drive level when the main control chip receives the signal. The second strength compensation module is used to compensate the transmission strength or reception strength according to the received strength and the detection strength threshold to obtain the target signal strength.

[0174] Optionally, the first strength compensation module or the second strength compensation module includes: The transmission strength compensation submodule is used to compensate the transmission strength to obtain the target signal strength when the received strength is less than the detection strength threshold and the transmission strength is less than the preset transmission strength upper limit. The receive strength compensation submodule is used to compensate the receive strength to obtain the target signal strength when the received strength is less than the detection strength threshold and the transmitted strength is equal to the upper limit of the transmitted strength. The strength determination submodule is used to determine the target signal strength when the transmit strength is equal to the transmit strength limit and the receive strength is equal to the receive strength limit.

[0175] Optionally, the data communication module 600 mentioned above also includes: The waveform calibration module is used to calibrate the RF chip based on the adjusted signal parameters and obtain the waveform calibration result; waveform calibration is used to synchronize the timing between the main control chip and the RF chip and to configure the parameters of the RF chip. The communication restart module is used to send a restart command to the cellular module when the waveform calibration result is that the calibration failed. The restart command is used to re-establish the communication link between the main control chip and the radio frequency chip.

[0176] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0177] Optionally, such as Figure 9 As shown, this application embodiment also provides an electronic device 00, including a processor 701 and a memory 702. The memory 702 stores a program or instructions that can run on the processor 701. When the program or instructions are executed by the processor 701, they implement the various steps of the above-described data communication method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0178] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0179] Figure 10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0180] The electronic device 800 includes, but is not limited to, components such as: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 808, interface unit 808, memory 809, and processor 810.

[0181] Those skilled in the art will understand that the electronic device 800 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 810 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0182] The processor 810 is used to implement the above-mentioned data communication method.

[0183] It should be understood that, in this embodiment, the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042. The GPU 8041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 806 may include a display panel 8061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0184] The memory 809 can be used to store software programs and various data. The memory 809 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs, or instructions required for functions (such as sound playback functions, image playback functions, etc.). Furthermore, the memory 809 may include volatile memory or non-volatile memory, or it may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM). The memory 809 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0185] Processor 810 may include one or more processing units; optionally, processor 810 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 810.

[0186] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described data communication method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0187] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0188] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described data communication method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0189] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0190] This application provides a computer program product, which is stored in a storage medium and executed by a processor to implement the various processes of the data communication method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0191] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0192] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0193] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for data communication, characterized in that, A main control chip used in an electronic device, the electronic device including the main control chip and an radio frequency chip, the main control chip being used to receive signals sent by the radio frequency chip or to send signals to the radio frequency chip, the method including: The transmission frequency of the signal is obtained; the transmission frequency is the frequency at which the main control chip or the radio frequency chip transmits the signal. The signal strength is compensated for based on the transmission loss corresponding to the transmission frequency to obtain the target signal strength; Data is transmitted with the radio frequency chip based on the target signal strength.

2. The method according to claim 1, characterized in that, The step of compensating the signal strength of the signal according to the transmission loss corresponding to the transmission frequency to obtain the target signal strength includes: Based on the transmission frequency and the first correspondence, the transmission loss corresponding to the transmission frequency is determined; the first correspondence is the correspondence between different frequencies and transmission losses. Based on the transmission loss, the signal amplitude of the signal transmitted by the main control chip or the radio frequency chip is compensated to obtain the target signal strength.

3. The method according to claim 2, characterized in that, The main control chip and the radio frequency chip are connected via a preset wake-up request signal line, which is used to wake up the interaction between the main control chip and the radio frequency chip. Before compensating the signal strength of the signal according to the transmission loss corresponding to the transmission frequency or the reception frequency to obtain the target signal strength, the method further includes: The request wake-up signal line sends calibration signals of different frequencies; the calibration signals are used to obtain the transmission loss corresponding to different frequencies. Based on the difference between the transmitted and received strengths of the calibration signal, a first correspondence between the different frequencies and the transmission loss is obtained.

4. The method according to claim 1, characterized in that, Both the main control chip and the radio frequency chip integrate feedback circuits, and the method further includes: When the main control chip sends a signal to the radio frequency chip, the transmission strength of the main control chip or the reception strength of the radio frequency chip is obtained through the feedback circuit. When acquiring the received signal from the radio frequency chip, the detection intensity threshold corresponding to the current drive level; The target signal strength is obtained by compensating the transmission strength or the reception strength based on the received strength and the detection strength threshold.

5. The method according to claim 1, characterized in that, Both the main control chip and the radio frequency chip integrate feedback circuits, and the method further includes: When the main control chip receives the signal sent by the radio frequency chip, the feedback circuit obtains the reception strength of the main control chip or the transmission strength of the radio frequency chip. When the main control chip receives the signal, the detection intensity threshold corresponding to the current drive level is obtained; The target signal strength is obtained by compensating the transmission strength or the reception strength based on the received strength and the detection strength threshold.

6. The method according to claim 4 or 5, characterized in that, The step of compensating the transmission strength or the reception strength based on the received strength and the detection strength threshold to obtain the target signal strength includes: When the received strength is less than the detection strength threshold and the transmitted strength is less than the preset transmitted strength upper limit, the transmitted strength is compensated to obtain the target signal strength; When the received strength is less than the detection strength threshold and the transmitted strength is equal to the upper limit of the transmitted strength, the received strength is compensated to obtain the target signal strength; When the transmission strength is equal to the upper limit of the transmission strength and the reception strength is equal to the upper limit of the reception strength, the upper limit of the transmission strength and the upper limit of the reception strength are taken as the target signal strength.

7. The method according to claim 1, characterized in that, Before transmitting data to the radio frequency chip based on the target signal strength, the method includes: Based on the target signal strength, the radio frequency chip is calibrated to obtain a waveform calibration result; the waveform calibration is used to synchronize the timing between the main control chip and the radio frequency chip and to configure the parameters of the radio frequency chip. If the waveform calibration result is that the calibration failed, a restart command is sent to the cellular module. The restart command is used to re-establish the communication link between the main control chip and the radio frequency chip.

8. A data communication device, characterized in that, A main control chip used in an electronic device, the electronic device including the main control chip and an radio frequency chip, the main control chip being used to receive signals sent by the radio frequency chip or to send signals to the radio frequency chip, the device comprising: An acquisition module is used to acquire the transmission frequency of a signal; the transmission frequency is the frequency at which the main control chip or the radio frequency chip transmits signals. The compensation module is used to compensate the signal strength of the signal according to the transmission loss corresponding to the transmission frequency, so as to obtain the target signal strength; The transmission module is used to transmit data with the radio frequency chip according to the target signal strength.

9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the data communication method as described in any one of claims 1-7.

10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the data communication method as described in any one of claims 1-7.