Vehicle terminal data transmission control method, device and equipment and readable storage medium
By determining the external clock stability by acquiring the energy release time of the phase-locked loop crystal oscillation and switching to the internal clock before initialization, the problem of MCU crash caused by phase-locked loop frequency multiplication is solved, and the stability and reliability of data transmission are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2026-03-27
AI Technical Summary
Existing phase-locked loop (PLL) technology can cause program crashes, MCU shutdowns, and data transmission interruptions when multiplying the frequency of automotive MCU chips with inconsistent temperature resistance.
By obtaining the real-time release time of the phase-locked loop crystal oscillation energy, it is determined whether the external clock is stable. If it is stable, the data transmission is switched to the external clock; otherwise, the waiting time is extended. Before initialization, the clock source of the boot program and application program is switched to the internal low-frequency clock, and then switched to the external clock after the phase-locked loop stabilizes.
This avoids system crashes caused by frequency mismatch, improves data transmission stability, and ensures the normal operation of the vehicle MCU.
Smart Images

Figure CN115473526B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of phase-locked loop frequency multiplication technology, and particularly relates to a vehicle terminal data transmission control method, device and equipment and a readable storage medium. BACKGROUND
[0002] The crystal oscillator provides a clock signal required by the vehicle MCU (Micro Controller Unit) when executing a command, and the nominal frequency of the crystal oscillator is used to specifically describe the periodic output frequency. The nominal frequency of the crystal oscillator is related to the thickness, area and cutting method of the quartz wafer, and the thinner the wafer, the higher the nominal frequency. However, due to the limitations of the production process, the wafer cannot be infinitely thin, otherwise there will be a risk of breakage. Therefore, if the vehicle MCU needs higher and more stable frequency signals, the nominal frequency of the crystal oscillator is usually multiplied by a phase-locked loop (PLL). The phase-locked loop is used to unify the clock signal to enable high-frequency devices to work normally, such as accessing data of the memory, so that a stable and high-frequency clock signal can be achieved by using the phase-locked loop.
[0003] In related technologies, when the phase-locked loop technology is used to multiply the frequency of the MCU chip of the vehicle device, the external clock is usually switched first, then the frequency is overclocked to a high frequency, and then gradually stabilized to a set value, thereby achieving the purpose of multiplying the clock of the vehicle MCU. The premise of this technology is that the temperature resistance of all vehicle MCU chips is consistent, that is, it is a technology application in an ideal case. However, different vehicle MCU chips often use different manufacturing processes, and different manufacturing processes will cause different temperature resistance ranges of the vehicle MCU chip, and different temperature resistance will cause different limit frequencies of the internal clock of the chip; therefore, if the existing phase-locked loop technology is used for frequency multiplication, once the limit frequency of the internal clock exceeds the limit of the chip, the program will run away, the MCU will be down, and the device will stop working, thereby directly affecting the network function of the whole vehicle, causing vehicle disconnection and data transmission interruption and other faults. SUMMARY
[0004] The present application provides a vehicle terminal data transmission control method, device, equipment and readable storage medium to solve the problem of down caused by using traditional phase-locked loop technology to multiply the frequency of vehicle MCU chips with inconsistent temperature resistance, thereby causing data transmission interruption and other faults.
[0005] In a first aspect, a vehicle terminal data transmission control method is provided, comprising the following steps:
[0006] When it is detected that the phase-locked loop is in the initialization stage, the real-time release duration of the phase-locked loop crystal oscillation energy is obtained;
[0007] determine whether the external clock is in a stable state according to the real-time release duration of the crystal oscillation energy and a preset energy release duration;
[0008] if the external clock is in the stable state, switch a clock signal of an application program in the vehicle-mounted MCU to the external clock, so that the application program performs data transmission based on the external clock;
[0009] if the external clock is in the unstable state, perform the step of acquiring the real-time release duration of the crystal oscillation energy of the phase-locked loop.
[0010] In some embodiments, before the step of detecting that the phase-locked loop is in an initialization stage, the method further comprises:
[0011] after the vehicle-mounted MCU is powered on, switching a clock signal of a boot program to an internal clock and switching a clock signal of the application program to the internal clock;
[0012] performing an initialization process on the phase-locked loop.
[0013] In some embodiments, after the step of determining that the external clock is in the stable state, the method further comprises:
[0014] switching the clock signal of the boot program to the external clock, so that the boot program performs data transmission based on the external clock.
[0015] In some embodiments, the step of determining whether the external clock is in the stable state according to the real-time release duration of the crystal oscillation energy and the preset energy release duration comprises:
[0016] if the real-time release duration of the crystal oscillation energy is greater than or equal to the preset energy release duration, determining that the external clock is in the stable state;
[0017] if the real-time release duration of the crystal oscillation energy is less than the preset energy release duration, determining that the external clock is in the unstable state.
[0018] In some embodiments, the preset energy release duration is determined according to a relationship between a limit working frequency and a temperature of the vehicle-mounted MCU chip.
[0019] In a second aspect, a vehicle-mounted terminal data transmission control device is provided, comprising:
[0020] an acquisition unit configured to, when it is detected that a phase-locked loop is in an initialization stage, acquire a real-time release duration of crystal oscillation energy of the phase-locked loop;
[0021] a determination unit configured to determine whether an external clock is in a stable state according to the real-time release duration of the crystal oscillation energy and a preset energy release duration;
[0022] The switching unit is configured to switch the clock signal of the application program in the vehicle-mounted MCU to the external clock for data transmission of the application program based on the external clock if the external clock is in a stable state, and to enable the acquisition unit to perform the step of acquiring the real-time release duration of the phase-locked loop crystal oscillation energy if the external clock is in an unstable state.
[0023] In some embodiments, the apparatus further comprises an initialization unit.
[0024] The switching unit is further configured to switch the clock signal of the boot program to the internal clock and switch the clock signal of the application program to the internal clock after the vehicle-mounted MCU is powered on.
[0025] The initialization unit is configured to perform initialization processing on the phase-locked loop.
[0026] In some embodiments, the switching unit is further configured to:
[0027] The switching unit is further configured to switch the clock signal of the boot program to the external clock for data transmission of the boot program based on the external clock when the external clock is in a stable state.
[0028] In a third aspect, a vehicle-mounted terminal data transmission control device is provided, comprising a memory and a processor, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the vehicle-mounted terminal data transmission control method described above.
[0029] In a fourth aspect, a computer-readable storage medium is provided, the computer storage medium storing a computer program, when the computer program is executed by a processor, to implement the vehicle-mounted terminal data transmission control method described above.
[0030] The application provides a vehicle terminal data transmission control method, device, equipment and readable storage medium, comprising: when it is detected that a phase-locked loop is in an initialization stage, acquiring a real-time release time length of a crystal oscillation energy of the phase-locked loop; judging whether an external clock is in a stable state according to the real-time release time length of the crystal oscillation energy and a preset energy release time length; if the external clock is in the stable state, switching a clock signal of an application program in a vehicle MCU to the external clock, so that the application program performs data transmission based on the external clock; and if the external clock is in an unstable state, performing the step of acquiring the real-time release time length of the crystal oscillation energy of the phase-locked loop. When frequency multiplication is performed by using the phase-locked loop, the waiting time of the crystal oscillation energy release of the phase-locked loop is increased, so that the crystal oscillation energy of the phase-locked loop can be fully released, to avoid peak impact caused by energy superposition, and thus the clock frequency of the vehicle MCU chip is ensured to be not higher than the allowed frequency and the external clock is in the stable state, so that the problems of program runaway and MCU downtime are avoided, and after the external clock is in the stable state, the clock signal of the application program is switched to the external clock for data transmission, so that the death caused by frequency mismatch is avoided, and thus the stability of data transmission is effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.
[0032] Figure 1 A flowchart of a vehicle terminal data transmission control method provided by the embodiment of the present application;
[0033] Figure 2 A structural diagram of a vehicle terminal data transmission control device provided by the embodiment of the present application;
[0034] Figure 3 A structural diagram of a vehicle terminal data transmission control device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort are within the scope of protection of the present application.
[0036] The embodiment of the present application provides a vehicle terminal data transmission control method, device and equipment and readable storage medium, which can solve the problem of downtime caused by the traditional phase-locked loop technology in related technologies, and further cause the data transmission interruption and other faults.
[0037] To solve the above problems, the general idea of the present application is as follows:
[0038] A vehicle terminal data transmission control method comprises the following steps:
[0039] Step S10: When it is detected that the phase-locked loop is in the initialization stage, the real-time release time length of the crystal oscillation energy of the phase-locked loop is acquired.
[0040] Step S20: Whether the external clock is in a stable state is determined according to the real-time release time length of the crystal oscillation energy and the preset energy release time length.
[0041] Step S30: If the external clock is in a stable state, the clock signal of an application program in the vehicle MCU is switched to the external clock, so that the application program performs data transmission based on the external clock.
[0042] Step S40: If the external clock is in an unstable state, the step of acquiring the real-time release time length of the crystal oscillation energy of the phase-locked loop is executed.
[0043] Referring to Figure 1 The embodiment of the present application provides a vehicle terminal data transmission control method, which comprises the following steps:
[0044] Step S10: When it is detected that the phase-locked loop is in the initialization stage, the real-time release time length of the crystal oscillation energy of the phase-locked loop is acquired.
[0045] Exemplarily, the working temperature of MCU chips of different levels usually has a reasonable range, for example, the working temperature range of civil-level chips is generally 0-70 DEG C, the working temperature range of industrial-level chips is generally -40-85 DEG C, and the working temperature range of military-level chips is generally -55-128 DEG C. Among them, the temperature rise will affect the speed and performance of the MCU chip. For millions or even tens of millions of transistors contained in the MCU, with the temperature rise, the response speed of opening and closing of the internal transistors is exponentially decreased, because the temperature has a relatively significant negative correlation with the conductivity, the limit voltage, the limit current and the switching characteristics of the semiconductor. With the temperature rising by 10 DEG C, ICQ (i.e. collector current) will be doubled, thereby causing the working point of the transistor amplifier to drift, the transistor current amplification factor to change, the characteristic curve to change and the dynamic range to be small, so that the circuit delay is increased.
[0046] And because the limit working frequency of MCU chip decreases with the increase of temperature, the MCU chip cannot meet the clock timing requirements. Especially when using phase-locked loop for overclocking, if not properly used, the limit working frequency of MCU chip itself will decrease due to the increase of temperature, and then cause the phenomenon of death. Therefore, when the phase-locked loop is initialized, the crystal oscillation peak value is not completely released, and is still at a high frequency. If the external clock is switched too early, there is a possibility that the limit frequency that the device can withstand at high temperature has decreased below the current clock frequency, thereby causing death.
[0047] And the embodiment fully considers that the temperature resistance performance of MCU chips is inconsistent, that is, the degree of decrease of the limit frequency of different MCU chips with the increase of temperature is different, and proposes an energy release protection mechanism. Specifically, appropriate energy release time of crystal oscillation is given, that is, the waiting time of phase-locked loop crystal oscillation energy release is increased to match the limit working frequency of MCU chip. Therefore, when the phase-locked loop is detected to be in the initialization stage, the real-time release time length of the phase-locked loop crystal oscillation energy will be obtained, which can be used to judge whether the external clock is in a stable state, so that the clock frequency of the MCU chip will not exceed the maximum allowed frequency.
[0048] Step S20: determining whether the external clock is in a stable state according to the real-time release time length of the crystal oscillation energy and the preset energy release time length; wherein the preset energy release time length is determined according to the relationship between the limit working frequency of the vehicle-mounted MCU chip and the temperature.
[0049] For example, in the embodiment, the preset energy release time length is the waiting time of the phase-locked loop crystal oscillation energy release; because the temperature variation curves of MCU chips provided by different manufacturers are different, the preset energy release time length corresponding to each vehicle-mounted MCU chip can be determined by testing and according to the relationship between the limit working frequency of the vehicle-mounted MCU chip and the temperature presented on the corresponding temperature variation curve of the vehicle-mounted MCU chip.
[0050] According to the size relationship between the real-time release time length of the crystal oscillation energy and the preset energy release time length, whether the external clock is in a stable state, that is, whether the clock frequency of the vehicle-mounted MCU chip exceeds the maximum allowed frequency, is determined.
[0051] Further, the determination of whether the external clock is in a stable state according to the real-time release time length of the crystal oscillation energy and the preset energy release time length comprises:
[0052] If the real-time release time length of the crystal oscillation energy is greater than or equal to the preset energy release time length, it is determined that the external clock is in a stable state;
[0053] If the real-time crystal oscillation energy release duration is less than the preset energy release duration, it is determined that the external clock is in an unstable state.
[0054] Exemplarily, in the embodiment, the real-time crystal oscillation energy release duration and the preset energy release duration are compared. When the real-time crystal oscillation energy release duration is greater than or equal to the preset energy release duration, it indicates that the crystal oscillation energy has been fully released, which can avoid the peak impact caused by energy superposition, so that the clock frequency of the vehicle-mounted MCU chip will not exceed the maximum allowable frequency, and it is determined that the external clock is in a stable state. When the real-time crystal oscillation energy release duration is less than the preset energy release duration, it indicates that the crystal oscillation energy has not been fully released, which cannot avoid the peak impact caused by energy superposition, so that the clock frequency of the vehicle-mounted MCU chip may exceed the maximum allowable frequency, and it is determined that the external clock is in an unstable state.
[0055] Step S30: If the external clock is in a stable state, the clock signal of an application program in the vehicle-mounted MCU is switched to the external clock, so that the application program performs data transmission based on the external clock.
[0056] Exemplarily, in the embodiment, when the external clock is in a stable state, it indicates that the crystal oscillation energy has been fully released, that is, the clock frequency of the vehicle-mounted MCU chip does not exceed the maximum allowable frequency, so that the crystal oscillator frequency matches the limit working frequency of the vehicle-mounted MCU chip. At this time, the clock signal of the application program in the vehicle-mounted MCU is switched to the external clock, and the system will not crash due to frequency mismatch. Therefore, when the application program performs data transmission based on the stable external clock, the data transmission interruption fault will not occur, and the stability of data transmission can be effectively improved. As can be seen, the embodiment is a fault-tolerant redundant design for the vehicle-mounted MCU with inconsistent temperature performance stability.
[0057] Step S40: If the external clock is in an unstable state, the step of acquiring the real-time crystal oscillation energy release duration is performed.
[0058] Exemplarily, in the embodiment, when the external clock is in an unstable state, it indicates that the crystal oscillation energy has not been fully released, that is, the clock frequency of the vehicle-mounted MCU chip may exceed the maximum allowable frequency, so that the crystal oscillator frequency cannot match the limit working frequency of the vehicle-mounted MCU chip. If the clock signal of the application program in the vehicle-mounted MCU is switched to the external clock at this time, the system may crash due to frequency mismatch. Therefore, in order to avoid the system crash due to frequency mismatch, a new real-time crystal oscillation energy release duration needs to be acquired, and whether the external clock is in a stable state is determined according to the new real-time crystal oscillation energy release duration.
[0059] Further, before the step of detecting that the phase-locked loop is in the initialization stage, further comprising:
[0060] When the vehicle-mounted MCU is powered on, the clock signal of the boot program is switched to the internal clock, and the clock signal of the application program is switched to the internal clock.
[0061] The phase-locked loop is initialized.
[0062] The vehicle-mounted MCU needs an external clock to provide a clock signal in normal operation, and the frequency of the external clock can be low. In order to make the system run more quickly and stably, the clock frequency required by the system needs to be improved. For example, if the external crystal oscillator used by the vehicle-mounted MCU is a 16M passive crystal oscillator, the system clock can be multiplied to 24M through the phase-locked loop, thereby providing a higher clock signal to the system and improving the running speed of the program. Therefore, most vehicle-mounted MCU chips have a phase-locked loop circuit integrated inside, and the system clock can be directly provided by an external crystal oscillator or provided after being multiplied by the phase-locked loop. In the initial stage of system power-on, the vehicle-mounted MCU defaults to using the internal clock, and after the boot program is run, it can be configured to use the external clock through software code, that is, it is usually switched to the external clock mode immediately after the boot work is completed.
[0063] In the prior art, when the frequency multiplication of the vehicle-mounted MCU clock is implemented, the external clock is usually switched first, then the frequency is increased to a high frequency, and then gradually stabilized to the set value. However, due to the different temperature resistance of vehicle-mounted MCU chips, it is extremely likely that the quartz crystal oscillator energy has not been completely released when the limit frequency of the vehicle-mounted MCU has decreased, and at this time the crystal oscillator frequency is still at a high value and has not stabilized to the set value. At this time, the crystal oscillator frequency has not matched the limit working frequency of the vehicle-mounted MCU, so if the external clock is switched too early, it will cause a crash due to frequency mismatch.
[0064] In the embodiment, in order to avoid a crash caused by frequency mismatch, a clock switching protection mechanism is proposed, that is, before the crystal oscillator frequency is stabilized and the external clock is stabilized, the clock source of the BOOT (boot program) and the APP (application program) is continuously maintained in the internal low-frequency clock working mode. Specifically, when the vehicle-mounted MCU is powered on, the clock signal of the boot program is switched to the internal clock, and then the clock signal of the application program is immediately switched to the internal clock; after the boot program and the application program are switched to the internal clock, the phase-locked loop is initialized, and the initialization of the phase-locked loop includes but is not limited to disabling the total interrupt, register setting, disabling the phase-locked loop, and clock frequency register setting; after the external clock is stabilized (i.e., the clock frequency of the vehicle-mounted MCU chip is less than the maximum allowed frequency), the register is configured to enter the external clock mode, that is, after the phase-locked loop is initialized, the application program is switched from the internal clock to the external clock.
[0065] Further, after the step of stabilizing the external clock, the method further comprises:
[0066] switching the clock signal of the boot program to the external clock, so that the boot program performs data transmission based on the external clock.
[0067] For example, in the embodiment, after the external clock is stabilized, the clock signal of the boot program is switched from the internal clock to the external clock, so that when external data interaction is required through the boot program, the boot program can perform data transmission based on the external clock, thereby improving the stability of data transmission.
[0068] As can be seen, in the embodiment, before the phase-locked loop is initialized, the BOOT and APP clock sources are switched to the internal low-frequency clock; and before the APP is initialized, the delay processing is performed, and the APP clock is switched to the external clock mode after the crystal oscillator energy release of the phase-locked loop is completed, that is, the crystal oscillator frequency is stabilized, thereby ensuring that the vehicle-mounted MCU can work normally and improving the stability of data transmission.
[0069] The embodiment is aimed at a vehicle-mounted MCU with unstable manufacturing process, which has a frequent crash phenomenon after adopting the traditional phase-locked loop frequency multiplication. However, after the method provided in the embodiment is adopted, the crash phenomenon disappears, and the vehicle-mounted MCU chip can work stably and normally. Specifically,
[0070] In the phase-locked loop frequency multiplication, the waiting time for the PLL crystal oscillator energy release is increased. After multiple tests and demonstrations, the energy release time of the vehicle-mounted MCU chip can be set to 5 ms. After the energy is fully released, the peak impact caused by the energy superposition can be avoided, thereby avoiding that the clock frequency of the vehicle-mounted MCU chip exceeds the maximum allowable frequency 120M. Before the PLL is initialized, the BOOT and APP clock sources are switched to the internal low-frequency clock. After the PLL is stabilized (that is, the clock frequency of the vehicle-mounted MCU chip is less than the maximum allowable frequency 120M), the external clock mode is set, so that the APP and / or BOOT enter the PLL clock mode. Then, the vehicle-mounted MCU to which the improvement measures provided in the embodiment are implemented is put into the high-temperature box and frequently turned on and off. It is found that no crash phenomenon occurs, which proves that the embodiment has found the root cause of the problem, and the countermeasures provided in the embodiment are effective.
[0071] Referring to Figure 2 The application embodiment further provides a vehicle-mounted terminal data transmission control device, which comprises:
[0072] An acquisition unit is configured to acquire a real-time release time length of a phase-locked loop crystal oscillator energy when it is detected that the phase-locked loop is in an initialization stage.
[0073] a judging unit configured to determine whether the external clock is in a stable state according to the real-time release duration of the crystal oscillation energy and a preset energy release duration;
[0074] a switching unit configured to, if the external clock is in the stable state, switch a clock signal of an application program in the vehicle-mounted MCU to the external clock, so that the application program performs data transmission based on the external clock; and if the external clock is in an unstable state, enable the acquisition unit to perform the step of acquiring the real-time release duration of the phase-locked loop crystal oscillation energy.
[0075] Further, the apparatus further comprises an initialization unit;
[0076] The switching unit is further configured to, when the vehicle-mounted MCU is powered on, switch a clock signal of a boot program to an internal clock, and switch a clock signal of the application program to the internal clock.
[0077] The initialization unit is configured to perform initialization processing on the phase-locked loop.
[0078] Further, the switching unit is further configured to:
[0079] When the external clock is in the stable state, switch the clock signal of the boot program to the external clock, so that the boot program performs data transmission based on the external clock.
[0080] Further, the judging unit is specifically configured to:
[0081] If the real-time release duration of the crystal oscillation energy is greater than or equal to the preset energy release duration, it is determined that the external clock is in the stable state.
[0082] If the real-time release duration of the crystal oscillation energy is less than the preset energy release duration, it is determined that the external clock is in the unstable state.
[0083] Further, the preset energy release duration is determined according to a relationship between a limit working frequency and a temperature of the vehicle-mounted MCU chip.
[0084] It should be noted that, for the convenience and brevity of description, the specific working processes of the apparatus and each unit described above can refer to the corresponding processes in the foregoing vehicle terminal data transmission control method embodiments, which will not be described herein.
[0085] The vehicle terminal data transmission control apparatus provided in the foregoing embodiments can be implemented in the form of a computer program, which can run on the vehicle terminal data transmission control device as shown in Figure 3
[0086] The embodiment of the present application further provides a vehicle terminal data transmission control device, comprising a memory, a processor and a network interface connected through a system bus, at least one instruction is stored in the memory, the at least one instruction is loaded and executed by the processor to realize all steps or part of steps of the vehicle terminal data transmission control method.
[0087] The network interface is used for network communication, such as sending the assigned task. Figure 3 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0088] The processor can be a CPU, and can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable logic gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor, etc. The processor is the control center of the computer device, and connects all parts of the computer device through various interfaces and lines.
[0089] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a video playing function, an image playing function, etc.), etc. The data storage area can store data created according to the use of the mobile phone (such as video data, image data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SmartMedia Card, SMC), a secure digital (Secure digital, SD) card, a flash card, at least one magnetic disk storage device, a flash memory device or other volatile solid-state storage device.
[0090] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement all steps or part of steps of the vehicle terminal data transmission control method.
[0091] The embodiment of the present application implements all or part of the foregoing processes, and can also be completed by a computer program instructing related hardware. The computer program can be stored in a computer readable storage medium, and the computer program can implement the steps of the above methods when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content included in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0092] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, system, server or computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer usable program codes.
[0093] It should be noted that in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or system. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0094] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions specified in the flowchart block or blocks. Figure 1 The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each flowchart block and / or combination of flowchart blocks can represent a module, segment, or portion of instructions that are implemented in Figure 1 The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each flowchart block and / or combination of flowchart blocks can represent a module, segment, or portion of instructions that are implemented in
[0095] The above description is that of current embodiments of the application. Various modifications and changes can be made thereto without departing from the spirit and scope of the application as set forth. The scope of the application is not to be limited to the embodi ments presented but is intended to cover any and all alterations, modifications, equivalents and substitutes as would be included within the spirit and scope of the present application.
Claims
1. A vehicle terminal data transmission control method, characterized by, The method comprises the following steps: acquiring a real-time release duration of a crystal oscillation energy of a phase-locked loop when it is detected that the phase-locked loop is in an initialization stage; judging whether an external clock is in a stable state according to the real-time release duration of the crystal oscillation energy and a preset energy release duration; if the external clock is in the stable state, switching a clock signal of an application program in a vehicle-mounted MCU to the external clock, so that the application program performs data transmission based on the external clock; if the external clock is in an unstable state, performing the step of acquiring the real-time release duration of the crystal oscillation energy of the phase-locked loop; before the step of detecting that the phase-locked loop is in the initialization stage, the method further comprises the following steps: after the vehicle-mounted MCU is powered on, switching a clock signal of a boot program to an internal clock and switching a clock signal of the application program to the internal clock; performing initialization processing on the phase-locked loop; the step of judging whether the external clock is in the stable state according to the real-time release duration of the crystal oscillation energy and the preset energy release duration comprises the following steps: if the real-time release duration of the crystal oscillation energy is greater than or equal to the preset energy release duration, it is judged that the external clock is in the stable state; if the real-time release duration of the crystal oscillation energy is less than the preset energy release duration, it is judged that the external clock is in the unstable state; the preset energy release duration is determined according to a relationship between a limit working frequency and a temperature of a chip of the vehicle-mounted MCU.
2. The vehicle terminal data transmission control method of claim 1, wherein, after the step of judging whether the external clock is in the stable state, the method further comprises the following step: switching the clock signal of the boot program to the external clock, so that the boot program performs data transmission based on the external clock.
3. An in-vehicle terminal data transmission control device characterized by comprising: The method comprises the following steps: an acquiring unit is configured to acquire a real-time release duration of a crystal oscillation energy of a phase-locked loop when it is detected that the phase-locked loop is in an initialization stage; a judging unit is configured to judge whether an external clock is in a stable state according to the real-time release duration of the crystal oscillation energy and a preset energy release duration; a switching unit is configured to switch a clock signal of an application program in a vehicle-mounted MCU to the external clock if the external clock is in the stable state, so that the application program performs data transmission based on the external clock, and to make the acquiring unit perform the step of acquiring the real-time release duration of the crystal oscillation energy of the phase-locked loop if the external clock is in an unstable state; the device further comprises an initialization unit; the switching unit is further configured to switch a clock signal of a boot program to an internal clock and switch a clock signal of the application program to the internal clock after the vehicle-mounted MCU is powered on; the initialization unit is configured to perform initialization processing on the phase-locked loop; the judging unit is specifically configured to: if the real-time release duration of the crystal oscillation energy is greater than or equal to the preset energy release duration, it is judged that the external clock is in the stable state; if the real-time release duration of the crystal oscillation energy is less than the preset energy release duration, it is judged that the external clock is in the unstable state; the preset energy release duration is determined according to a relationship between a limit working frequency and a temperature of a chip of the vehicle-mounted MCU.
4. The apparatus according to claim 3, wherein the switching unit is further configured to: when the external clock is in the stable state, switch the clock signal of the boot program to the external clock, so that the boot program performs data transmission based on the external clock.
5. A vehicle terminal data transmission control apparatus characterized by comprising: The method comprises the following steps: A memory and a processor, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the vehicle terminal data transmission control method in any one of claims 1 to 2.
6. A computer-readable storage medium, characterized in that: The computer storage medium stores a computer program, when the computer program is executed by a processor, to implement the vehicle terminal data transmission control method in any one of claims 1 to 2.
Citation Information
Patent Citations
Crystal oscillator switching method and device, terminal and storage medium
CN112732067A