Bootrom configuration system, methods, electronic devices and storage media

By using the Bootrom configuration system, flexible adjustments to the Bootrom functionality are made after tape-out, solving the problem of limited functionality after chip tape-out, reducing tape-out risks and costs, and expanding the chip's applicability.

CN117170768BActive Publication Date: 2026-11-10BOLIU INTELLIGENT TECH (NANJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311136800.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-05
Publication Date
2026-11-10
Estimated Expiration
2043-09-05

AI Technical Summary

Technical Problem

In existing technologies, the Bootrom code cannot be modified after chip tape-out, resulting in limited functionality, inability to adapt to changes in customer needs, high risk of tape-out failure, and increased costs.

Method used

The Bootrom configuration system includes an environment configuration reading module, a calibration module, a crystal oscillator frequency calculation module, a system clock configuration module, and a boot code header reading module. The central processing unit and storage module are used to flexibly adjust the Bootrom functions and realize the initial configuration of the application environment.

Benefits of technology

After tape-out, the Bootrom function can be flexibly controlled to reduce tape-out risks, reduce costs, expand the application scenarios of the chip, and adapt to changes in customer needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117170768B_ABST
    Figure CN117170768B_ABST
Patent Text Reader

Abstract

This invention discloses a Bootrom configuration system, method, electronic device, and storage medium. The Bootrom configuration system includes an environment configuration reading module, a calibration module, a crystal oscillator frequency calculation module, a system clock configuration module, a boot code header reading module, and an environment adjustment module. The crystal oscillator frequency calculation module calculates the crystal oscillator frequency. The system clock configuration module configures the system clock based on the system clock-related configuration data stored in a second storage module and the crystal oscillator frequency calculated by the crystal oscillator frequency calculation module. The boot code header reading module accesses the starting area of ​​the storage medium to obtain and read the boot code header structure after the system clock configuration is completed. The environment adjustment module, after obtaining the boot code header, configures the application before it runs based on the boot code header structure. The Bootrom configuration system, method, electronic device, and storage medium proposed in this invention can complete flexible functional configuration after chip tape-out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of chip boot technology, and relates to a boot configuration system, and more particularly to a Bootrom configuration system, method, electronic device and storage medium. Background Technology

[0002] When a chip powers on, it executes a piece of boot code. This code is responsible for initializing the chip environment to prepare for the normal startup of subsequent applications; this code is the Bootrom (Boot read-only memory). For a chip, the Bootrom code is stored in the chip's ROM area. After the chip is fabricated, this ROM area can no longer be modified, making this Bootrom code crucial. If any function in the Bootrom has a problem, it can lead to malfunctions in the chip's operation, or even prevent the chip from booting, causing the fabrication to fail and resulting in both time and financial losses for the company. Therefore, to reduce the risk of Bootrom errors, a series of flexible and effective methods are needed to allow for proactive modification and control of some Bootrom functions after fabrication, thus preventing fabrication failures.

[0003] Once a chip is tape-out, the bootrom cannot be modified, thus limiting its application scenarios. If customer requirements change, a new tape-out is necessary. Therefore, a solution is needed that allows for adjustments to the bootrom functionality after tape-out to meet customer needs.

[0004] In view of this, there is an urgent need to design a new Bootrom configuration method in order to overcome at least some of the aforementioned defects in the existing Bootrom configuration methods. Summary of the Invention

[0005] This invention provides a Bootrom configuration system, method, electronic device, and storage medium, which can perform flexible functional configuration after chip tape-out.

[0006] To solve the above-mentioned technical problems, according to one aspect of the present invention, the following technical solution is adopted:

[0007] A Bootrom configuration system, the Bootrom configuration system comprising:

[0008] The environment configuration reading module is used to obtain configuration data from the second storage module and configure the application environment based on the obtained configuration data.

[0009] The calibration module is used to obtain configuration data from the second storage module and calibrate the RC oscillation circuit and / or LDO circuit according to the obtained configuration data.

[0010] The crystal oscillator frequency calculation module is used to calculate the crystal oscillator frequency. It uses an RC oscillation circuit as the clock source for the chip's internal peripheral timer, and the crystal oscillator as the clock source for the CPU. The CPU executes an n-cycle instruction, and the timer records the execution time of this single-cycle instruction. Since the frequency of the RC oscillation circuit is known, the timer's timing time T is derived from it. The crystal oscillator frequency is then calculated based on the obtained timer timing time T. Where C is the number of instructions and n is a positive integer;

[0011] The system clock configuration module is used to configure the system clock based on the system clock-related configuration data stored in the second storage module and the crystal oscillator frequency calculated by the crystal oscillator frequency calculation module.

[0012] The boot header reading module is used to access the starting area of ​​the storage medium and obtain the bootheader structure after the system clock is configured.

[0013] The environment adjustment module is used to obtain the bootheader and then configure the application before it runs based on the bootheader structure.

[0014] As one embodiment of the present invention, the Bootrom configuration system further includes:

[0015] The first storage module is used to store the boot code Bootrom;

[0016] The second storage module is used to store some configuration data of the boot rom.

[0017] The storage medium is used to store the boot header of the boot code bootrom and the application program.

[0018] In one embodiment of the present invention, the Bootrom configuration system further includes a central processing unit (CPU), which includes an environment configuration reading module, a calibration module, a crystal oscillator frequency calculation module, a system clock configuration module, a boot code header reading module, and an environment adjustment module.

[0019] In one embodiment of the present invention, the first memory is a read-only memory (ROM), the second storage module is a one-time programmable memory (EFUSE), and the storage medium is a read-write memory.

[0020] According to another aspect of the present invention, the following technical solution is adopted: a Bootrom configuration method, the Bootrom configuration method comprising:

[0021] Environment configuration reading steps: Obtain the configuration data of the boot rom from the second storage module, and configure the application environment according to the obtained configuration data;

[0022] Calibration steps: Obtain configuration data from the second storage module and calibrate the RC oscillation circuit and / or LDO circuit according to the obtained configuration data;

[0023] Crystal oscillator frequency calculation steps: Calculate the crystal oscillator frequency; use an RC oscillator circuit as the clock source for the chip's internal peripheral timer, and use the crystal oscillator as the clock source for the CPU; the CPU executes an n-cycle instruction, and the timer records the execution time of this single-cycle instruction; the frequency of the RC oscillator circuit is known, so the timer's timing time T is derived from it; calculate the crystal oscillator frequency based on the obtained timer timing time T. Where C is the number of instructions and n is a positive integer;

[0024] System clock configuration steps: Configure the system clock based on the system clock-related configuration data stored in the second storage module and the crystal oscillator frequency calculated by the crystal oscillator frequency calculation module;

[0025] Boot header reading steps: After the system clock is configured, access the starting area of ​​the storage medium to obtain the bootheader structure for reading the boot code header;

[0026] Environment setup steps: After obtaining the bootheader, configure the application before running based on the bootheader structure.

[0027] In one embodiment of the present invention, the boot code Bootrom is stored in a first storage module; the second storage module is used to store some configuration data of the boot code Bootrom; and the storage medium is used to store the boot header and application program of the boot code Bootrom.

[0028] In one embodiment of the present invention, the first memory is a read-only memory (ROM), the second storage module is a one-time programmable memory (EFUSE), and the storage medium is a read-write memory.

[0029] According to another aspect of the present invention, the following technical solution is adopted: an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0030] According to another aspect of the present invention, the following technical solution is adopted: a storage medium storing computer program instructions thereon, which, when executed by a processor, implement the steps of the above-described method.

[0031] The beneficial effects of this invention are as follows: The Bootrom configuration system, method, electronic device and storage medium proposed in this invention can flexibly control the execution of some functions of the Bootrom after tape-out, so as to avoid or correct existing error points, and can flexibly perform application environment initialization configuration. Such flexible Bootrom configuration can reduce chip tape-out risk, reduce tape-out cost for enterprises, increase chip adaptability scenarios, and expand the customer base applicable to enterprises. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of the composition of the Bootrom configuration system in one embodiment of the present invention.

[0033] Figure 2 This is a flowchart of a Bootrom configuration method in one embodiment of the present invention.

[0034] Figure 3 This is a schematic diagram of the hardware composition of the Bootrom configuration system in one embodiment of the present invention.

[0035] Figure 4 This is a flowchart of a Bootrom configuration method in another embodiment of the present invention.

[0036] Figure 5 This is a schematic diagram of the composition of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0037] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0038] To further understand the present invention, preferred embodiments of the present invention are described below in conjunction with examples. However, it should be understood that these descriptions are only for further illustrating the features and advantages of the present invention, and not for limiting the scope of the claims of the present invention.

[0039] The description in this section pertains to only a few typical embodiments, and the present invention is not limited to the scope of the embodiments described. Substitution of identical or similar prior art methods with some technical features in the embodiments is also within the scope of the description and protection of this invention.

[0040] The steps described in the various embodiments of the specification are for illustrative purposes only, and the implementation of this application is not limited by the order of the steps. The term "connection" in the specification includes both direct and indirect connections.

[0041] This invention discloses a Bootrom configuration system. Figure 1 This is a schematic diagram of the composition of the Bootrom configuration system in one embodiment of the present invention; please refer to [link / reference]. Figure 1 The Bootrom configuration system includes: an environment configuration reading module 1, a calibration module 2, a crystal oscillator frequency calculation module 3, a system clock configuration module 4, a boot code header reading module 5, and an environment adjustment module 6.

[0042] The environment configuration reading module 1 is used to obtain configuration data from the second storage module and configure the application environment based on the obtained configuration data;

[0043] The calibration module 2 is used to obtain configuration data from the second storage module and calibrate the RC oscillation circuit and / or LDO circuit according to the obtained configuration data;

[0044] The crystal oscillator frequency calculation module 3 is used to calculate the crystal oscillator frequency. An RC oscillation circuit is used as the clock source for the chip's internal peripheral timer, and the crystal oscillator is used as the clock source for the central processing unit (CPU). The CPU executes an n-cycle instruction, and the timer records the execution time of this single-cycle instruction. Since the frequency of the RC oscillation circuit is known, the timer's timing time T is derived from it. The crystal oscillator frequency is then calculated based on the obtained timer timing time T. Where C is the number of instructions and n is a positive integer;

[0045] The system clock configuration module 4 is used to configure the system clock based on the system clock-related configuration data stored in the second storage module and the crystal oscillator frequency calculated by the crystal oscillator frequency calculation module.

[0046] The boot code header reading module 5 is used to access the starting area of ​​the storage medium and obtain the bootheader structure after the system clock is configured.

[0047] The environment adjustment module 6 is used to obtain the bootheader and then configure the application before it runs based on the bootheader structure.

[0048] In one embodiment of the present invention, the Bootrom configuration system further includes: a first storage module 7, a second storage module 8, and the storage medium 9; the first storage module 7 is used to store the boot code Bootrom; the second storage module 8 is used to store partial configuration data of the boot code Bootrom; and the storage medium 9 is used to store the boot header and application program of the boot code Bootrom. The first storage module 7 may be a read-only memory (ROM); the second storage module 8 may be a one-time programmable memory (eFUSE); and the storage medium 9 may be a read-write memory.

[0049] In one embodiment of the present invention, the Bootrom configuration system further includes a central processing unit (CPU), the CPU including an environment configuration reading module, a calibration module, a crystal oscillator frequency calculation module, a system clock configuration module, a boot code header reading module, and an environment adjustment module.

[0050] This invention further discloses a Bootrom configuration method. Figure 2 This is a flowchart of a Bootrom configuration method in one embodiment of the present invention; please refer to [link / reference]. Figure 2 The Bootrom configuration method includes:

[0051] Environment configuration reading steps: Obtain the configuration data of the boot rom from the second storage module, and configure the application environment according to the obtained configuration data;

[0052] Calibration steps: Obtain configuration data from the second storage module and calibrate the RC oscillation circuit and / or LDO circuit according to the obtained configuration data;

[0053] Crystal oscillator frequency calculation steps: Calculate the crystal oscillator frequency; use an RC oscillator circuit as the clock source for the chip's internal peripheral timer, and use the crystal oscillator as the clock source for the CPU; the CPU executes an n-cycle instruction, and the timer records the execution time of this single-cycle instruction; the frequency of the RC oscillator circuit is known, so the timer's timing time T is derived from it; calculate the crystal oscillator frequency based on the obtained timer timing time T. Where C is the number of instructions and n is a positive integer;

[0054] System clock configuration steps: Configure the system clock based on the system clock-related configuration data stored in the second storage module and the crystal oscillator frequency calculated by the crystal oscillator frequency calculation module;

[0055] Boot header reading steps: After the system clock is configured, access the starting area of ​​the storage medium to obtain the bootheader structure for reading the boot code header;

[0056] Environment setup steps: After obtaining the bootheader, configure the application before running based on the bootheader structure.

[0057] In one embodiment of the present invention, the boot code Bootrom is stored in a first storage module (which may be a read-only memory ROM); the second storage module (which may be a one-time programmable memory efuse) is used to store some configuration data of the boot code Bootrom; and the storage medium (which may be a read-write memory) is used to store the boot header and application program of the boot code Bootrom.

[0058] This invention also discloses an electronic device, Figure 5 This is a schematic diagram of the composition of an electronic device according to an embodiment of the present invention; please refer to [link / reference]. Figure 5 At the hardware level, the electronic device includes a memory, a processor, and at least one network interface; the processor may be a microprocessor, and the memory may include main memory, such as random access memory (RAM) or non-volatile memory. Of course, the electronic device may also include other hardware as needed.

[0059] The processor, network interface, and memory are interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus may include an address bus, a data bus, a control bus, etc. The memory stores programs (including operating system programs and application programs); the programs may include program code, which may include computer operation instructions. The memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0060] In one embodiment, the processor can read the corresponding program from non-volatile memory into memory and then run it; the processor can execute the program stored in memory and specifically perform the following operations (e.g. Figure 2 As shown):

[0061] Environment configuration reading steps: Obtain the configuration data of the boot rom from the second storage module, and configure the application environment according to the obtained configuration data;

[0062] Calibration steps: Obtain configuration data from the second storage module and calibrate the RC oscillation circuit and / or LDO circuit according to the obtained configuration data;

[0063] Crystal oscillator frequency calculation steps: Calculate the crystal oscillator frequency; use an RC oscillator circuit as the clock source for the chip's internal peripheral timer, and use the crystal oscillator as the clock source for the CPU; the CPU executes an n-cycle instruction, and the timer records the execution time of this single-cycle instruction; the frequency of the RC oscillator circuit is known, so the timer's timing time T is obtained from it; calculate the crystal oscillator frequency based on the obtained timer timing time T. Where c is the number of instructions and n is a positive integer;

[0064] System clock configuration steps: Configure the system clock based on the system clock-related configuration data stored in the second storage module and the crystal oscillator frequency calculated by the crystal oscillator frequency calculation module;

[0065] Boot header reading steps: After the system clock is configured, access the starting area of ​​the storage medium to obtain the bootheader structure for reading the boot code header;

[0066] Environment setup steps: After obtaining the bootheader, configure the application before running based on the bootheader structure.

[0067] This invention further discloses a storage medium storing computer program instructions, which, when executed by a processor, implement the following steps of the method of this invention (e.g. Figure 2 As shown):

[0068] Environment configuration reading steps: Obtain the configuration data of the boot rom from the second storage module, and configure the application environment according to the obtained configuration data;

[0069] Calibration steps: Obtain configuration data from the second storage module and calibrate the RC oscillation circuit and / or LDO circuit according to the obtained configuration data;

[0070] Crystal oscillator frequency calculation steps: Calculate the crystal oscillator frequency; use an RC oscillator circuit as the clock source for the chip's internal peripheral timer, and use the crystal oscillator as the clock source for the CPU; the CPU executes a single-cycle instruction, and the timer records the execution time of this single-cycle instruction; the frequency of the RC oscillator circuit is known, so the timer's timing time T is obtained from it; calculate the crystal oscillator frequency based on the obtained timer timing time T. Where C is the number of instructions;

[0071] System clock configuration steps: Configure the system clock based on the system clock-related configuration data stored in the second storage module and the crystal oscillator frequency calculated by the crystal oscillator frequency calculation module;

[0072] Boot header reading steps: After the system clock is configured, access the starting area of ​​the storage medium to obtain the bootheader structure for reading the boot code header;

[0073] Environment setup steps: After obtaining the bootheader, configure the application before running based on the bootheader structure.

[0074] Figure 3 This is a schematic diagram of the hardware composition of the Bootrom configuration system in one embodiment of the present invention; please refer to [link / reference]. Figure 3 The entire flexible configuration system has four important modules: CPU, Bootrom, efuse, and storage medium. The CPU is the central processing unit, responsible for fetching instructions from other modules and executing them; the Bootrom is a piece of startup code stored in the ROM area; efuse is a one-time programmable memory, responsible for storing the Bootrom configuration; and the storage medium is responsible for storing the boot header and user code.

[0075] To achieve flexible configuration of the Bootrom, the following process needs to be executed in sequence: read efuse, calibrate, calculate crystal oscillator frequency, configure system clock, read bootheader, and adjust environment according to bootheader. Figure 4 This is a flowchart of a Bootrom configuration method in another embodiment of the present invention; please refer to [link / reference]. Figure 4 The Bootrom configuration method of the present invention may include the following steps:

[0076] Step 1: Read the efuse steps;

[0077] A portion of the Bootrom's configuration is stored in the efuse module. Therefore, after the CPU reads efuse, it can configure the environment based on the obtained values, and the subsequent execution logic of the Bootrom will also be affected by these obtained values.

[0078] Step 2: Calibration steps;

[0079] After the chip is manufactured, the system's default clock is provided by its internal RC oscillation circuit. However, the RC oscillation circuit is subject to manufacturing process variations and may have an error of up to ±50%. Therefore, a calibration method is needed to correct this error. Here, the RC oscillation is calibrated using the efuse value.

[0080] Furthermore, the voltages of multiple LDO circuits within the chip can also deviate due to manufacturing processes. Excessive deviation can lead to chip instability. The LDOs can also be calibrated using the efuse value.

[0081] Step 3: Calculate the crystal oscillator frequency;

[0082] In some applications, high clock accuracy is required. In such cases, the precision of the calibrated internal RC oscillation circuit is insufficient. Therefore, a high-precision crystal oscillator is typically added to the external circuitry to provide a high-precision clock for the application. The crystal oscillator's frequency depends on its die-cutting method. The chip itself cannot directly know the frequency of the crystal oscillator soldered to the external circuitry. Therefore, the user needs to inform the chip of this crystal oscillator frequency through efuse configuration. However, since efuse cannot be changed after programming, while the crystal oscillator soldered to the external circuitry can be replaced, a more flexible method is needed for the chip to obtain the crystal oscillator's frequency.

[0083] Since the internal RC oscillation circuit has been calibrated, it is used as the clock source for the chip's internal peripheral timer. The crystal oscillator is used as the CPU's clock source, allowing the CPU to execute an n-cycle instruction (which can be one cycle or several cycles). The timer records the execution time of this single-cycle instruction (since the RC frequency is known, the timer timing time Ttimer can be calculated). The crystal oscillator frequency is calculated using the following formula: n is a positive integer.

[0084] Step 4: Configure the system clock;

[0085] efuse also stores part of the system clock configuration. The crystal oscillator frequency has been calculated earlier. Using these two, the system clock can be configured correctly and flexibly.

[0086] Step 5: Read the bootheader.

[0087] The storage medium contains two parts: the bootheader structure in the initial region (which contains the configurations required for the application to run), and the application itself in the subsequent regions. After the system clock is configured, the CPU accesses the initial region of the storage medium to retrieve the bootheader structure.

[0088] Step 6: Adjust the environment according to the bootheader;

[0089] After obtaining the bootheader, the CPU uses this structure to complete the configuration before the application runs.

[0090] In summary, the Bootrom configuration system, method, electronic device, and storage medium proposed in this invention can flexibly control the execution of some functions of the Bootrom after tape-out, allowing it to avoid or correct existing errors. Furthermore, it can flexibly initialize and configure the application environment. This flexible configuration of the Bootrom can reduce chip tape-out risks, lower tape-out costs for enterprises, increase the chip's adaptability to various scenarios, and expand the customer base for enterprise products.

[0091] It should be noted that this application can be implemented in software and / or a combination of software and hardware; for example, it can be implemented using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In some embodiments, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium; for example, RAM memory, magnetic or optical drives, floppy disks, and similar devices. In addition, some steps or functions of this application can be implemented in hardware; for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0092] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0093] The description and application of the present invention herein are illustrative and not intended to limit the scope of the invention to the embodiments described above. Effects or advantages involved in the embodiments may not be apparent due to various factors, and the description of effects or advantages is not intended to limit the embodiments. Variations and modifications of the embodiments disclosed herein are possible, and various substitutions and equivalents of the components in the embodiments are well known to those skilled in the art. It should be apparent to those skilled in the art that the invention can be implemented in other forms, structures, arrangements, proportions, and with other components, materials, and parts without departing from the spirit or essential characteristics of the invention. Other variations and modifications can be made to the embodiments disclosed herein without departing from the scope and spirit of the invention.

Claims

1. A Bootrom configuration system, characterized in that, The Bootrom configuration system includes: The first storage module is a read-only memory (ROM) used to store the boot code Bootrom; The environment configuration reading module is used to obtain configuration data from the second storage module and configure the application environment based on the obtained configuration data; the second storage module is a one-time programmable memory efuse, which is used to store part of the configuration data of the boot rom code; The calibration module is used to obtain configuration data from the second storage module and calibrate the RC oscillation circuit and / or LDO circuit according to the obtained configuration data. The crystal oscillator frequency calculation module is used to calculate the crystal oscillator frequency. It uses an RC oscillator circuit as the clock source for the chip's internal peripheral timer and the crystal oscillator as the clock source for the CPU. The CPU executes an n-cycle instruction, and the timer records the execution time of this single-cycle instruction. Since the frequency of the RC oscillator circuit is known, the timer's timing duration T is derived from it. The crystal oscillator frequency is then calculated based on the obtained timer timing duration T. Where C is the number of instructions and n is a positive integer; The system clock configuration module is used to configure the system clock based on the system clock-related configuration data stored in the second storage module and the crystal oscillator frequency calculated by the crystal oscillator frequency calculation module. The boot code header reading module is used to access the starting area of ​​the storage medium and obtain the boot code header structure after the system clock is configured; the storage medium is a read-write memory, which is used to store the boot code header (bootheader) and application program of the boot code Bootrom; The environment adjustment module is used to obtain the startup code header and then configure the application before it runs based on the startup code header structure.

2. The Bootrom configuration system according to claim 1, characterized in that: The Bootrom configuration system further includes a central processing unit (CPU), which includes an environment configuration reading module, a calibration module, a crystal oscillator frequency calculation module, a system clock configuration module, a boot code header reading module, and an environment adjustment module.

3. A Bootrom configuration method, characterized in that, The Bootrom configuration method includes: The first storage module stores the boot code Bootrom, and the first storage module is a read-only memory (ROM). Environment configuration reading steps: Obtain the configuration data of the boot code Bootrom from the second storage module, and configure the application environment according to the obtained configuration data; the second storage module is a one-time programmable memory efuse, which is used to store part of the configuration data of the boot code Bootrom; Calibration steps: Obtain configuration data from the second storage module and calibrate the RC oscillation circuit and / or LDO circuit according to the obtained configuration data; Crystal oscillator frequency calculation steps: Calculate the crystal oscillator frequency; use an RC oscillator circuit as the clock source for the chip's internal peripheral timer, and use the crystal oscillator as the clock source for the CPU; the CPU executes an n-cycle instruction, and the timer records the execution time of this single-cycle instruction; the frequency of the RC oscillator circuit is known, so the timer timing time T is obtained from it; calculate the crystal oscillator frequency based on the obtained timer timing time T. Where C is the number of instructions and n is a positive integer; System clock configuration steps: Configure the system clock based on the system clock-related configuration data stored in the second storage module and the crystal oscillator frequency calculated in the crystal oscillator frequency calculation steps; Boot code header reading steps: After the system clock is configured, access the starting area of ​​the storage medium to obtain the boot code header structure; the storage medium is a read / write memory, which is used to store the boot code header (bootheader) and application program of the boot code Bootrom; Environment setup steps: After obtaining the startup code header, configure the application before running according to the startup code header structure.

4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method of claim 3.

5. A storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the steps of the method of claim 3.

Citation Information

Patent Citations

  • BOOTROM starting configuration method and device for chip

    CN107450935A

  • BOOTROM correction system and method and chip

    CN113377565A