A boot method, apparatus, device, and storage medium for eMMC.
By adjusting the sampling timing parameters of the main controller and alternative startup methods, the problem of eMMC startup failure was solved, achieving a more flexible and efficient startup process and reducing product waste.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-05
- Publication Date
- 2026-03-10
AI Technical Summary
In the existing technology, when the main controller starts the eMMC according to fixed sampling timing parameters, it is easy to collect incorrect data, which leads to the failure of eMMC startup. Furthermore, it cannot match the timing parameters of eMMC chips from different manufacturers, resulting in product scrap and waste.
After the eMMC fails to start on the first attempt, the main controller adjusts the sampling timing parameters and uses an alternative startup method to control the eMMC to start again. Successful startup is confirmed by verifying multiple boot data.
Reduce waste of eMMC products, improve boot success rate, achieve more flexible boot methods, and avoid product loss due to timing mismatch.
Smart Images

Figure CN115705215B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for starting up eMMC. Background Technology
[0002] Currently, embedded multimedia card (eMMC) controllers typically use a mandatory boot method. That is, after the host controller (e.g., the HOST controller) powers on, it first pulls the command (CMD) signal low. When the eMMC detects the CMD signal is low, if the eMMC's operating mode is pre-idle, it automatically outputs data from the boot area. The host controller detects and acquires the boot data, thus enabling the eMMC to boot.
[0003] When the master controller pulls the CMD signal low, if the eMMC is in pre-idle mode, it outputs boot data within 1 second, followed by multiple consecutive boot data outputs. If the master controller pulls the CMD signal high, data output stops. During the eMMC's boot data output, the master controller samples the boot data according to fixed sampling timing parameters. If the master controller collects a preset amount of boot data, it pulls the CMD signal high to end the forced boot process. Afterward, the master controller verifies the collected boot data. If all boot data passes verification, the eMMC is considered to have booted successfully, and the next operation (e.g., read / write operations) is performed. If any boot data fails verification, the eMMC boot is considered to have failed.
[0004] However, when the main controller collects boot data according to a fixed sampling clock, it is very likely to collect incorrect data. Figure 1a This is a schematic diagram of the main controller sampling boot data, such as... Figure 1a As shown, the boot data output by the eMMC are DATA0, DATA1, ..., DATAn. Taking DATA0 as an example, when the host controller's sampling time of the eMMC falls within the sampling time window corresponding to the boot data, it can sample the correct data. When the host controller's sampling time of the eMMC falls outside the sampling time window, there is a high probability of sampling incorrect data. In this case, the eMMC is considered to have failed to boot.
[0005] In existing technologies, the sampling timing parameters configured on the main controller are fixed, while the timing parameters of eMMC chips from different manufacturers are not the same. If the current eMMC fails to start using the forced start method, the main controller will start the next eMMC again until it finds an eMMC whose timing parameters match the sampling timing parameters of the main controller, which can easily lead to the loss of scrapped eMMC products. Summary of the Invention
[0006] This invention provides a method, apparatus, device, and storage medium for starting eMMC, which can reduce the losses caused by the scrapping of eMMC products and make the startup method of eMMC more flexible.
[0007] In a first aspect, embodiments of the present invention provide a method for starting an eMMC, the method comprising:
[0008] The target embedded multimedia controller (eMMC) is started up for the first time by the main controller using a forced start method.
[0009] If it is determined that the target eMMC fails to start on the first attempt, the sampling timing parameters corresponding to the main controller are adjusted, and a preset start command is sent to the target eMMC through the main controller, so that the target eMMC can start again according to the start command;
[0010] If the main controller receives boot data output by the target eMMC within a preset time interval, it will collect multiple boot data output by the target eMMC according to the adjusted sampling timing parameters.
[0011] When the main controller determines that the target eMMC has finished outputting boot data, it verifies the multiple boot data collected and determines the boot result of the target eMMC based on the verification result, until it is determined that the target eMMC has successfully booted.
[0012] Secondly, embodiments of the present invention also provide an eMMC startup device, the device comprising:
[0013] The initial startup module is used to control the target eMMC to start up for the first time via a forced startup method through the main controller;
[0014] The parameter adjustment module is used to adjust the sampling timing parameters corresponding to the main controller if it is determined that the target eMMC fails to start on the first time, and send a preset start command to the target eMMC through the main controller so that the target eMMC can start again according to the start command;
[0015] The acquisition module is used to acquire multiple boot data output by the target eMMC according to the adjusted sampling timing parameters if the main controller receives boot data output by the target eMMC within a preset time interval.
[0016] The verification module is used to verify multiple boot data collected when the main controller determines that the target eMMC has finished outputting boot data, and to determine the boot result of the target eMMC based on the verification result, until the target eMMC is determined to have booted successfully.
[0017] Thirdly, embodiments of the present invention also provide a computer device, the device comprising:
[0018] One or more processors;
[0019] Storage device for storing one or more programs;
[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement an eMMC startup method provided in any embodiment of the present invention.
[0021] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements an eMMC startup method provided in any embodiment of the present invention.
[0022] The technical solution of this invention uses a forced startup method by the main controller to control the target eMMC to start up for the first time. If the initial startup of the target eMMC fails, the sampling timing parameters corresponding to the main controller are adjusted, and a startup command is sent to the target eMMC by the main controller so that the target eMMC can start up again according to the startup command. If the main controller receives the boot data output by the target eMMC within a preset time interval, it collects multiple boot data output by the target eMMC according to the adjusted sampling timing parameters. Finally, when the main controller determines that the target eMMC has finished outputting boot data, it verifies the multiple boot data and determines the startup result of the target eMMC according to the verification result until the target eMMC is determined to have started successfully. This technical means can avoid wasting a large number of eMMCs, reduce the losses caused by the scrapping of eMMC products, and make the startup method of eMMC more flexible. Attached Figure Description
[0023] Figure 1a This is a schematic diagram of a main controller sampling boot data in an embodiment of the present invention;
[0024] Figure 1bThis is a flowchart of an eMMC startup method according to Embodiment 1 of the present invention;
[0025] Figure 2a This is a flowchart of an eMMC startup method according to Embodiment 2 of the present invention;
[0026] Figure 2b This is a flowchart of another eMMC startup method in Embodiment 2 of the present invention;
[0027] Figure 3 This is a structural diagram of a startup device for eMMC according to Embodiment 3 of the present invention;
[0028] Figure 4 This is a schematic diagram of the structure of a computer device according to Embodiment 4 of the present invention. Detailed Implementation
[0029] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0030] Example 1
[0031] Figure 1b This is a flowchart of an eMMC boot method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where the host controller boots the eMMC. The method can be executed by an eMMC boot device, which can be implemented by software and / or hardware, and is generally integrated into a computer device with data processing capabilities, such as a terminal device or a server. Specifically, it includes the following steps:
[0032] Step 110: The target embedded multimedia controller (eMMC) is started for the first time by using a forced start method through the main controller.
[0033] In this embodiment, the master controller can be a control device with data processing and centralized control capabilities, used to control the eMMC to start. Specifically, the master controller can use a mandatory boot method to control the target eMMC to start.
[0034] In one specific embodiment, the target eMMC is controlled to perform an initial startup by the main controller using a forced startup method, including: powering on the main controller and pulling down a preset hardware signal through the main controller, so that the target eMMC outputs boot data according to the hardware signal.
[0035] The main controller can be powered on via a power supply. After power-on, the main controller can pull a specific hardware signal low between itself and the target eMMC. Upon detecting this low signal, the target eMMC, if operating in pre-idle mode, can automatically output boot data.
[0036] Step 120: If it is determined that the target eMMC fails to start on the first attempt, the sampling timing parameters corresponding to the main controller are adjusted, and a preset start command is sent to the target eMMC through the main controller, so that the target eMMC can start again according to the start command.
[0037] In this embodiment, optionally, if the target eMMC detects that the hardware signal has been pulled low and does not output boot data, that is, the host controller does not receive the boot data output by the target eMMC, then it can be determined that the target eMMC has failed to start up for the first time.
[0038] In one specific embodiment, determining that the target eMMC failed its initial startup includes: if the master controller does not receive boot data output by the target eMMC during the initial startup process within a preset time interval, then the target eMMC is determined to have failed its initial startup; or, if the master controller determines that the boot data output by the target eMMC has failed verification, then the target eMMC is determined to have failed its initial startup.
[0039] Specifically, after the main controller pulls the hardware signal low, if no boot data is received from the target eMMC during its initial startup within a preset time interval, the initial startup of the target eMMC can be determined to have failed. Specifically, after the main controller pulls the hardware signal low, a timer can be configured. If no boot data is received from the target eMMC during its initial startup within the duration specified by the timer, the initial startup of the target eMMC can be determined to have failed. The duration can be 1 second, and the specific value can be preset according to actual conditions; this embodiment does not limit this.
[0040] In this embodiment, after the main controller pulls the hardware signal low, if it receives the boot data output by the target eMMC during the initial startup process within a preset time interval, it can collect multiple boot data output by the target eMMC according to the sampling timing parameters currently configured in the main controller. After the collection is completed, a Cyclic Redundancy Check (CRC) is performed on the multiple boot data collected. If one or more boot data fail the CRC check (i.e., the check fails), it can be determined that the target eMMC has failed the initial startup.
[0041] In one specific embodiment, each boot data output by the eMMC consists of a data frame and a CRC checksum. After the main controller collects the boot data, it can perform CRC calculation on the data frame in each boot data and compare the calculation result with the CRC checksum in the boot data. If the calculation result is consistent with the CRC checksum, it can be determined that the boot data has passed the CRC check.
[0042] In practical applications, if an eMMC fails to boot initially, even if the host controller continues to pull the hardware signal low, the eMMC will not output boot data based on that hardware signal. Therefore, in existing technologies, after an eMMC fails to boot initially, the host controller will use a forced boot method to restart the next eMMC until it finds an eMMC whose timing parameters match the timing parameters sampled by the host controller, i.e., finds a successfully booted eMMC. This approach wastes a large number of eMMCs, resulting in low eMMC utilization.
[0043] To address the aforementioned issues, this embodiment proposes an implementation method whereby, after an initial startup failure of the eMMC, the main controller employs an alternative boot method to control the eMMC to restart. Specifically, to prevent the main controller from acquiring erroneous boot data, the main controller can adjust the currently configured sampling timing parameters and then use the alternative boot method to control the eMMC to restart. The process is as follows: the main controller sends a preset startup command to the target eMMC; upon receiving the startup command, the target eMMC outputs boot data.
[0044] In one specific embodiment, when adjusting the sampling timing parameters currently configured for the master controller, the phase relationship between the clock edge of the master controller and the sampling time window corresponding to the boot data can be adjusted, or the sampling clock of the master controller can be adjusted.
[0045] Step 130: If the main controller receives boot data output by the target eMMC within a preset time interval, it collects multiple boot data output by the target eMMC according to the adjusted sampling timing parameters.
[0046] In a specific embodiment, after the master controller sends a start command to the target eMMC, a timer can be configured. If boot data output by the target eMMC is received within the duration specified by the timer, multiple boot data points output by the target eMMC can be collected according to the adjusted sampling timing parameters. The duration can be 1 second, and the specific value is preset according to the actual situation. This embodiment does not limit this.
[0047] If the master controller does not receive boot data from the target eMMC within the time interval, it can return to the operation of step 120 until the master controller receives boot data from the target eMMC within the time interval.
[0048] Step 140: When the main controller determines that the target eMMC has finished outputting boot data, it verifies the multiple boot data collected and determines the boot result of the target eMMC based on the verification result until it is determined that the target eMMC has successfully booted.
[0049] In a specific embodiment, if the target eMMC finishes outputting boot data, the main controller can perform CRC checks on the multiple boot data collected. If one or more boot data fail the CRC check, it can be determined that the target eMMC has failed to start again, and the operation of step 120 can be returned until the target eMMC is determined to start successfully.
[0050] In this embodiment, when starting the eMMC, the main controller typically uses the default startup method (i.e., forced startup) to control the target eMMC for its initial startup. If startup fails, the main controller will adjust the corresponding sampling timing parameters and then use an alternative startup method to control the target eMMC to restart. This embodiment combines the forced startup method with the alternative startup method, which on the one hand avoids wasting a large number of eMMCs and reduces the losses caused by the scrapping of eMMC products; on the other hand, it makes the startup method of the eMMC more flexible.
[0051] The technical solution of this invention uses a forced startup method by the main controller to control the target eMMC to start up for the first time. If the initial startup of the target eMMC fails, the sampling timing parameters corresponding to the main controller are adjusted, and a startup command is sent to the target eMMC by the main controller so that the target eMMC can start up again according to the startup command. If the main controller receives the boot data output by the target eMMC within a preset time interval, it collects multiple boot data output by the target eMMC according to the adjusted sampling timing parameters. Finally, when the main controller determines that the target eMMC has finished outputting boot data, it verifies the multiple boot data and determines the startup result of the target eMMC according to the verification result until the target eMMC is determined to have started successfully. This technical means can avoid wasting a large number of eMMCs, reduce the losses caused by the scrapping of eMMC products, and make the startup method of eMMC more flexible.
[0052] Example 2
[0053] This embodiment is a further refinement of the above embodiments. The same or corresponding terms as those in the above embodiments will not be repeated in this embodiment. Figure 2a This is a flowchart of an eMMC startup method provided in Embodiment 2. In this embodiment, the technical solution can be combined with one or more methods from the above embodiments, such as... Figure 2a As shown, the method provided in this embodiment may further include:
[0054] Step 210: The target embedded multimedia controller (eMMC) is started for the first time by the main controller using a forced start method.
[0055] Step 220: If it is determined that the target eMMC fails to start up for the first time, adjust the sampling timing parameters corresponding to the main controller.
[0056] Step 230: Send a reset command to the target eMMC through the master controller, so that the target eMMC resets according to the reset command.
[0057] In one specific embodiment, the reset command can be 0x00000000.
[0058] Step 240: Send a mode setting command to the target eMMC through the main controller, so that the target eMMC sets the current working mode to the standby mode according to the mode setting command.
[0059] In one specific embodiment, the mode setting command can be 0xF0F0F0F0. The pre-idle mode refers to the working mode in which the target eMMC can enter the boot mode.
[0060] Step 250: Send a data transmission command to the target eMMC through the master controller, so that the target eMMC outputs multiple boot data according to the data transmission command.
[0061] In one specific embodiment, the data transmission command can be 0xFFFFFFFA.
[0062] Step 260: If the main controller receives boot data output by the target eMMC within a preset time interval, it collects multiple boot data output by the target eMMC according to the adjusted sampling timing parameters.
[0063] Step 270: When the main controller determines that the target eMMC has finished outputting boot data, it verifies the multiple boot data collected and determines the boot result of the target eMMC based on the verification result until it is determined that the target eMMC has successfully booted.
[0064] In one embodiment of this example, determining that the target eMMC has finished outputting boot data through the master controller includes: determining whether the number of multiple boot data collected is equal to a preset value; if so, sending a preset reset command to the target eMMC through the master controller, so that the target eMMC resets according to the reset command.
[0065] If the number of boot data collected by the main controller is equal to a preset value, the main controller sends a reset command (0x00000000) to the target eMMC. After receiving the reset command, the target eMMC resets itself according to the reset command and ends the output of boot data.
[0066] In one embodiment of this example, the main controller verifies multiple boot data collected and determines the startup result of the target eMMC based on the verification results until the target eMMC is determined to have started successfully. This includes: verifying multiple boot data collected by the main controller; if each boot data passes the verification, the target eMMC is determined to have started successfully; if at least one boot data fails the verification, the target eMMC is determined to have failed to start, and the process returns to adjusting the sampling timing parameters corresponding to the main controller, and sending a preset startup command to the target eMMC through the main controller, until the target eMMC is determined to have started successfully.
[0067] In forced boot mode, the eMMC will only output boot data when it detects that the host controller has pulled the hardware signal low and the eMMC is in pre-idle mode. If the eMMC stops outputting boot data, it will leave pre-idle mode. In this case, if the host controller wants to retrieve boot data from the target eMMC again, forced boot mode cannot support the eMMC outputting boot data.
[0068] To address the aforementioned issues, this embodiment proposes an implementation method whereby, after the eMMC finishes outputting boot data, the master controller uses an alternative boot method to control the eMMC to output boot data again.
[0069] In one embodiment of this example, after determining that the target eMMC has started successfully, the method further includes: if the main controller needs to obtain boot data from the target eMMC again, then return to the operation of sending a preset boot command to the target eMMC through the main controller, until each piece of boot data collected by the main controller passes the verification.
[0070] Regardless of the target eMMC's operating mode, the master controller can send a boot command to the target eMMC to cause the target eMMC to output boot data.
[0071] Therefore, after the eMMC finishes outputting boot data, the host controller can use an alternative boot method to control the eMMC to output boot data again, which can meet the host controller's need to obtain boot data multiple times.
[0072] The technical solution of this invention uses a forced startup method by the main controller to control the target eMMC to start for the first time. If the initial startup of the target eMMC fails, the sampling timing parameters corresponding to the main controller are adjusted. The main controller sends a reset command, a mode setting command, and a data transmission command to the target eMMC to make the target eMMC output multiple boot data. If the main controller receives the boot data output by the target eMMC within a preset time interval, it collects the multiple boot data output by the target eMMC according to the adjusted sampling timing parameters. Finally, when the main controller determines that the target eMMC has finished outputting boot data, it verifies the multiple boot data and determines the startup result of the target eMMC based on the verification result until the target eMMC is determined to have started successfully. This technical means can avoid wasting a large number of eMMCs, reduce the losses caused by the scrapping of eMMC products, and make the startup method of eMMC more flexible.
[0073] To better illustrate the technical solutions provided in the embodiments of the present invention, the embodiments of the present invention can be referred to the following implementation methods, such as... Figure 2b As shown:
[0074] Step 1: Use the main controller to force start the target eMMC for the first time;
[0075] Step 2: Does the master controller receive boot data output from the target eMMC within a preset time interval? If yes, proceed to step 3; otherwise, proceed to step 9.
[0076] Step 3: The main controller collects multiple boot data from the target eMMC output according to the currently configured sampling timing parameters.
[0077] Step 4: Check if the number of boot data collected by the main controller is equal to the preset value. If yes, proceed to step 5; otherwise, return to step 3.
[0078] Step 5: The main controller pulls up a preset hardware signal to stop the target eMMC from outputting boot data.
[0079] Step 6: The main controller determines whether all the collected boot data have passed the CRC check. If yes, proceed to step 7; otherwise, proceed to step 9.
[0080] Step 7: The target eMMC exits pre-idle mode and enters read / write mode, and the host controller performs read and write operations on the target eMMC.
[0081] Step 8: The master controller determines whether it needs to acquire boot data again. If yes, proceed to step 10; otherwise, return to step 7 to perform the read and write operation on the target eMMC.
[0082] Step 9: Adjust the current sampling timing parameters corresponding to the main controller.
[0083] Step 10: The master controller sends a preset start command to the target eMMC. The master controller uses an alternative start method to control the target eMMC to start.
[0084] Step 11: Does the master controller receive boot data output from the target eMMC within the preset time interval? If yes, proceed to step 12; otherwise, return to step 9.
[0085] Step 12: The main controller collects multiple boot data from the target eMMC output according to the adjusted sampling timing parameters.
[0086] Step 13: Is the number of boot data collected by the main controller equal to the preset value? If yes, proceed to step 14; otherwise, return to step 12.
[0087] Step 14: The master controller sends a reset command to the target eMMC, so that the target eMMC resets according to the reset command, stops outputting boot data, and ends the alternative boot method.
[0088] Step 15: The main controller determines whether all the collected boot data have passed the CRC check. If yes, proceed to step 16; otherwise, return to step 9.
[0089] Step 16: The target eMMC exits pre-idle mode and enters read / write mode, and the host controller performs read and write operations on the target eMMC.
[0090] Step 17: The master controller determines whether it needs to acquire boot data again. If yes, it executes step 10; otherwise, it returns to the read / write operation on the target eMMC in step 16.
[0091] The method provided by the embodiments of the present invention can avoid wasting a large amount of eMMC, reduce the losses caused by the scrapping of eMMC products, and make the startup method of eMMC more flexible.
[0092] Example 3
[0093] Figure 3 This is a structural diagram of an eMMC startup device provided in Embodiment 3 of the present invention. The device includes: an initial startup module 310, a parameter adjustment module 320, a data acquisition module 330, and a verification module 340.
[0094] The initial startup module 310 is used to control the target eMMC to start up for the first time by means of forced startup through the main controller.
[0095] The parameter adjustment module 320 is used to adjust the sampling timing parameters corresponding to the main controller if it is determined that the target eMMC fails to start on the first time, and send a preset start command to the target eMMC through the main controller so that the target eMMC can start again according to the start command;
[0096] The acquisition module 330 is used to acquire multiple boot data output by the target eMMC according to the adjusted sampling timing parameters if the main controller receives boot data output by the target eMMC within a preset time interval.
[0097] The verification module 340 is used to verify multiple boot data collected when the main controller determines that the target eMMC has finished outputting boot data, and to determine the boot result of the target eMMC based on the verification result, until the target eMMC is determined to have booted successfully.
[0098] The technical solution of this invention uses a forced startup method by the main controller to control the target eMMC to start up for the first time. If the initial startup of the target eMMC fails, the sampling timing parameters corresponding to the main controller are adjusted, and a startup command is sent to the target eMMC by the main controller so that the target eMMC can start up again according to the startup command. If the main controller receives the boot data output by the target eMMC within a preset time interval, it collects multiple boot data output by the target eMMC according to the adjusted sampling timing parameters. Finally, when the main controller determines that the target eMMC has finished outputting boot data, it verifies the multiple boot data and determines the startup result of the target eMMC according to the verification result until the target eMMC is determined to have started successfully. This technical means can avoid wasting a large number of eMMCs, reduce the losses caused by the scrapping of eMMC products, and make the startup method of eMMC more flexible.
[0099] Based on the above embodiments, the initial startup module 310 may include:
[0100] The main controller power-on unit is used to power on the main controller and pull down a preset hardware signal through the main controller so that the target eMMC outputs boot data according to the hardware signal.
[0101] The parameter adjustment module 320 may include:
[0102] The first startup result determination unit is used to determine that the target eMMC has failed to start up for the first time if the main controller does not receive the boot data output by the target eMMC during the initial startup process within a preset time interval.
[0103] The second startup result determination unit is used to determine that the initial startup of the target eMMC has failed if the main controller determines that the boot data output by the target eMMC has not passed the verification.
[0104] The first reset command sending unit is used to send a reset command to the target eMMC through the master controller, so that the target eMMC is reset according to the reset command;
[0105] The configuration command sending unit is used to send a mode setting command to the target eMMC through the main controller, so that the target eMMC sets the current working mode to the ready-to-start mode according to the mode setting command;
[0106] The transmission command sending unit is used to send a data transmission command to the target eMMC through the master controller, so that the target eMMC outputs multiple boot data according to the data transmission command.
[0107] Verification module 340 may include:
[0108] The quantity judgment unit is used to determine whether the number of multiple boot data collected is equal to a preset value through the main controller;
[0109] The second reset command sending unit is used to send a preset reset command to the target eMMC through the main controller when the number of multiple boot data collected by the main controller is equal to a preset value, so that the target eMMC resets according to the reset command.
[0110] Multiple boot data verification units are used to verify multiple boot data collected by the main controller. If each boot data passes the verification, the target eMMC is determined to have started successfully.
[0111] The return execution unit is used to determine that the target eMMC has failed to start if at least one boot data fails to pass the verification, and then return to perform the operation of adjusting the sampling timing parameters corresponding to the main controller and sending a preset start command to the target eMMC through the main controller until the target eMMC is determined to start successfully.
[0112] The Boot data acquisition unit is used to, after determining that the target eMMC has started successfully, return to the operation of sending a preset start command to the target eMMC through the main controller if the main controller needs to acquire boot data from the target eMMC again, until each boot data acquired by the main controller passes the verification.
[0113] The eMMC startup device provided in this embodiment of the invention can execute the eMMC startup method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0114] Example 4
[0115] Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention, as shown below. Figure 4 As shown, the computer device includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of processors 410 in the computer device can be one or more. Figure 4 Taking a processor 410 as an example; the processor 410, memory 420, input device 430, and output device 440 in a computer device can be connected via a bus or other means. Figure 4 Taking a bus connection as an example, the memory 420, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to an eMMC startup method in any embodiment of the present invention (e.g., the initial startup module 310, parameter adjustment module 320, acquisition module 330, and verification module 340 in an eMMC startup device). The processor 410 executes various functional applications and data processing of the computer device by running the software programs, instructions, and modules stored in the memory 420, thereby implementing the aforementioned eMMC startup method. That is, when the program is executed by the processor, it implements:
[0116] The target embedded multimedia controller (eMMC) is started up for the first time by the main controller using a forced start method.
[0117] If it is determined that the target eMMC fails to start on the first attempt, the sampling timing parameters corresponding to the main controller are adjusted, and a preset start command is sent to the target eMMC through the main controller, so that the target eMMC can start again according to the start command;
[0118] If the main controller receives boot data output by the target eMMC within a preset time interval, it will collect multiple boot data output by the target eMMC according to the adjusted sampling timing parameters.
[0119] When the main controller determines that the target eMMC has finished outputting boot data, it verifies the multiple boot data collected and determines the boot result of the target eMMC based on the verification result, until it is determined that the target eMMC has successfully booted.
[0120] The memory 420 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 420 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 420 may further include memory remotely located relative to the processor 410, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The input device 430 may be used to receive input digital or character information and generate key signal inputs related to user settings and function control of the computer device, and may include a keyboard and mouse. The output device 440 may include a display device such as a screen.
[0121] Example 5
[0122] Embodiment 5 of the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in any embodiment of the present invention. Of course, the computer-readable storage medium provided in this embodiment of the present invention can execute related operations in the eMMC startup method provided in any embodiment of the present invention. That is, when the program is executed by a processor, it implements:
[0123] The target embedded multimedia controller (eMMC) is started up for the first time by the main controller using a forced start method.
[0124] If it is determined that the target eMMC fails to start on the first attempt, the sampling timing parameters corresponding to the main controller are adjusted, and a preset start command is sent to the target eMMC through the main controller, so that the target eMMC can start again according to the start command;
[0125] If the main controller receives boot data output by the target eMMC within a preset time interval, it will collect multiple boot data output by the target eMMC according to the adjusted sampling timing parameters.
[0126] When the main controller determines that the target eMMC has finished outputting boot data, it verifies the multiple boot data collected and determines the boot result of the target eMMC based on the verification result, until it is determined that the target eMMC has successfully booted.
[0127] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0128] It is worth noting that in the above embodiment of the eMMC startup device, the various units and modules are divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0129] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A starting method of an eMMC, characterized by, The method comprises the following steps: controlling a target embedded multimedia controller (eMMC) to start up for the first time by a master controller in a forced start mode; if it is determined that the target eMMC fails to start up for the first time, adjusting a sampling timing parameter corresponding to the master controller, and sending a preset start-up command to the target eMMC by the master controller, so that the target eMMC starts up again according to the start-up command; if the master controller receives boot data output by the target eMMC within a preset time interval, collecting a plurality of boot data output by the target eMMC according to the adjusted sampling timing parameter; verifying the collected plurality of boot data by the master controller when it is determined that the target eMMC ends outputting the boot data, and determining a start-up result of the target eMMC according to a verification result until it is determined that the target eMMC starts up successfully.
2. The method of claim 1, wherein, controlling a target embedded multimedia controller (eMMC) to start up for the first time by a master controller in a forced start mode, comprising: powering on the master controller, and pulling down a preset hardware signal by the master controller, so that the target eMMC outputs boot data according to the hardware signal.
3. The method of claim 2, wherein, determining that the target eMMC fails to start up for the first time, comprising: if the master controller does not receive boot data output by the target eMMC in the process of starting up for the first time within a preset time interval, it is determined that the target eMMC fails to start up for the first time; or if the master controller determines that the boot data output by the target eMMC does not pass the verification, it is determined that the target eMMC fails to start up for the first time.
4. The method of claim 1, wherein, sending a preset start-up command to the target eMMC by the master controller, so that the target eMMC starts up again according to the start-up command, comprising: sending a reset command to the target eMMC by the master controller, so that the target eMMC resets according to the reset command; sending a mode setting command to the target eMMC by the master controller, so that the target eMMC sets a current working mode to a start-up waiting mode according to the mode setting command; sending a data transmission command to the target eMMC by the master controller, so that the target eMMC outputs a plurality of boot data according to the data transmission command.
5. The method of claim 1, wherein, determining that the target eMMC ends outputting the boot data by the master controller, comprising: judging by the master controller whether the number of the collected plurality of boot data is equal to a preset value; if yes, sending a preset reset command to the target eMMC by the master controller, so that the target eMMC resets according to the reset command.
6. The method of claim 1, wherein, verifying the collected plurality of boot data by the master controller, and determining a start-up result of the target eMMC according to a verification result until it is determined that the target eMMC starts up successfully, comprising: verifying the collected plurality of boot data by the master controller, and if each boot data passes the verification, it is determined that the target eMMC starts up successfully; If there is at least one boot data that does not pass the verification, it is determined that the target eMMC fails to start, and an operation of adjusting a sampling timing parameter corresponding to the host and sending a preset start command to the target eMMC by the host is performed until it is determined that the target eMMC starts successfully.
7. The method of claim 1, wherein, After it is determined that the target eMMC starts successfully, the method further includes: If the host needs to acquire the boot data in the target eMMC again, an operation of sending a preset start command to the target eMMC by the host is performed until each boot data collected by the host passes the verification.
8. An apparatus for booting an eMMC, the apparatus comprising: The method includes: a first start module configured to control the target eMMC to start for the first time by the host in a forced start manner; a parameter adjustment module configured to adjust a sampling timing parameter corresponding to the host and send a preset start command to the target eMMC by the host if it is determined that the target eMMC fails to start for the first time, so that the target eMMC starts again according to the start command; a collection module configured to collect a plurality of boot data output by the target eMMC according to the adjusted sampling timing parameter if the host receives the boot data output by the target eMMC within a preset time interval; a verification module configured to verify the collected plurality of boot data by the host when the target eMMC ends outputting the boot data, and determine a start result of the target eMMC according to a verification result until it is determined that the target eMMC starts successfully.
9. A computer device, comprising: one or more processors; a storage device configured to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the eMMC start method of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the eMMC start method of any one of claims 1-7.
Citation Information
Patent Citations
eMMC (embedded multi-media card) starting optimization method and device thereof
CN104182264A
EMMC (Embedded Multi Media Card) firmware start method and device
CN108196869A