Initialization method and apparatus for memory card, and device, medium and program product
By acquiring the voltage level of the detection pin and initializing it using the card scanning function, the high cost problem caused by detection pin failure was solved, enabling normal use of the memory card and reducing costs.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- XIAMEN UNISOC TECH CO LTD
- Filing Date
- 2024-12-06
- Publication Date
- 2026-04-23
AI Technical Summary
In existing technologies, when the detection pin of a memory card fails, the detection pin needs to be replaced for initialization, resulting in high costs.
By acquiring the voltage level of the detection pin, the fault condition can be determined. When the detection pin fails, the card scanning function is used to initialize the memory card, thus avoiding the need to replace the detection pin.
This technology enables the memory card to function normally even when a pin fault is detected, thus reducing costs.
Smart Images

Figure CN2024137644_23042026_PF_FP_ABST
Abstract
Description
Memory card initialization methods, devices, equipment, media, and software products
[0001] This application claims priority to Chinese Patent Application No. 202411459516.2, filed on October 18, 2024, entitled “Initialization Method, Apparatus, Device, Medium and Program Product for Memory Card”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of terminal device technology, and in particular to methods, apparatus, devices, media, and program products for initializing memory cards. Background Technology
[0003] The card tray can be used to insert memory cards. The card tray can be hot-swapped and inserted into the terminal device.
[0004] In related technologies, when a card tray is inserted into a terminal device, the voltage level of the detection pin changes. The System-on-Chip (SOC) chip in the terminal device can generate an interrupt request based on the change in voltage level, and then perform initialization processing on the memory card based on the interrupt request.
[0005] However, if the detection pin fails, the method in the related technology requires costly replacement of the detection pin so that the SOC chip can generate an interrupt request based on the voltage level change of the new detection pin, and then initialize the memory card based on the interrupt request. In other words, the method in the related technology has the problem of high cost. Summary of the Invention
[0006] This application provides a method, apparatus, device, medium, and program product for initializing a memory card, which can perform initialization processing on the memory card in the event of a pin fault, thereby reducing costs.
[0007] In a first aspect, embodiments of this application provide a method for initializing a memory card, applied to a terminal device. The terminal device includes a system-on-a-chip (SOC) chip and a card tray. The SOC chip has detection pins connected to the card tray. The card tray is used to insert a memory card. The method includes:
[0008] Obtain the voltage level of the detection pin;
[0009] Determine whether the detection pin is faulty based on the voltage level.
[0010] In the event of a pin fault, the memory card is initialized using a card scanning function.
[0011] In one implementation, determining whether the detection pin is faulty based on the voltage level includes:
[0012] Based on the level status, determine whether the detection pin has detected a preset level signal;
[0013] If so, then the detection pin is confirmed to be functioning correctly;
[0014] If not, then the detection pin is faulty.
[0015] In one implementation, the memory card is initialized using a card scanning function, including:
[0016] The memory card is initialized for the i-th time using the card scanning function, and the i-th initialization result is obtained; the i-th initialization result is either successful initialization or failed initialization.
[0017] Where i takes the values 1, 2, ..., until the initialization result of the i-th initialization is successful; the interval between each two adjacent initialization processes is a preset time.
[0018] In one implementation, the memory card is initialized for the i-th time using a card scanning function, including:
[0019] Determine the usage flag bit corresponding to the memory card;
[0020] The usage status of the memory card is determined based on the usage flag; the usage status is either idle or occupied.
[0021] When the memory card is in an idle state, the card scanning function performs the i-th initialization process.
[0022] In one implementation, the method also includes:
[0023] If the initialization result of the i-th initialization is successful, an alarm message is generated; the alarm message is used to indicate a fault in the detection pin.
[0024] Display and process alarm information.
[0025] In one implementation, the method also includes:
[0026] If the detection pin is not faulty, an interrupt request is generated;
[0027] In response to an interrupt request, the memory card is initialized using the card scan function.
[0028] Secondly, embodiments of this application provide a memory card initialization device applied to a terminal device. The terminal device includes a system-on-a-chip (SOC) chip and a card tray. The SOC chip has detection pins connected to the card tray. The card tray is used to insert a memory card. The device includes:
[0029] The acquisition module is used to acquire the voltage level of the detection pin;
[0030] The processing module is used to determine whether the detection pin is faulty based on the voltage level.
[0031] The processing module is also used to initialize the memory card through a card scanning function in the event of a pin fault.
[0032] In one implementation, the processing module is specifically used for:
[0033] Based on the level status, determine whether the detection pin has detected a preset level signal;
[0034] If so, then the detection pin is confirmed to be functioning correctly;
[0035] If not, then the detection pin is faulty.
[0036] In one implementation, the processing module is specifically used for:
[0037] The memory card is initialized for the i-th time using the card scanning function, and the i-th initialization result is obtained; the i-th initialization result is either successful initialization or failed initialization.
[0038] Where i takes the values 1, 2, ..., until the initialization result of the i-th initialization is successful; the interval between each two adjacent initialization processes is a preset time.
[0039] In one implementation, the processing module is specifically used for:
[0040] Determine the usage flag bit corresponding to the memory card;
[0041] The usage status of the memory card is determined based on the usage flag; the usage status is either idle or occupied.
[0042] When the memory card is in an idle state, the card scanning function performs the i-th initialization process.
[0043] In one implementation, the processing module is also used for:
[0044] If the initialization result of the i-th initialization is successful, an alarm message is generated; the alarm message is used to indicate a fault in the detection pin.
[0045] Display and process alarm information.
[0046] In one implementation, the processing module is also used for:
[0047] If the detection pin is not faulty, an interrupt request is generated;
[0048] In response to an interrupt request, the memory card is initialized using the card scan function.
[0049] Thirdly, this application provides a chip on which a computer program is stored, and when the computer program is executed by the chip, it implements the method as described in any of the first aspects.
[0050] Fourthly, this application provides a chip module on which a computer program is stored. When the computer program is executed by the chip module, it implements the method as described in any of the first aspects.
[0051] Fifthly, embodiments of this application provide a terminal device, including: a memory and a processor;
[0052] The memory stores instructions that the computer executes;
[0053] The processor executes computer execution instructions stored in memory, causing the processor to perform the method as described in the first aspect.
[0054] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method of the first aspect.
[0055] In a seventh aspect, embodiments of this application provide a computer program product, including computer execution instructions, which, when executed by a processor, cause the method of the first aspect to be performed.
[0056] This application provides a method, apparatus, device, medium, and program product for initializing a memory card. A terminal device includes a System-on-a-Chip (SOC) chip and a card tray. The SOC chip has a detection pin connected to the card tray; the card tray is used to insert a memory card. The method includes: the terminal device acquiring the voltage level of the detection pin and determining whether the detection pin is faulty based on the voltage level. In the event of a faulty detection pin, the terminal device can initialize the memory card using a card scanning function. The method of this application, when determining a faulty detection pin based on its voltage level, eliminates the need to replace the detection pin; it allows direct initialization of the memory card via a card scanning function, enabling normal use of the memory card and reducing costs. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this application;
[0059] Figure 2 is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;
[0060] Figure 3a is a schematic flowchart of a memory card initialization method provided in an embodiment of this application;
[0061] Figure 3b is a schematic flowchart of an initialization process provided in an embodiment of this application;
[0062] Figure 3c is a schematic diagram of another terminal device provided in an embodiment of this application;
[0063] Figure 4a is a schematic flowchart of a memory card initialization method according to an embodiment of this application;
[0064] Figure 4b is a schematic diagram of a level state change provided in an embodiment of this application;
[0065] Figure 4c is a schematic diagram of another level state change provided in an embodiment of this application;
[0066] Figure 5 is a schematic diagram of the structure of a memory card initialization device provided in an exemplary embodiment of this application;
[0067] Figure 6 is a schematic diagram of the structure of the terminal device provided in the embodiment of this application. Detailed Implementation
[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0069] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0070] In this application, "at least one" refers to one or more, and "multiple" refers to two or more. Furthermore, the word "equal to" in this application can be used with either "greater than" or "less than". When "equal to" and "greater than" are used together, the technical solution using "greater than" is adopted; when "equal to" and "less than" are used together, the technical solution using "less than" is adopted.
[0071] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this application.
[0072] Please refer to Figure 1. This application scenario includes terminal devices.
[0073] In this application scenario:
[0074] The card tray can be used to insert memory cards. The card tray can be hot-swapped and inserted into the terminal device.
[0075] In related technologies, when a card tray is inserted into a terminal device, the voltage level of the detection pin changes. The System-on-Chip (SOC) chip in the terminal device can generate an interrupt request based on the change in voltage level, and then perform initialization processing on the memory card based on the interrupt request.
[0076] However, if the detection pin fails, the method in the related technology requires costly replacement of the detection pin so that the SOC chip can generate an interrupt request based on the level change of the new detection pin, and then initialize the memory card based on the interrupt request.
[0077] The methods used in related technologies suffer from high costs.
[0078] To address the aforementioned technical issues, this application provides a memory card initialization method that eliminates the need to replace the detection pin. If a fault is detected based on the pin's voltage level, the memory card can be directly initialized using a card scanning function, enabling normal use of the memory card and reducing costs.
[0079] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0080] Figure 2 is a schematic diagram of the structure of a terminal device provided in an embodiment of this application.
[0081] Please refer to Figure 2. The terminal device is equipped with an SOC chip 10 and a card tray 20.
[0082] The SOC chip 10 has a detection pin 11.
[0083] The detection pin 11 is connected to the card tray 20. In one implementation, the terminal device may include a card slot (not shown in Figure 2). The card slot can be used to insert the card tray 20. The detection pin 11 can be disposed in the card slot of the terminal device to connect with the card tray 20.
[0084] Card tray 20 is used to insert memory card 21.
[0085] SOC chip 10 can be used to acquire the level state of detection pin 11.
[0086] SOC chip 10 can determine whether the detection pin 11 is faulty based on the voltage level.
[0087] In the event of a fault in pin 11, the SOC chip 10 can initialize the memory card 21 using a card scanning function.
[0088] It should be noted that the memory card 21 can be a Secure Digital (SD) card or other devices with storage functions; this application embodiment does not limit this.
[0089] It should be noted that the execution subject of the following method embodiments is a terminal device, and more specifically, a SOC chip in the terminal device.
[0090] Figure 3a is a schematic flowchart of a memory card initialization method according to an embodiment of this application. Referring to Figure 3a, the method includes:
[0091] S301: Obtain the level status of the detection pin.
[0092] First, the voltage level of the detection pin will be explained.
[0093] In one implementation:
[0094] If the detection pin is not faulty, when the card tray is inserted into the terminal device (card tray in place), the level state of the detection pin changes from low level to high level.
[0095] In the event of a detection pin malfunction, the detection pin will be in a low-level state when the card tray is inserted into the terminal device (the terminal device's card slot). For example, a detection pin malfunction could be caused by moisture in the air, resulting in a short circuit.
[0096] In one implementation:
[0097] If the detection pin is not faulty, when the card tray is inserted into the terminal device (card tray in place), the level state of the detection pin changes from high level to low level.
[0098] In the event of a faulty detection pin, the detection pin will be in a high-level state when the card tray is inserted into the terminal device (card tray in place).
[0099] In this embodiment, the terminal device can acquire the level state of the detection pin.
[0100] In one implementation, when the cassette is already inserted into the terminal device, the terminal device can obtain the voltage level of the detection pin.
[0101] S302: Determine whether the detection pin is faulty based on the level status.
[0102] In this embodiment, the terminal device can determine whether the detection pin is faulty based on the level state of the detection pin.
[0103] In one implementation:
[0104] The terminal device can determine whether the detection pin has detected a preset level signal based on the level status.
[0105] If so, then the detection pin is confirmed to be functioning correctly.
[0106] If not, then the detection pin is faulty.
[0107] It should be noted that the preset level signal can be a rising edge signal, a falling edge signal, a high level signal, or a low level signal. This application embodiment does not limit the preset level signal.
[0108] S303: In the event of a pin fault, the memory card is initialized using the card scan function.
[0109] In this embodiment, the terminal device can initialize the memory card using a card scanning function in the event of a pin fault. It should be noted that the card scanning function can also be called an interrupt service function.
[0110] In essence, this means that the SOC chip in the terminal device initializes the memory card using a card scan function when a pin fault is detected. More specifically, it means that the processor in the SOC chip initializes the memory card using a card scan function when a pin fault is detected.
[0111] The following section explains the process by which the terminal device initializes the memory card using the card scanning function.
[0112] In one implementation:
[0113] In the event of a pin fault, the terminal device can perform the i-th initialization process on the memory card using a card scanning function, obtaining the i-th initialization result. The i-th initialization result indicates either successful or failed initialization.
[0114] It should be noted that i takes the values 1, 2, ... in sequence until the initialization result of the i-th term is successful.
[0115] It should also be noted that a preset time interval is maintained between two adjacent initialization processes. For example, the preset time interval can be 1 second. That is, the terminal device can sleep for 1 second if initialization fails. The terminal device can then perform the initialization process after sleeping for 1 second.
[0116] In another implementation, the terminal device can generate an alarm message if the i-th initialization result is successful. The terminal device can then display the alarm message, which indicates a fault in the detection pin.
[0117] It should be noted that when the card tray is inserted into the terminal device, the terminal device can initialize the memory card (initialization successful); when the card tray is not inserted into the terminal device, the terminal device cannot initialize the memory card (initialization fails). Therefore, if initialization is successful, the terminal device can determine that the card tray is inserted into the terminal device and that the detection pin is faulty. The terminal device can issue an alarm to remind the user to replace the detection pin in a timely manner.
[0118] The following section explains the process by which the terminal device performs the i-th initialization of the memory card using the card scanning function.
[0119] In one implementation:
[0120] The terminal device can determine the usage flag bit corresponding to the memory card. For example, the usage flag bit can be 0 or 1.
[0121] The terminal device can determine the usage status of the memory card based on the usage flag. The usage status can be either idle or occupied.
[0122] The terminal device can perform the i-th initialization process on the memory card by scanning the card function when the memory card is in an idle state.
[0123] The following section, with reference to Figure 3b, describes a specific implementation process of how a terminal device initializes a memory card using a card scanning function.
[0124] Figure 3b is a schematic flowchart of an initialization process provided in an embodiment of this application. As shown in Figure 3b:
[0125] ① For the i-th initialization process, the terminal device initializes the memory card using the card scanning function to obtain the i-th initialization result. It should be noted that i is 1 in the first initialization process.
[0126] ② The terminal device determines whether the initialization result of the i-th step is successful. If yes, the process ends; otherwise, step ③ is executed.
[0127] ③The terminal device increments i by 1 after a preset time interval.
[0128] It should be noted that after executing step ③, the terminal device can return to execute step ①.
[0129] The following section uses an initialization process as an example to explain how a terminal device initializes a memory card using a card scanning function.
[0130] Terminal devices can send a soft reset command to the memory card through the card scanning function.
[0131] Terminal devices can obtain the type and operating mode of a memory card through a card scanning function. In one implementation, the terminal device can send a query command to the memory card through the card scanning function. The terminal device can then obtain the response data sent by the memory card through the card scanning function and determine the type and operating mode of the memory card based on the response data.
[0132] Terminal devices can use a card scanning function to determine the corresponding initialization command based on the type and operating mode of the memory card, and then perform initialization settings on the memory card according to the initialization command. These initialization commands include, but are not limited to, clock frequency setting commands, protocol setting commands, and block size setting commands.
[0133] Additionally, the terminal device can use a card scanning function to obtain the response data sent by the memory card, and then determine the initialization result based on the response data and the value of the memory card's corresponding status register. The initialization result is either successful or failed. It should be noted that the response data is sent by the memory card based on the initialization command.
[0134] S304: Generates an interrupt request if the detection pin is not faulty.
[0135] S305: In response to an interrupt request, initialize the memory card using the card scan function.
[0136] In this embodiment, the terminal device can generate an interrupt request if the detection pin is not faulty. In response to the interrupt request, the terminal device can initialize the memory card using a card scanning function.
[0137] In one implementation:
[0138] Figure 3c is a schematic diagram of another terminal device provided in an embodiment of this application. As shown in Figure 3c, the SOC chip 10 is provided with a detection pin 11 and a processor 12. The processor 12 is provided with a conversion circuit 121 and an external interrupt controller 122.
[0139] Based on the aforementioned terminal device structure, the following section provides a detailed explanation of the process by which the terminal device generates an interrupt request and, in response to the interrupt request, initializes the memory card using a card scanning function.
[0140] The terminal device can convert a preset level signal into a digital signal using a conversion circuit in the processor. The preset level signal is detected by a detection pin. Understandably, the preset level signal is an analog signal.
[0141] Terminal devices can generate interrupt requests based on digital signals through an external interrupt controller in the processor.
[0142] The terminal device can initialize the memory card through the card scanning function in response to an interrupt request via the processor.
[0143] The beneficial effects of this embodiment are as follows: In this embodiment, the terminal device can acquire the voltage level of the detection pin. The terminal device can determine whether the detection pin is faulty based on the voltage level. In the event of a detection pin failure, the terminal device can initialize the memory card using a card scanning function. The method of this embodiment eliminates the need for costly replacement of the detection pin. When a fault is determined based on the voltage level of the detection pin, the memory card can be directly initialized using a card scanning function, thus enabling normal use of the memory card and reducing costs.
[0144] Figure 4a is a schematic flowchart of a memory card initialization method according to an embodiment of this application. Referring to Figure 4a, the method includes:
[0145] S401: Obtain the level status of the detection pin.
[0146] In this embodiment, the terminal device can acquire the level state of the detection pin.
[0147] In one implementation, the terminal device can acquire the level state of the detection pin even when the card tray is already inserted into the terminal device.
[0148] S402: Determine whether the detection pin has detected a preset level signal based on the level status.
[0149] In this embodiment, the terminal device can determine whether the detection pin has detected a preset level signal based on the level state of the detection pin.
[0150] If not, then execute S403;
[0151] If so, then execute S405.
[0152] The following section explains the process by which the terminal device determines whether a preset level signal has been detected by the detection pin based on the level state.
[0153] In one implementation:
[0154] When the detection pin is functioning correctly and the card tray is inserted into the terminal device (card tray in position), the detection pin's voltage level changes from low to high. The preset voltage level signal can be a rising edge signal or a high voltage signal.
[0155] In this embodiment, after acquiring the level state of the detection pin, the terminal device can determine that the detection pin has detected a preset level signal when the level state of the detection pin changes from a low level state to a high level state.
[0156] In one implementation:
[0157] When the detection pin is functioning correctly and the card tray is inserted into the terminal device (card tray in position), the detection pin's voltage level changes from high to low. The preset voltage level signal can be a falling edge signal or a low voltage signal.
[0158] In this embodiment, after acquiring the level state of the detection pin, the terminal device can determine that the detection pin has detected a preset level signal when the level state of the detection pin changes from a high level state to a low level state.
[0159] S403: Determines a fault in the detection pin.
[0160] In this embodiment, the terminal device can determine that the detection pin is faulty if it determines that the detection pin does not detect a preset level signal.
[0161] The following section explains how to determine the cause of a detection pin failure when the terminal device determines that the detection pin has not detected a preset level signal.
[0162] In one implementation:
[0163] Figure 4b is a schematic diagram of a level state change provided in an embodiment of this application.
[0164] As shown in Figure 4b, when the detection pin is not faulty: when the card tray is not in place, the detection pin's voltage level is low; when the card tray is in place, the detection pin's voltage level is high. That is, at the moment (t) when the card tray is inserted into the terminal device, the detection pin's voltage level changes from low to high. Correspondingly, the preset voltage level signal can be a rising edge signal or a high voltage level signal.
[0165] If the detection pin does not detect the preset level signal when the card tray is inserted into the terminal device (card tray in place), it means that the level state of the detection pin has not changed from a low level state to a high level state, that is, the detection pin is faulty.
[0166] In one implementation:
[0167] Figure 4c is a schematic diagram illustrating another level state change provided in an embodiment of this application. As shown in Figure 4c, when the detection pin is not faulty: when the card tray is not in place, the level state of the detection pin is high; when the card tray is in place, the level state of the detection pin is low. That is, at the moment (t) when the card tray is inserted into the terminal device, the level state of the detection pin changes from high to low. Accordingly, the preset level signal can be a falling edge signal or a low level signal.
[0168] If the detection pin does not detect the preset level signal when the card tray is inserted into the terminal device (card tray in place), it means that the level state of the detection pin has not changed from a high level state to a low level state, that is, the detection pin is faulty.
[0169] S404: In the event of a pin fault, the memory card is initialized using the card scan function.
[0170] In this embodiment, the terminal device can initialize the memory card by scanning the card function if a pin fault is detected.
[0171] Its specific implementation process is the same as that of S303, and will not be described in detail here.
[0172] S405: Confirmed that the detection pin is not faulty.
[0173] In this embodiment, the terminal device can determine that the detection pin is not faulty if it detects a preset level signal on the detection pin.
[0174] S406: Generates an interrupt request if the detection pin is not faulty.
[0175] S407: In response to an interrupt request, initialize the memory card using the card scan function.
[0176] In this embodiment, the terminal device can generate an interrupt request if the detection pin is not faulty. In response to the interrupt request, the terminal device can initialize the memory card using a card scanning function.
[0177] The specific implementation process is the same as that of S304 and S305, and will not be described in detail here.
[0178] The beneficial effects of this embodiment are as follows: In this embodiment, the terminal device can acquire the level state of the detection pin and determine whether the detection pin has detected a preset level signal based on the level state. If not, the terminal device can determine that the detection pin is faulty and initialize the memory card through the card scanning function; if so, the terminal device can determine that the detection pin is not faulty, generate an interrupt request, and initialize the memory card through the card scanning function in response to the interrupt request. The method of this embodiment improves the fault detection efficiency of the detection pin by determining whether the detection pin has detected a preset level signal. In addition, in the case of a faulty detection pin, the method of this embodiment does not require costly replacement of the detection pin and can directly initialize the memory card through the card scanning function, realizing the normal use of the memory card and reducing costs.
[0179] Figure 5 is a schematic diagram of a memory card initialization device provided in an exemplary embodiment of this application. The memory card initialization device 50 is applied to a terminal device, which includes a system-on-a-chip (SOC) chip and a card tray. The SOC chip has detection pins connected to the card tray; the card tray is used to insert a memory card.
[0180] Please refer to Figure 5. The memory card initialization device 50 includes an acquisition module 51 and a processing module 52.
[0181] in,
[0182] Acquisition module 51 is used to acquire the level state of the detection pin;
[0183] Processing module 52 is used to determine whether the detection pin is faulty based on the level status;
[0184] The processing module 52 is also used to initialize the memory card through a card scanning function in the event of a pin fault.
[0185] The memory card initialization device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0186] In one implementation, the processing module 52 is specifically used for:
[0187] Based on the level status, determine whether the detection pin has detected a preset level signal;
[0188] If so, then the detection pin is confirmed to be functioning correctly;
[0189] If not, then the detection pin is faulty.
[0190] The memory card initialization device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0191] In one implementation, the processing module 52 is specifically used for:
[0192] The memory card is initialized for the i-th time using the card scanning function, and the i-th initialization result is obtained; the i-th initialization result is either successful initialization or failed initialization.
[0193] Where i takes the values 1, 2, ..., until the initialization result of the i-th initialization is successful; the interval between each two adjacent initialization processes is a preset time.
[0194] The memory card initialization device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0195] In one implementation, the processing module 52 is specifically used for:
[0196] Determine the usage flag bit corresponding to the memory card;
[0197] The usage status of the memory card is determined based on the usage flag; the usage status is either idle or occupied.
[0198] When the memory card is in an idle state, the card scanning function performs the i-th initialization process.
[0199] The memory card initialization device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0200] In one implementation, the processing module 52 is further configured to:
[0201] If the initialization result of the i-th initialization is successful, an alarm message is generated; the alarm message is used to indicate a fault in the detection pin.
[0202] Display and process alarm information.
[0203] The memory card initialization device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0204] In one implementation, the processing module 52 is further configured to:
[0205] If the detection pin is not faulty, an interrupt request is generated;
[0206] In response to an interrupt request, the memory card is initialized using the card scan function.
[0207] The memory card initialization device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0208] This application also provides a chip. It is understood that this chip can be a 5G chip.
[0209] The chip stores a computer program, and when the computer program is executed by the chip, it implements the method as described in the above method embodiment.
[0210] This application also provides a chip module. It is understood that this chip module can be a 5G chip module.
[0211] The chip module stores a computer program, and when the computer program is executed by the chip module, it implements the method as described in the above method embodiment.
[0212] Figure 6 is a schematic diagram of the structure of the terminal device provided in an embodiment of this application. It can be understood that the terminal device can be a 5G chip module.
[0213] Referring to Figure 6, the terminal device 60 may include a processor 61 and a memory 62. Exemplarily, the processor 61 and the memory 62 are interconnected via a bus 63.
[0214] Memory 62 stores instructions executed by the computer;
[0215] The processor 61 executes computer execution instructions stored in the memory 62, causing the processor 61 to perform the method as shown in the above method embodiment.
[0216] All or part of the steps in the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-described method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0217] Accordingly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described in the above-described method embodiments.
[0218] Accordingly, embodiments of this application may also provide a computer program product, including computer execution instructions, which, when executed by a processor, cause the method shown in the above method embodiments to be executed.
[0219] These computer-executable instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0220] These computer-executable instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0221] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
[0222] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
Claims
1. An initialization method of a memory card, characterized by, The invention is applied to a terminal device, which includes a system-on-a-chip (SOC) chip and a card tray. The SOC chip has detection pins that are connected to the card tray. The card tray is used to insert the memory card; the method includes: Obtain the voltage level of the detection pin; Based on the stated voltage level, determine whether the detection pin is faulty; In the event of a fault in the detection pin, the memory card is initialized using a card scanning function.
2. The method of claim 1, wherein, Determining whether the detection pin is faulty based on the stated voltage level includes: Based on the level state, determine whether the detection pin has detected a preset level signal; If so, then the detection pin is confirmed to be functioning correctly; If not, then the detection pin is determined to be faulty.
3. The method according to claim 1 or 2, characterized in that, The memory card is initialized using a card scanning function, including: The memory card is initialized for the i-th time using the card scanning function to obtain the i-th initialization result; the i-th initialization result is either successful initialization or failed initialization. Wherein, i takes the values 1, 2, ..., until the i-th initialization result is successful; a preset time interval is between each two adjacent initialization processes.
4. The method of claim 3, wherein, The memory card is initialized for the i-th time using the card scanning function, including: Determine the usage flag bit corresponding to the memory card; The usage status of the memory card is determined based on the usage flag bit; the usage status is either idle or occupied. When the usage state is the idle state, the memory card is initialized for the i-th time by the card scanning function.
5. The method of claim 3, wherein, The method further includes: If the i-th initialization result is successful, an alarm message is generated; the alarm message is used to indicate a fault in the detection pin. The alarm information is displayed.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: If the detection pin is not faulty, an interrupt request is generated; In response to the interrupt request, the memory card is initialized using the card scanning function.
7. An initialization apparatus of a memory card, characterized by comprising: The invention is applied to a terminal device, which includes a system-on-a-chip (SOC) chip and a card tray. The SOC chip has detection pins that are connected to the card tray. The card tray is used to insert the memory card; the device includes: An acquisition module is used to acquire the voltage level of the detection pin; The processing module is used to determine whether the detection pin is faulty based on the level state. The processing module is also used to initialize the memory card by means of a card scanning function in the event of a fault in the detection pin.
8. A terminal device, comprising: include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method described in any one of claims 1-6.
10. A computer program product, characterised in that, Includes computer execution instructions, which, when executed by a processor, cause the method described in any one of claims 1-6 to be performed.
Citation Information
Patent Citations
Method and equipment for recovering exceptions for secure digital memory card
CN104699418A
Safe power-on initialization method and device, equipment and storage medium
CN116758856A
Fault detection in integrated circuit chips and in circuit cards and systems including such chips
EP0028091A1
Memory card and initialization setting method thereof
US20060248388A1
Method for controlling timing controller chip of display panel, and display panel
US20210210029A1