UFS Self-Testing Method, Electronic Device, and Storage Medium
By adding frame detection module to the UFS receiver and adjusting the reception capability, the reception error problem of the UFS receiver when exiting the sleep state is solved, and the stability and compatibility of UFS communication are improved.
Patent Information
- Application Number
- CN202510361185.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-03-26
AI Technical Summary
In UFS communication, the UFS receiver may not be ready when exiting the sleep state, resulting in communication failure, and the reception capacity is fixed after exiting the sleep state, so the link cannot be reconstructed through the retransmission mechanism.
The frame detection module is added to the UFS receiving end, and receives the verification frames sent by the UFS sending end, and compares the verification frames with the reception capability of the receiving end through the frame detection module. When the comparison is incorrect, the reception capability of the receiver is adjusted, and a negative reply message is sent to the UFS sender to re-receive the verification frame.
Through the comparison of the frame detection module and the adjustment of the reception capacity, the reception error problem of the UFS receiver when exiting the sleep state can be solved in a timely manner, avoid cyclic reception, and improve the stability and compatibility of UFS communication.
Smart Images

Figure CN119883744B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technologies, and in particular, to a UFS self-detection method, an electronic device, and a storage medium. Background Art
[0002] In the development of electronic devices and embedded systems, Universal Flash Storage (UFS) plays a crucial role. It aims to provide faster data read and write speeds and higher efficiency than traditional storage media such as Embedded Multi Media Card (eMMC), and is particularly suitable for smartphones, tablets, and other portable devices.
[0003] In the JEDEC220x UFS protocol, a hibernate mode (HIBERATE8) is defined. When in this mode, the device will be in a defined hibernation state. When the UFS transmitter needs to perform other operations on the UFS receiver in the hibernation state, it needs to exit the hibernation state first. If the UFS receiver is not ready when exiting the hibernation state, communication failure will occur and a retransmission process needs to be carried out. The receiving ability of the UFS receiver will be fixed after exiting the hibernation state, and even with a retransmission mechanism, the reconstruction of the link cannot be achieved. In the current related technologies, the UFS control receiver compares the first frame data received when exiting the hibernation state. When the comparison is incorrect, an NAC message is sent to the UFS transmitter to make the UFS transmitter resend the operation frame message. However, without an adaptive function, the equalizer parameters for receiving frame messages of the UFS receiver will be fixed, and the re-received data frames will still be received incorrectly. Summary of the Invention
[0004] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of protection of the claims.
[0005] Embodiments of this application provide a UFS self-detection method, an electronic device, and a storage medium, which can improve the compatibility and stability of UFS communication.
[0006] In a first aspect, embodiments of this application provide a UFS self-detection method, which is applied to a UFS receiver. The UFS receiver is connected to a UFS transmitter. The UFS receiver includes a frame detection module. The method includes:
[0007] Receiving a check frame sent by the UFS transmitter and transmitting the check frame to the frame detection module;
[0008] Comparing, by the frame detection module, the check frame with the receiving ability of the UFS receiver;
[0009] When the comparison of the check frame is incorrect, adjust the receiving capability of the UFS receiving end and send a negative acknowledgment message to the UFS sending end;
[0010] Receive the check frame sent by the UFS sending end again.
[0011] According to the method provided by some feasible embodiments of the present application, the method further includes:
[0012] When the comparison of the check frame is correct, send a response frame to the UFS sending end;
[0013] Receive the data frame sent by the UFS sending end.
[0014] According to the method provided by some feasible embodiments of the present application, before receiving the check frame sent by the UFS sending end, the method further includes:
[0015] Respond to the instruction of the UFS sending end to exit the sleep state and exit the sleep state.
[0016] According to the method provided by some feasible embodiments of the present application, the comparison of the check frame with the receiving capability of the UFS receiving end by the frame detection module includes:
[0017] Compare the frequency of the check frame with the transmission mode and transmission rate of the UFS receiving end;
[0018] When the frequency of the check frame does not correspond to the transmission mode or the transmission rate, the comparison of the check frame is incorrect.
[0019] According to the method provided by some feasible embodiments of the present application, the adjustment of the receiving capability of the UFS receiving end includes:
[0020] Adjust the parameters of the continuous-time linear equalizer of the UFS receiving end;
[0021] Adjust the parameters of the decision feedback equalizer of the UFS receiving end.
[0022] In a second aspect, an embodiment of the present application provides a UFS self-detection method, which is applied to a UFS sending end. The UFS sending end is connected to a UFS receiving end, and the UFS receiving end includes a frame detection module. The method includes:
[0023] Send a check frame to the UFS receiving end;
[0024] When receiving the negative acknowledgment message sent by the UFS receiving end, resend the check frame to the UFS receiving end;
[0025] Wherein, the negative response information is sent by the UFS receiver when the check frame and the receiving capability of the UFS receiver are compared by the frame detection module and the comparison of the check frame is incorrect.
[0026] According to the method provided by some feasible embodiments of the present application, the method further includes:
[0027] In response to receiving the response frame sent by the UFS receiver, sending a data frame to the UFS receiver;
[0028] The response frame is sent by the UFS receiver when the check frame and the receiving capability of the UFS receiver are compared by the frame detection module and the comparison of the check frame is correct.
[0029] According to the method provided by some feasible embodiments of the present application, before sending the check frame to the UFS receiver, the method further includes:
[0030] Exiting the sleep state and sending an instruction to exit the sleep state to the UFS receiver.
[0031] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0032] At least one processor;
[0033] At least one memory for storing at least one program;
[0034] When at least one of the at least one program is executed by at least one of the at least one processor, the method described in the first aspect or the second aspect of the present application is implemented.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program executable by a processor is stored, and when the computer program executable by the processor is executed by the processor, the method described in the first aspect or the second aspect of the present application is implemented.
[0036] The embodiments of the present application at least include the following beneficial effects:
[0037] In the embodiment of the present application, a frame detection module is added to the UFS receiving end for UFS communication. After the UFS receiving end receives the check frame sent by the UFS sending end, the frame detection module compares the check frame with the receiving capability of the UFS receiving end. When the comparison of the check frame is incorrect, the receiving capability of the UFS receiving end is adjusted, and a negative acknowledgment message is sent to the UFS sending end. After receiving the negative acknowledgment message, the UFS sending end sends the check frame again to the UFS receiving end with the adjusted receiving capability. Through the UFS receiving end with a frame detection module, the embodiment of the present application can timely compare the check frame sent by the UFS sending end. When an incorrect comparison occurs, the receiving capability of the receiving end is timely adjusted, and a negative acknowledgment message is sent to the UFS sending end. The UFS sending end can re-send the check frame to the adjusted UFS receiving end, and the receiving capability of the adjusted UFS receiving end can be correctly compared with the check frame, so as to realize subsequent UFS communication, avoid the situation of incorrect frame message reception and falling into cyclic reception when exiting the sleep state, and improve the stability and compatibility of UFS communication.
[0038] Other features and advantages of the present application will be described in the following specification, and part of them will be obvious from the specification, or will be understood by implementing the present application. The objectives and other advantages of the present application can be realized and obtained through the structures specifically pointed out in the specification and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings are used to provide a further understanding of the technical solutions of the present application, and constitute a part of the specification. They are used together with the embodiments of the present application to explain the technical solutions of the present application, and do not constitute a limitation to the technical solutions of the present application.
[0040] Figure 1 It is a schematic structural diagram of a UFS device;
[0041] Figure 2 It is a schematic structural diagram of a UFS device provided by an embodiment of the present application;
[0042] Figure 3 It is a schematic step diagram of a UFS self-detection method provided by an embodiment of the present application;
[0043] Figure 4 For an embodiment of the present application Figure 3 It is a specific step diagram of step S120;
[0044] Figure 5 For an embodiment of the present application Figure 3 It is a specific step diagram of step S130;
[0045] Figure 6 It is a schematic step diagram of another UFS self-detection method provided by an embodiment of the present application;
[0046] Figure 7 Schematic diagram of an electronic device provided by an embodiment of the present application. Specific implementation manners
[0047] The present application will be further described below in conjunction with the accompanying drawings of the specification and specific embodiments. The described embodiments should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0048] In the following description, "some embodiments" are involved, which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0050] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are described. The nouns and terms involved in the embodiments of the present application are applicable to the following explanations.
[0051] Universal Flash Storage (UFS) is a storage standard designed specifically for consumer electronic products that require high performance and low-power operation. It aims to provide faster data read and write speeds and higher efficiency than traditional storage media such as eMMC (Embedded Multimedia Card), and is particularly suitable for smartphones, tablets, and other portable devices. UFS uses a serial interface and full-duplex mode, which means it can perform read and write operations simultaneously, while eMMC uses a parallel interface and only supports half-duplex mode. In addition, UFS also supports Command Queue (CQ), allowing more efficient management of multiple I / O requests, further enhancing the performance of random read and write.
[0052] In the JEDEC220x UFS protocol, a hibernate mode (HIBERATE8) is defined. When in this mode, the state machine of Unipro will also be in the defined HIBERATE state, and MIPI MPHY will also be in the defined HIBERATE state. The voltage level on the differential line will be in the DIF-Z (A weak zero differential voltage) state.
[0053] Please refer to Figure 1, is a schematic structural diagram of a UFS device, as Figure 1 shown, the structure of the original UFS device 100 includes:
[0054] 1) Device Manager:
[0055] The Device Manager is responsible for managing the overall operations of the UFS device, including device initialization, power management, error handling, etc.; the Device Manager communicates with the UFS Application Layer through the service access point UDM_SAP.
[0056] 2) UFS Application Layer (UAP):
[0057] The UAP processes commands and transactions related to the UFS protocol and contains two service access points (SAPs): UTP_CMD_SAP (for command transmission) and UTP_TM_SAP (for transaction management).
[0058] 3) UFS Transport Protocol Layer (UTP):
[0059] The UTP layer is responsible for transmitting data between the UFS device and the host; it communicates with the Device Manager through the UIO_SAP and with the UFS InterConnect Layer through the UIC_SAP.
[0060] 4) UFS InterConnect Layer (UIC):
[0061] The UIC layer is responsible for establishing connections between different modules inside the UFS device; it communicates with the MIPI Unipro layer through the Cprot interface.
[0062] 5) MIPI Unipro:
[0063] MIPI Unipro is a protocol defined by the MIPI Alliance for implementing communication between different modules in mobile devices; it communicates with the M-PHY layer through the RMMI interface.
[0064] 6) MIPI M-PHY:
[0065] M-PHY is a physical layer interface defined by the MIPI Alliance for high-speed data transmission. It consists of two parts, M-TX (transmitter) and M-RX (receiver), which are responsible for data transmission and reception respectively. M-PHY communicates with external devices through TX and RX pins.
[0066] 7) UDM_SAP: The service access point between the device manager and the UFS application layer.
[0067] 8) UIO_SAP: The service access point between the device manager and the UFS transport protocol layer.
[0068] 9) UIC_SAP: The service access point between the UFS transport protocol layer and the UFS interconnection layer.
[0069] 10) Cprot interface: The interface between the UFS interconnection layer and the MIPI Unipro layer.
[0070] 11) RMMI interface: The interface between the MIPI Unipro layer and the M-PHY layer.
[0071] A sleep mode (HIBERATE8) is defined in the JEDEC220x UFS protocol. When in this mode, the state of Unipro will be in the defined sleep state, and MIPI MPHY will also be in the defined sleep state. The voltage on the differential line will be in the DIF-Z (A weak zero differential voltage) state. The UFS transmitter initiates the operation to enter HIBERATE8. After the UFS receiver successfully responds to HIBERATE8, both the UFS transmitter and the UFS receiver will enter the HIBERATE8 sleep state. At this time, the voltage on the differential line connecting the UFS transmitter and the UFS receiver will jump to DIF-Z. When the UFS transmitter needs to perform other operations on the UFS receiver, it will first initiate the operation to exit HIBERATE8, and the UFS transmitter will first send an AFC TC frame to the UFS receiver. After the UFS receiver receives the AFC TC frame, it will send the corresponding AFC TC frame to the UFS transmitter. After the interaction of the AFC TC frame is completed, the entire process of exiting HIBERATE8 is completed.
[0072] When the UFS sender needs to perform other operations on the UFS receiver in the sleep state, it needs to exit the sleep state first. If the UFS receiver is not ready when exiting the sleep state, it will cause communication failure and require a retransmission process. The receiving ability of the UFS receiver will be fixed after exiting the sleep state, and even with a retransmission mechanism, the reconstruction of the link cannot be achieved. In the current related technologies, by controlling the UFS receiver to perform a comparison operation on the first frame data received when exiting the sleep state, when the comparison fails, an NAC message is sent to the UFS sender to make the UFS sender re-send the operation frame message. However, without an adaptive function, the equalizer parameters for receiving frame messages of the UFS receiver will be fixed, and the re-received data frames will still be received incorrectly.
[0073] Based on this, the embodiments of the present application provide a UFS self-detection method, an electronic device, and a storage medium, which can improve the compatibility and stability of UFS communication.
[0074] Please refer to Figure 2 , which is a schematic structural diagram of a UFS device provided by an embodiment of the present application. As Figure 2 shown, in the embodiments of the present application, the existing UFS device 200 has added a frame check module, and the frame check module is used to perform frequency check during the data sending process. When the UFS receiver receives frame data from the UFS transmitter, it will first send the frame data to the frame check module for comparison to ensure that the frame data is consistent with the frequency of the UFS receiver and avoid incorrect situations.
[0075] Please refer to Figure 3 , which is a schematic step diagram of a UFS self-detection method provided by an embodiment of the present application. As Figure 3 shown, in the embodiments of the present application, the UFS self-detection method applied to the UFS receiver connected to the UFS sender may include but is not limited to steps S110 to S140.
[0076] It should be noted that in the embodiments of the present application, the UFS sender is generally a UFS host (UFS-HOST), and the UFS receiver is generally a UFS device (UFS-DEVICE). The UFS host may include but is not limited to smartphones, laptop computers, and PCs, embedded systems, servers and data storage devices, game consoles, etc. The UFS device may include but is not limited to: UFS storage chips, built-in storage of smartphones, UFS memory cards (removable memory cards), solid-state drives (SSDs), automotive storage devices, storage in consumer electronic devices, etc.
[0077] Step S110: Receive the check frame sent by the UFS sender and transmit the check frame to the frame detection module.
[0078] It should be noted that in the embodiments of the present application, the check frames sent by the UFS transmitter are AFC TC0 and AFC TC1, that is, the first two frames of the frame data. AFC TC0 and AFC TC1 are sent as check frames to the UFS receiver, and the UFS receiver is used to judge the frequency.
[0079] When the check frame is received, it is transmitted to the frame detection module, so that the frame detection module can compare the check frame before communication to take corresponding measures to avoid the situation of receiving errors.
[0080] Step S120: Compare the check frame with the receiving ability of the UFS receiver through the frame detection module.
[0081] In the embodiments of the present application, the frame detection module compares through AFC TC0 and AFC TC1 to determine whether the check frame matches the receiving ability of the UFS receiver.
[0082] Exemplarily, referring to Figure 4 , in the embodiments of the present application, step S120 may include but is not limited to step S121 and step S122:
[0083] Step S121: Compare the frequency of the check frame with the transmission mode and transmission rate of the UFS receiver;
[0084] Step S122: When the frequency of the check frame does not correspond to at least one of the transmission mode and transmission rate, the comparison of the check frame is incorrect.
[0085] AFC TC0 and AFC TC1 frames are control frames used to transmit frequency adjustment information in UFS communication, mainly for the measurement and adjustment of frequency offset. They have the following functions respectively:
[0086] AFC TC0 frame: Usually used to start the frequency calibration process and provide a preliminary estimate of the frequency offset. It carries the frequency offset estimated by the transmitter and transmits this information to the receiver.
[0087] AFC TC1 frame: Used for fine frequency calibration and further optimization of frequency synchronization. Through the AFC TC1 frame, the transmitter can refine its estimated value of the frequency offset to ensure that the frequencies between the two devices are more accurately aligned.
[0088] Specifically, in a feasible embodiment of the present application, in the verification frames AFC TC0 and AFC TC1, when the UFS receiver receives AFC TC0, it performs initialization frequency synchronization according to AFC TC0 to determine the offset of the current frequency. Subsequently, the UFS receiver receives AFC TC1 to confirm the frequency synchronization status, and determines the frequency offset between the UFS transmitter and the UFS receiver through the frequency synchronization results of AFC TC0 and AFC TC1.
[0089] In one embodiment, when the verification frame received by the UFS receiver corresponds to the current transmission mode and transmission rate, the comparison is correct, which means the following situations:
[0090] (1) Frequency consistency: The receiving frequency of the UFS receiver is aligned with the frequency of the UFS transmitter. The frequency values calibrated by the UFS transmitter through the AFC TC0 and AFC TC1 frames are fully matched with the receiving capabilities of the UFS receiver.
[0091] (2) Transmission mode consistency: The transmission mode can refer to the modulation method, coding method, data rate, etc. of the signal. The frequency of the verification frame is compatible with the current transmission mode, indicating that the system operates at an appropriate frequency and supports the expected data rate.
[0092] (3) Error-free: Since the frequency matches the transmission mode, the UFS receiver can accurately decode the verification frame and avoid the reception of incorrect data caused by frequency mismatch.
[0093] In the above three situations, the data transmission process is stable, and the UFS receiver can continuously receive and process data without additional correction.
[0094] However, when one of the above three situations is not satisfied (i.e., the non-corresponding situation), the comparison is incorrect, and then step S130 needs to be performed.
[0095] Step S130: When the verification frame comparison is incorrect, adjust the receiving capabilities of the UFS receiver and send a negative acknowledgment message to the UFS transmitter.
[0096] Refer to Figure 5 In one embodiment of the present application, step S130 includes the following steps:
[0097] Step S131: Adjust the parameters of the continuous-time linear equalizer of the UFS receiver;
[0098] Among them, the continuous-time linear equalizer (CTLE) is mainly used for frequency response compensation of signals. Especially during high-frequency signal transmission, it suppresses signal distortion caused by channel loss, attenuation, or high-frequency noise. CTLE improves the quality and stability of signals by adjusting the gain-frequency characteristics.
[0099] Through gain adjustment, CTLE compensates for the low-frequency and high-frequency parts of the signal, restores the spectral characteristics of the signal, especially the signal loss in the high-frequency band. It uses a linear filtering-based method to compensate for the distorted parts of the signal and reduce signal degradation caused by factors such as channel attenuation and reflection.
[0100] The adjustment of CTLE usually involves the following aspects:
[0101] Gain setting: CTLE compensates for signal attenuation by adjusting the gain of specific frequency bands, especially for the lost parts of signals at higher frequencies. Adjusting the gain of different frequencies can make the signal closer to the ideal state and reduce errors.
[0102] Bandwidth adjustment: CTLE enhances the high-frequency part of the signal by adjusting its operating bandwidth, enabling it to better adapt to different channel conditions.
[0103] Filtering characteristics: CTLE often uses low-pass, high-pass, or band-pass filters to adjust the frequency response of the signal, removing unnecessary noise or high-frequency components with excessive attenuation.
[0104] The adjustment methods of CTLE can include but are not limited to:
[0105] Dynamic gain adjustment: The UFS receiver dynamically adjusts the gain setting of CTLE by monitoring signal quality (such as signal-to-noise ratio, bit error rate, etc.). In this way, the receiver can optimize the signal reception ability in real time under different transmission conditions.
[0106] Frequency compensation: CTLE can adjust the compensation degree for different frequency bands according to the characteristics of the transmitted signal. For example, for high-speed data transmission, CTLE can enhance the gain of the high-frequency part to make up for the high-frequency attenuation caused by channel loss.
[0107] Environmental adaptability: During signal transmission, changes in the environment (such as temperature fluctuations, system load changes, etc.) may cause fluctuations in signal quality. CTLE automatically adjusts the gain and bandwidth through an adaptive algorithm to ensure signal stability.
[0108] Step S132: Adjust the parameters of the decision feedback equalizer at the UFS receiver.
[0109] A Decision Feedback Equalizer (DFE) is a feedback-based signal processing technique mainly used to reduce Inter-Symbol Interference (ISI) caused by multipath effects, channel interference, etc. The DFE adjusts the demodulation process of the current signal by utilizing the feedback information of the previous decision result, thereby reducing interference and errors.
[0110] The basic principle of DFE is to eliminate the interference received by the current symbol according to the decision result of the previous symbol during the demodulation process. Its structure usually includes two parts:
[0111] Forward Equalizer: By equalizing the received signal, the distortion of the signal is reduced.
[0112] Feedback Equalizer: According to the feedback information of the already-decided symbols, it adjusts the decision process of the current signal to further reduce inter-symbol interference.
[0113] At the UFS receiver, the adjustment of DFE usually involves:
[0114] Decision Feedback Optimization: The DFE adjusts the feedback signal according to the historical decision results at the receiver to reduce the probability of misjudgment. Through feedback, the DFE can continuously optimize the demodulation accuracy.
[0115] Inter-Symbol Interference Cancellation: The main function of DFE is to eliminate inter-symbol interference, which is particularly important for high-speed data transmission because high-speed transmission signals are more vulnerable to multipath effects and channel losses.
[0116] Bit Error Rate Optimization: By reducing inter-symbol interference and improving demodulation accuracy, the DFE reduces the Bit Error Rate (BER) and improves the reliability of data transmission.
[0117] The adjustment methods of DFE can include but are not limited to:
[0118] Dynamic Feedback Adjustment: The DFE can dynamically adjust the parameters of the feedback loop according to the real-time received signal and error code feedback to optimize the decision process. This enables the receiver to gradually eliminate interference under complex channel conditions.
[0119] Adaptive Algorithm: The DFE can adjust the parameters of the feedback equalizer according to the received signal through adaptive algorithms (such as LMS algorithm or RLS algorithm) to ensure the accuracy of the feedback signal.
[0120] Multi-Level Feedback: To cope with more complex inter-symbol interference in high-speed transmission, the DFE can adopt a multi-level feedback structure. Through different feedback levels, the interference is reduced layer by layer to optimize the signal demodulation process.
[0121] Through feedback adjustment, the DFE can significantly reduce inter-symbol interference and improve the decision accuracy at the receiving end. Especially in high-speed data transmission and complex channel environments, the DFE can significantly reduce the bit error rate and optimize the data transmission performance. In addition, the DFE can enhance the system's adaptability to non-ideal channels and improve the receiving ability of the receiving end in adverse environments such as multipath interference and channel distortion.
[0122] In addition, it should be noted that in the embodiments of the present application, joint adjustment of CTLE and DFE can also be used to optimize the receiving ability of the receiving end from different perspectives. CTLE mainly improves the signal quality from the frequency response aspect, compensates for high-frequency losses, and enhances the decodability of the signal; the DFE focuses on eliminating inter-symbol interference and improving signal distortion caused by multipath effects or reflections.
[0123] The joint adjustment of the two can work together to provide comprehensive signal optimization, thereby maintaining signal stability in complex transmission environments and ensuring the reliability of data transmission.
[0124] After adjusting the receiving ability of the UFS receiving end, a negative acknowledgment message needs to be sent to the UFS sending end to inform the UFS sending end that the received check frame comparison fails, so that the UFS sending end can resend the check frame to the UFS receiving end.
[0125] By step S130, adjusting the parameters of the continuous-time linear equalizer (CTLE) and the decision feedback equalizer (DFE) of the UFS receiving end can significantly improve the receiving ability of the receiving end and optimize the quality and stability of the signal. CTLE enhances the signal in the high-frequency part by compensating for the frequency attenuation of the signal; the DFE eliminates inter-symbol interference through a feedback mechanism and reduces the bit error rate. The precise adjustment and optimization of these two technologies enable the UFS system to achieve efficient and stable data transmission in complex transmission environments.
[0126] Step S140: Re-receive the check frame sent by the UFS sending end.
[0127] When the check frame received by the UFS receiving end is compared incorrectly, after adjusting the receiving ability, send a NAC to the UFS transmitting end to inform the UFS sending end to resend the check frame. By re-receiving the check frame sent by the UFS sending end, the adjusted UFS receiving end can proceed with subsequent communication if the comparison is successful.
[0128] It should be noted that in the embodiments of the present application, the UFS self-detection method further includes:
[0129] When the check frame comparison is correct, send a response frame to the UFS sending end;
[0130] Receive the data frame sent by the UFS sending end.
[0131] In the embodiments of the present application, the response frame is an AFC frame corresponding to the check frame, indicating that the comparison has been completed and communication can proceed normally. Exemplarily, in an embodiment of the present application, when the UFS receiver successfully compares AFC TC0 and AFC TC1, it sends AFC TC0 and AFC TC1 to the UFS transmitter, and the UFS then continues to send subsequent data frames to the UFS receiver.
[0132] Specifically, in the embodiments of the present application, the data frame is a frame after the check frame, such as AFC TC2, AFC TC3, etc., and is used to execute instructions on the UFS receiver.
[0133] It should be noted that in the embodiments of the present application, before receiving the check frame sent by the UFS transmitter, the UFS self-detection method further includes:
[0134] Responding to the instruction of the UFS transmitter to exit the sleep state and exiting the sleep state.
[0135] Exemplarily, in an embodiment of the present application, the process of exiting the sleep state is usually initiated by the UFS transmitter, and the process of waking up the UFS receiver through a control signal or instruction is as follows:
[0136] The UFS transmitter issues a wake-up instruction: In the sleep state, the UFS transmitter will issue a wake-up instruction as needed, requesting the UFS receiver to exit the sleep state. This wake-up instruction is usually triggered when data transmission or communication is required, such as when the UFS transmitter requests to read data from or write data to the storage medium;
[0137] The wake-up instruction is transmitted from the UFS transmitter to the UFS receiver through the UFS bus. The content of the wake-up instruction usually includes: a wake-up request signal: notifying the device that it needs to exit the low-power mode; clock synchronization information: ensuring that the device can synchronize with the host's clock during the recovery process; a data transmission preparation signal: indicating that the device is ready to start or resume data transmission.
[0138] After receiving the wake-up instruction from the UFS transmitter, the UFS receiver will start to restore its working state; the UFS receiver will sequentially perform the following tasks:
[0139] Restore the clock signal: The UFS receiver will restart its internal clock and synchronize it with the clock of the UFS transmitter. Clock synchronization is crucial in the process of exiting the sleep mode because the UFS receiver must align with the clock of the UFS receiver to ensure the accuracy of data transmission.
[0140] Restore the internal circuit: Other internal circuits of the UFS device (such as the transmission module, cache, etc.) will also return to the normal state and be ready to receive and send data.
[0141] The UFS device exiting the sleep state is a highly precise and coordinated process. The UFS transmitter sends a wake-up instruction, and the UFS receiver responds to the instruction from the UFS transmitter to exit the sleep state. The entire process relies on precise timing management, frequency calibration, and protocol interaction to ensure that the UFS receiver can efficiently resume and enter the working state.
[0142] In the embodiments of the present application, a frame detection module is added to the UFS receiver for UFS communication. After the UFS receiver receives the check frame sent by the UFS transmitter, the frame detection module compares the check frame with the receiving ability of the UFS receiver. When the comparison of the check frame is incorrect, the receiving ability of the UFS receiver is adjusted, and a negative acknowledgment message is sent to the UFS transmitter. After receiving the negative acknowledgment message, the UFS transmitter sends the check frame again to the UFS receiver with the adjusted receiving ability. Through the UFS receiver with a frame detection module in the embodiments of the present application, the check frame sent by the UFS transmitter can be compared in a timely manner. When there is an incorrect comparison, the receiving ability of the receiver is adjusted in a timely manner, and a negative acknowledgment message is sent to the UFS transmitter. The UFS transmitter can re-send the check frame to the adjusted UFS receiver, and the receiving ability of the adjusted UFS receiver can be correctly compared with the check frame, thereby realizing subsequent UFS communication, avoiding the situation of incorrect frame message reception and falling into cyclic reception when exiting the sleep state, and improving the stability and compatibility of UFS communication.
[0143] Please refer to Figure 6 , which is a schematic diagram of the steps of a UFS self-detection method provided by the embodiments of the present application. As Figure 6 In the embodiments of the present application, the self-detection method applied to the UFS transmitter connected to the above-mentioned UFS receiver may include, but is not limited to, steps S210 to S220.
[0144] Step S210: Send a check frame to the UFS receiver;
[0145] It can be understood that in the embodiments of the present application, after sending the check frame to the UFS receiver, it is necessary to wait for the UFS receiver to respond. At this time, no subsequent data frames are sent until the information returned by the UFS receiver is received to determine the information to be sent next.
[0146] Step S220: When receiving the negative acknowledgment message sent by the UFS receiver, re-send the check frame to the UFS receiver.
[0147] Among them, the negative acknowledgment information is sent by the UFS receiver through the frame detection module to compare the check frame with the receiving ability of the UFS receiver when the comparison of the check frame is incorrect.
[0148] The check frames sent by the UFS transmitter are AFC TC0 and AFC TC1, which are the first two frames of the frame data. AFC TC0 and AFC TC1 are sent as check frames to the UFS receiver for frequency judgment by the UFS receiver. When an error occurs, it is necessary to wait for the UFS receiver to send a negative acknowledgment message, and then resend the check frames to the UFS receiver to avoid errors in subsequent transmitted information.
[0149] It should be noted that in the embodiments of the present application, the self-detection method applied to the UFS transmitter may further include step S230:
[0150] Step S230: In response to receiving the response frame sent by the UFS receiver, send a data frame to the UFS receiver.
[0151] In the embodiments of the present application, the response frame is sent by the UFS receiver through the frame detection module to compare the check frame with the receiving ability of the UFS receiver when the comparison of the check frame is correct. When the UFS transmitter receives the response frame, it means that the UFS receiver can stably receive the frame data at this time, and then the UFS transmitter starts to send data frames to the UFS receiver.
[0152] It can be understood that in the embodiments of the present application, the data frame is the frame after the check frame, such as AFC TC2, AFC TC3, etc., and is used to execute instructions on the UFS receiver.
[0153] It should be noted that in the embodiments of the present application, before step S210, the UFS self-detection method applied to the UFS transmitter further includes:
[0154] Exit the sleep state and send an instruction to exit the sleep state to the UFS receiver.
[0155] In the sleep state, the UFS transmitter will initiate a wake-up instruction as needed, requiring the UFS receiver to exit the sleep state. This wake-up instruction is usually triggered when data transmission or communication is required, such as when the UFS transmitter requests to read data from or write data to the storage medium.
[0156] The wake-up instruction is transmitted from the UFS transmitter to the UFS receiver through the UFS bus. The content of the wake-up instruction usually includes: a wake-up request signal: notifying the device that it needs to exit the low-power mode; clock synchronization information: ensuring that the device can synchronize with the host's clock during the recovery process; a data transmission preparation signal: indicating that the device is ready to start or resume data transmission.
[0157] By sending an instruction to exit the sleep state to the UFS receiver, the UFS receiver exits the sleep state, ensuring that the UFS receiver can efficiently recover and enter the working state.
[0158] Refer to Figure 7, embodiments of the present application also disclose an electronic device, and the electronic device 700 includes:
[0159] At least one processor 710;
[0160] At least one memory 720 for storing at least one program;
[0161] When the at least one program is executed by the at least one processor 710, the UFS self-detection method as described above is implemented.
[0162] Embodiments of the present application also disclose a computer-readable storage medium, in which a computer program executable by a processor is stored. When the computer program executable by the processor is executed by the processor, it is used to implement the UFS self-detection method as described above.
[0163] Embodiments of the present application also disclose a computer program product, including a computer program or computer instructions. The computer program or computer instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the electronic device executes the UFS self-detection method as described above.
[0164] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0165] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (piece) of the following" or its similar expression refers to any combination of these items, including any combination of single item (piece) or plural items (pieces). For example, at least one (piece) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0166] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be an indirect coupling or communication connection through some interfaces, devices, or units, and can be in electrical, mechanical, or other forms.
[0167] In the embodiments of this application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the function of the module or unit.
[0168] The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0169] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0170] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.
[0171] Regarding the step numbers in the above method embodiments, they are only set for the convenience of elaboration and explanation, and no limitation is imposed on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
Claims
1. A UFS self-detection method, characterized in that: Applied to a UFS receiving end, the UFS receiving end is connected to a UFS sending end, the UFS receiving end includes a frame detection module, and the method includes: receiving a check frame sent by the UFS sending end, and transmitting the check frame to the frame detection module; The frame detection module compares the check frame with the receiving capability of the UFS receiving end; wherein the receiving capability of the UFS receiving end includes the correspondence between the frequency of the check frame and the transmission mode of the UFS receiving end, and the correspondence between the frequency of the check frame and the transmission rate of the UFS receiving end; the transmission mode of the UFS receiving end includes: signal modulation mode, encoding method, and data rate; When the check frame comparison is wrong, adjusting the receiving capability of the UFS receiving end, and sending a negative response message to the UFS sending end; Re-receive the check frame sent by the UFS sending end.
2. The method according to claim 1, characterized in that The method further comprises: When the check frame comparison is correct, a response frame is sent to the UFS sending end; Receive a data frame sent by the UFS sending end.
3. The method according to claim 1, characterized in that Before receiving the check frame sent by the UFS sending end, the method further includes: In response to the UFS sending end's instruction to exit the sleep state, the UFS sending end exits the sleep state.
4. The method according to claim 1, characterized in that: The comparing the check frame with the receiving capability of the UFS receiving end by the frame detection module includes: Comparing the frequency of the check frame with the transmission mode and the transmission rate of the UFS receiving end; When the frequency of the check frame does not correspond to at least one of the transmission mode and the transmission rate, the check frame comparison is wrong.
5. The method according to claim 1, characterized in that The adjusting the receiving capability of the UFS receiving end includes: adjusting a continuous time linear equalizer parameter of the UFS receiver; Adjusting the decision feedback equalizer parameters of the UFS receiver.
6. A UFS self-detection method, characterized in that: Applied to a UFS transmitter, the UFS transmitter is connected to a UFS receiver, the UFS receiver includes a frame detection module, and the method includes: Sending a check frame to the UFS receiving end; When receiving a negative response message sent by the UFS receiving end, resending the check frame to the UFS receiving end; Among them, the negative response message is sent by the UFS receiving end when the check frame is compared with the receiving capability of the UFS receiving end through the frame detection module. The receiving capability of the UFS receiving end includes the correspondence between the frequency of the check frame and the transmission mode of the UFS receiving end, and the correspondence between the frequency of the check frame and the transmission rate of the UFS receiving end; the transmission mode of the UFS receiving end includes: signal modulation method, encoding method, and data rate.
7. The method according to claim 6, characterized in that The method further comprises: In response to receiving a response frame sent by the UFS receiving end, sending a data frame to the UFS receiving end; The response frame is compared by the UFS receiving end with the check frame and the receiving capability of the UFS receiving end through the frame detection module, and is sent when the check frame is correctly compared.
8. The method according to claim 6, characterized in that Before sending the check frame to the UFS receiving end, the method further includes: Exit the sleep state and send an exit sleep instruction to the UFS receiving end.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, characterized in that: A computer program executable by a processor is stored therein, and when the computer program executable by the processor is executed by the processor, it is used to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
UFS device and operation method thereof
CN114664342A
Error handling method for interconnection protocol, controller and storage device
CN115842605A