Screen initialization method of electronic device and related device

By loading and parsing screen information in external memory in electronic devices, the problem of cumbersome screen debugging and inability to support new screens in the development stage is solved, flexible support for different screens and simplifying parameter acquisition, reducing testing costs.

CN114816289BActive Publication Date: 2025-01-03AUTOCHIPS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110112227.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-27
Publication Date
2025-01-03
Estimated Expiration
2041-01-27

AI Technical Summary

Technical Problem

When electronic devices are started, the existing technology needs to add new driver files to each screen, which leads to cumbersome screen debugging in the development stage and cannot support new screens, which cannot meet the user's need to replace screens based on mass-produced firmware.

Method used

By storing screen information and screen information in the form of fixed data structures in external memory, and loading and parsing this information in memory to obtain and initialize screen parameters, the addition of new screen drivers is avoided and the screen parameter acquisition process is simplified.

Benefits of technology

It reduces the complexity of screen debugging in the development stage, reduces the testing cost after replacing the system firmware, and improves the ability to support different screens, simplifies the screen parameter acquisition step.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816289B_ABST
    Figure CN114816289B_ABST
Patent Text Reader

Abstract

The present application provides a screen initialization method for an electronic device and a related device thereof. The electronic device includes an external memory and an internal memory, the external memory stores first screen information and second screen information stored in a fixed data structure, and the screen initialization method of the electronic device includes: loading the first screen information and the second screen information in the external memory into the internal memory; parsing the first screen information to obtain the first screen parameters; initializing the screen using the first screen parameters and the second screen parameters in the second screen information. The present application can solve the drawbacks of cumbersome screen debugging in the development stage and the inability to meet customer needs to support new screens based on mass-produced firmware. When a user selects a new screen, there is no need to add the driver for the new screen to the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a screen initialization method of an electronic device and a related device thereof. Background Art

[0002] When an electronic device starts up, the screen driver in the electronic device needs to initialize the working mode of the screen according to the screen-specific parameter information to realize the normal display process of the screen. At present, the common practice is to solidify the screen-specific parameter information in the screen driver code, which results in different users choosing different screens or the same user changing the screen. It is necessary to re-add the driver of the new screen for the new screen. The problem of doing so has the following disadvantages: the screen debugging is cumbersome during the development stage, and a new driver file must be added for the new screen each time; it cannot meet the needs of users to support new screens based on the mass-produced firmware. Summary of the invention

[0003] The present application provides a screen initialization method for an electronic device and related devices thereof, which can solve the drawbacks of cumbersome screen debugging in the above-mentioned development stage and the inability to satisfy users' needs to support new screens based on mass-produced firmware. Therefore, when users choose a new screen, there is no need to add the driver of the new screen to the electronic device.

[0004] To solve the above problem, the present application provides a screen initialization method for an electronic device, the electronic device comprising an external memory and an internal memory, the external memory storing first screen information and second screen information stored in a fixed data structure, the method comprising:

[0005] Loading the first screen information and the second screen information in the external memory into the internal memory;

[0006] Parsing the first screen information to obtain first screen parameters;

[0007] The screen is initialized using the first screen parameters and the second screen parameters in the second screen information.

[0008] The first screen information is stored in the external memory in a linked list format, and the second screen information is stored in the external memory in a structured form.

[0009] The first screen information and the second screen information in the external memory are loaded into the internal memory, which includes:

[0010] A first input interface is provided to obtain second screen parameters through the first input interface; the obtained second screen parameters are filled into corresponding positions of the structure, and the second screen information is obtained and stored in the external memory.

[0011] The first screen information and the second screen information in the external memory are loaded into the internal memory, which includes:

[0012] The first screen information in text form is acquired, the first screen information in text form is converted into the first screen information in binary form, and the binary form is stored in an external memory.

[0013] The steps of obtaining and storing the second screen information in an external memory, and converting the first screen information in a text form into the first screen information in a binary form and storing the first screen information in an external memory include:

[0014] The first screen information, the second screen information and the error check code form a screen information combination, and the screen information combination is stored in an external memory, so that before parsing the first screen information, the error check code can be used to determine whether the first screen information and the second screen information in the screen information combination are complete.

[0015] Among them, the first screen parameter is a parameter with unfixed data type and length; the second screen parameter is a parameter with fixed data type and length.

[0016] The first screen information is parsed to obtain the first screen parameters, including:

[0017] identifying at least one identification code in the first screen information;

[0018] The type of the first screen parameter corresponding to each identification code is determined based on each identification code, and the first screen parameter corresponding to each identification code is read.

[0019] The first screen information and the second screen information of the plurality of screens are stored in the external memory, and the first screen information and the second screen information in the external memory are loaded into the internal memory, which includes:

[0020] Get screen identification information;

[0021] The first screen information and the second screen information corresponding to the screen identification information are searched from the external memory.

[0022] The screen identification information is the voltage value of the screen pin and / or the device number stored in the driver chip of the screen.

[0023] To solve the above problems, the present application provides an electronic device, which includes a processor, a screen, an external storage and a memory;

[0024] The screen, the memory and the external memory are coupled to the processor. The external memory stores the first screen information and the second screen information stored in the form of a fixed data structure. The processor is used to execute instructions to implement the steps in the above method.

[0025] To achieve the above objectives, the present application provides a computer-readable storage medium having a computer program stored thereon, and the steps in the above method are implemented when the computer program is executed by a processor.

[0026] The method of the present application is: loading the first screen information and the second screen information stored in the external memory into the internal memory, and obtaining the first screen parameter and the second screen parameter from the first screen information and the second screen information respectively, so as to use the first screen parameter and the second screen parameter to initialize the screen, so that when replacing a new screen, there is no need to add a new screen driver to the electronic device, that is, there is no need to configure a screen driver for different screens, which reduces the complexity of screen debugging in the development stage and can reduce the testing cost after re-changing the system firmware. And the second screen parameter is stored in the storage device in the form of a fixed data structure, so when obtaining the second screen parameter, it is not necessary to parse the second screen information in the form of a fixed data structure, and the second screen parameter can be directly obtained from the second screen information in the form of a fixed data structure, which can reduce the time and complexity of obtaining the screen parameter and simplify the steps of obtaining the screen parameter. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the implementation modes of the present application, the drawings required for use in the description of the implementation modes will be briefly introduced below. Obviously, the drawings described below are only some implementation modes of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0028] Figure 1 It is a flowchart of an implementation method of a screen initialization method of an electronic device of the present application;

[0029] Figure 2 It is a schematic diagram of obtaining the second screen information in the screen initialization method of the electronic device of the present application;

[0030] Figure 3 It is a schematic diagram of the first screen information in the screen initialization method of the electronic device of the present application;

[0031] Figure 4 It is a flowchart of another implementation method of the screen initialization method of the electronic device of the present application;

[0032] Figure 5 It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0033] Figure 6 is a schematic diagram of another embodiment of the electronic device of the present application;

[0034] Figure 7 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the technical solution of the present application, the screen initialization method of the electronic device and its related devices provided by the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0036] The screen initialization method of the electronic device of the present application can be applied to the electronic device to set screen parameters for the screen to complete the screen initialization process.

[0037] In order to solve the problem in the background technology that the screen debugging in the development stage is cumbersome and cannot satisfy the user's support for new screens based on the mass-produced firmware, the screen parameter information of the present application may not be solidified in the screen driver, but may be burned into the storage device of the electronic device in text format as a separate firmware, so that the electronic device can load the screen parameter information from the storage device to complete the initialization of the screen, so that when replacing a new screen, there is no need to add a new screen driver to the electronic device, that is, there is no need to configure a screen driver for different screens, which reduces the complexity of screen debugging in the development stage and can reduce the testing cost after re-changing the system firmware. However, all screen parameters are burned into the storage device in text format. When the screen is initialized, all screen parameters need to be parsed from the screen parameter firmware in text format, and obtaining the screen parameters is time-consuming and cumbersome.

[0038] Based on this, the present application can divide the screen parameters required for the screen into two categories, first screen parameters and second screen parameters, based on whether the data type and length of the parameters are fixed, wherein the second screen parameters are parameters with fixed data type and length, so that the second screen parameters with fixed data type and length can be stored in a storage device in the form of a fixed data structure. In this way, when obtaining the second screen parameters, there is no need to parse the second screen information in the form of a fixed data structure, and the second screen parameters can be directly obtained from the second screen information in the form of a fixed data structure, which can reduce the time and complexity of obtaining the screen parameters.

[0039] Please refer to Figure 1 , Figure 1 1 is a flow chart of a first embodiment of a screen initialization method of an electronic device of the present application, wherein the electronic device of the present application includes an external memory and an internal memory. The external memory stores first screen information and second screen information stored in the form of a fixed data structure. The fixed data structure may be a structure, but is not limited thereto. The screen initialization method of the electronic device of the present embodiment includes the following steps.

[0040] S101: Loading the first screen information in the external memory and the second screen information stored in the form of a structure into the internal memory.

[0041] The first screen information and the second screen information in the external memory may be loaded into the internal memory first, so that the processor can obtain the first screen parameter and the second screen parameter based on the first screen information and the second screen information in the internal memory, thereby completing the initialization of the screen.

[0042] Among them, memory, i.e. internal memory, is a storage space that can be directly addressed by the CPU. It is used to temporarily store the calculation data in the CPU and store the data exchanged with external memory such as hard disk. The memory can be RAM (ramdom access memory), such as DRAM (dynamic ramdom access memory), SRAM (static ramdom access memory), DDR (Double Data Rate), etc.

[0043] External storage refers to storage other than computer memory and CPU cache. This type of storage can generally save data after power failure. Common external storage includes hard disk, EMMC, Nand, etc.

[0044] S102: Parse the first screen information to obtain first screen parameters.

[0045] After the first screen information is loaded into the memory, the first screen information may be parsed to obtain first screen parameters, so that the first screen parameters obtained by the parsing may be used to initialize the screen later.

[0046] Optionally, the offset and length of the string text information storing the non-fixed length parameter information of the screen can be obtained according to the agreed protocol, and the parsing of the first screen information is completed according to the agreed protocol. Of course, after the parsing of the first screen information is completed according to the agreed protocol, the parsed data can be converted into a data structure (such as a linked list) that can store non-fixed data length, so as to obtain the first screen parameters in the driver.

[0047] S103: Initialize the screen using the first screen parameter and the second screen parameter in the second screen information.

[0048] Since the second screen information is in the form of a structure, there is no need to parse the second screen information, and the second screen parameters can be directly obtained from the second screen information. Therefore, after parsing the first screen information, the first screen parameters and the second screen parameters in the second screen information can be used to initialize the screen to simplify obtaining the screen parameters.

[0049] For the second screen information, the structure offset storing the fixed-length screen parameter information can be obtained according to the agreed protocol, and the pointer can be forcibly converted into a corresponding data structure to directly obtain the second screen parameters from the second screen information.

[0050] In this embodiment, the first screen information and the second screen information stored in the external memory are loaded into the internal memory, and the first screen parameters and the second screen parameters are obtained from the first screen information and the second screen information respectively, so as to use the first screen parameters and the second screen parameters to initialize the screen, so that when replacing a new screen, there is no need to add a new screen driver to the electronic device, that is, there is no need to configure a screen driver for different screens, which reduces the complexity of screen debugging in the development stage and reduces the testing cost after re-changing the system firmware. And the second screen parameters are stored in the storage device in the form of a structure, so when obtaining the second screen parameters, there is no need to parse the second screen information in the form of a structure, and the second screen parameters can be directly obtained from the second screen information in the form of a structure, which can reduce the time and complexity of obtaining the screen parameters and simplify the steps of obtaining the screen parameters.

[0051] It is understandable that, before step S101, the first screen information and the second screen information may be stored in an external memory.

[0052] Optionally, the application may first provide Figure 2 The first input interface shown is used to obtain the second screen parameters through the first input interface; then the obtained second screen parameters are filled into the corresponding position of the structure to obtain and store the second screen information. Exemplarily, a first input interface can be provided by a PC tool software (such as an MFC visual interface application created by Visual studio software provided by Microsoft) to allow the user to enter the second screen parameters in the first input interface using an edit box or a drop-down list, and the second screen parameters entered by the user are filled into the corresponding position of the structure through the application, thereby integrating all the obtained second screen parameters into the second screen information in the form of a structure, and then storing the second screen information in the form of a structure in the external memory. In addition, the data type of the second screen information stored in the external memory can be in binary form.

[0053] Among them, the second screen parameter can be a screen parameter with a fixed data type and length, or it can be understood as a screen parameter with a consistent data format and required by all screens, which can be saved in a fixed data structure (such as a structure type). For example, the second screen parameter may include screen resolution, physical size of the screen display area, row blank timing information (front shoulder, back shoulder, synchronization pulse width), field blank timing information, data format (RGB888, RGB666, etc.), screen interface type (such as: TTL, LVDS, MIPI, etc.), specific interface related information (such as, MIPI interface: number of screen data channels, MIPI transmission mode, etc., LVDS interface: synchronization mode, link mode, data format, etc.) and other parameters.

[0054] In addition, after obtaining the second screen information, the second screen information and the error check code (such as CRC check code) can be combined into a separate screen information firmware, and burned into the partition of the external memory used to store the screen information using a flash burning tool, so that before step S102, the length information of the screen parameter binary file can be obtained according to the agreed protocol, and then a CRC check can be performed to confirm whether the data is complete.

[0055] Optionally, the application may obtain Figure 3 The first screen information in text form shown can calculate the size of the first screen information in text form, convert the first screen information in text form into first screen information in binary format, and store it in an external memory.

[0056] The first screen information may include identification codes for identifying various first screen parameters. Therefore, step S102 may include: first identifying at least one identification code in the first screen information; then determining the type of the first screen parameter corresponding to each identification code based on each identification code, and reading the first screen parameter corresponding to each identification code. Figure 3 As shown, the identification code may include a header and a tail, a first screen parameter may be provided between the header and the tail, and the header and / or the tail may include type information of the first screen parameter between the header and the tail, so in step S102, the positions of the header and the tail may be identified, the first screen parameter between the header and the tail may be extracted, and the type of the extracted first screen parameter may be identified through the header and / or the tail. Of course, the identification code is not limited to the type of the header and the tail.

[0057] Screen parameters with unfixed quantity, type and length can be used as the first screen parameter, such as the register initialization table of the MIPI interface type screen. Generally, the MIPI interface type screen integrates a driver IC. When the screen is initialized, the register of the driver IC needs to be configured to set the appropriate working mode. Therefore, there is a register initialization table containing all the register addresses and register values ​​that need to be configured. Since the data length of the register initialization table is not fixed, such as Figure 3 As shown, a custom text file can be directly provided and edited in text form, and can be edited in a format agreed upon with the driver of the screen information firmware.

[0058] In addition, after obtaining the first screen information, the first screen information and an error check code (such as a CRC check code) can be combined into a separate screen information firmware, which is burned into a partition of the external memory for storing screen information using a flash burning tool.

[0059] It is understandable that the first screen information and the second screen information can be stored separately or in combination. For example, the first screen information, the second screen information and the error check code can be combined into a screen information combination, and the screen information combination can be stored in an external memory, so that before parsing the first screen information, the error check code can be used to determine whether the first screen information and the second screen information in the screen information combination are complete. The storage location of the first screen information and the second screen information is not limited, for example, the first screen information can be stored after the second screen information.

[0060] In order to improve the adaptation rate of electronic devices using the screen initialization method of the electronic device of the present application, the screen parameters of multiple screens can be stored in the storage device of the electronic device, so that the electronic device can adapt to multiple screens, so that when the screen is initialized, the parameter information of the screen itself can be loaded based on the screen identification information to complete the initialization of the screen. For details, please refer to Figure 4 , Figure 4 It is a flow chart of a second implementation of the screen initialization method of an electronic device of the present application. The screen initialization method of the electronic device of this implementation includes the following steps.

[0061] S201: Acquire screen identification information.

[0062] In this implementation, the screen identification information may be acquired first, so that the first screen information and the second screen information corresponding to the screen identification information may be subsequently found from the external memory based on the screen identification information.

[0063] The screen identification information may be the voltage value of the screen pin and the device number stored in the screen driver chip, but is certainly not limited thereto.

[0064] S202: searching the external memory for first screen information and second screen information corresponding to the screen identification information.

[0065] The electronic device may store the correspondence between the screen identification information and the first screen information and the second screen information, so that after obtaining the screen identification information, the first screen information and the second screen information corresponding to the screen identification information can be found from the external memory, so as to initialize the screen using the first screen information and the second screen information corresponding to the screen identification information.

[0066] In one implementation, the electronic device may store the correspondence between the screen identification information and the screen index, the correspondence between the screen index and the first screen information, and the correspondence between the screen index and the second screen information. In step S202, the screen index may be first confirmed based on the screen identification information, and then the first screen information and the second screen information corresponding to the screen index may be searched in the external memory based on the screen index.

[0067] In another implementation, the electronic device may store the correspondence between the screen identification information and the storage address of the first screen information and the correspondence between the screen identification information and the storage address of the second screen information, so the storage address of the first screen information and the second screen information can be first confirmed based on the screen identification information, and then the first screen information and the second screen information corresponding to the screen identification information can be obtained in the external memory based on the storage address of the first screen information and the second screen information.

[0068] S203: Load the first screen information and the second screen information stored in the form of a structure in the storage device into the memory.

[0069] After finding the first screen information and the second screen information corresponding to the screen identification information from the external memory, the first screen information and the second screen information may be loaded into the internal memory so as to initialize the screen based on the first screen information and the second screen information.

[0070] S204: Parse the first screen information to obtain first screen parameters.

[0071] S205: Initialize the screen using the first screen parameter and the second screen parameter in the second screen information.

[0072] In this embodiment, the second screen parameters are stored in a storage device in the form of a structure. In this way, when obtaining the second screen parameters, there is no need to parse the second screen information in the form of a structure. The second screen parameters can be directly obtained from the second screen information in the form of a structure, which can reduce the time and complexity of obtaining the screen parameters and simplify the steps of obtaining the screen parameters.

[0073] See also Figure 5 , Figure 5It is a structural diagram of an embodiment of an electronic device of the present application. The electronic device may be a car computer or a smart phone, etc. The electronic device 10 includes a processor 12, an external memory 11, a memory 13 and a screen 14, and the screen 14, the memory 13 and the external memory 11 are coupled to the processor 12. The external memory 11 is hardware for storing data in an electronic device, which may store the first screen information and the second screen information, and may be EMMC, etc. The memory may be hardware for running memory in an electronic device, and may be MEMORY, etc. The screen is a component used for display in an electronic device.

[0074] The processor is also used to implement the method of any of the above embodiments. For example, the processor can be used to load the first screen information in the external memory and the second screen information stored in the form of a structure into the internal memory; parse the first screen information to obtain the first screen parameter; and initialize the screen using the first screen parameter and the second screen parameter in the second screen information.

[0075] Optionally, the processor may be configured to execute Figure 6 The windows tool software shown is used to edit the first screen parameters and complete the data integrity CRC check of the relevant information, and then the first screen parameters and the second screen parameters are respectively packaged into the first screen information and the second screen information in binary form according to the agreed protocol, and the first screen information and the second screen information are stored in the external memory (such as EMMC) when the system firmware is burned. Among them, the file name of the first screen information and the second screen information can be pannel_info.bin. The processor can also be used to execute the general screen driver software to load the first screen information and the second screen information from the external memory to the internal memory, complete the parsing of the first screen information, obtain the first screen parameters and the second screen parameters, and then use them to set the screen working mode to complete the adaptation of the screen.

[0076] The logic process of the screen initialization method of the electronic device is presented in a computer program. In terms of the computer program, if it is sold or used as an independent software product, it can be stored in a computer storage medium. Therefore, this application proposes a computer-readable storage medium. Figure 7 , Figure 7 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. In this embodiment, a computer-readable storage medium 20 stores a computer program 21, and when the computer program 21 is executed by a processor, the steps in the screen initialization method of the above-mentioned electronic device are implemented.

[0077] The computer-readable storage medium 20 may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc., which can store computer programs, or may be a server storing the computer program, which can send the stored computer program to other devices for execution, or can also execute the stored computer program itself. From a physical entity point of view, the computer-readable storage medium 20 may be a combination of multiple entities, such as multiple servers, a server plus a memory, or a memory plus a mobile hard disk, etc.

[0078] The above are only implementation methods of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A screen initialization method for an electronic device, characterized in that: The electronic device comprises an external memory and an internal memory, wherein the external memory stores first screen information and second screen information stored in a fixed data structure; the method comprises: Loading the first screen information and the second screen information in the external memory into the internal memory; parsing the first screen information to obtain first screen parameters; Initialize a screen using the first screen parameters and the second screen parameters in the second screen information; The second screen information is stored in the external memory in the form of a structure, and the storage form of the first screen information is different from the storage form of the second screen information; the second screen parameter is a screen parameter with a fixed data type and length, and the first screen parameter is a screen parameter with an unfixed data type and length.

2. The method according to claim 1, characterized in that The first screen information is stored in the external memory in a linked list format.

3. The method according to claim 1, characterized in that The step of loading the first screen information and the second screen information in the external memory into the internal memory comprises: A first input interface is provided to obtain the second screen parameters through the first input interface; the obtained second screen parameters are filled into corresponding positions of the structure, and the second screen information is obtained and stored in the external memory.

4. The method according to claim 3, characterized in that The step of loading the first screen information and the second screen information in the external memory into the internal memory comprises: The first screen information in text form is acquired, the first screen information in text form is converted into the first screen information in binary form, and the binary form is stored in the external memory.

5. The method according to claim 4, characterized in that The obtaining and storing the second screen information in the external memory, and the converting the first screen information in text form into the first screen information in binary form and storing it in the external memory, include: The first screen information, the second screen information and an error check code form a screen information combination, and the screen information combination is stored in the external memory, so that before parsing the first screen information, the error check code can be used to determine whether the first screen information and the second screen information in the screen information combination are complete.

6. The method according to claim 1, characterized in that The parsing the first screen information to obtain the first screen parameter includes: identifying at least one identification code in the first screen information; The type of the first screen parameter corresponding to each identification code is determined based on each identification code, and the first screen parameter corresponding to each identification code is read.

7. The method according to claim 1, characterized in that The external memory stores first screen information and second screen information of multiple screens, and the first screen information and the second screen information in the external memory are loaded into the internal memory, which includes: Get screen identification information; The first screen information and the second screen information corresponding to the screen identification information are searched from the external memory.

8. The method according to claim 7, characterized in that The screen identification information is the voltage value of the screen pin and / or the device number stored in the driver chip of the screen.

9. An electronic device, characterized in that: The electronic device includes a processor, an external memory, an internal memory and a screen, wherein the screen, the internal memory and the external memory are coupled to the processor, the external memory stores first screen information and second screen information stored in the form of a fixed data structure, and the processor is used to execute instructions to implement the steps in the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the steps of the method according to any one of claims 1 to 8 are implemented.