UFS self-detection method, electronic equipment and storage medium
By adding a frame detection module to the UFS receiver, verifying frame comparison and adjusting the reception capability, the problem of communication failure when the UFS receiver exits 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
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- 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 capability, the frequency and transmission mode matching between the UFS receiver and the transmitter can be ensured, frame message reception errors can be avoided, and the stability and compatibility of UFS communication can be improved.
Smart Images

Figure CN119883744A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a UFS self-detection method, an electronic device, and a storage medium. Background Art
[0002] Universal Flash Storage (UFS) plays a vital role in the development of electronic devices and embedded systems. It is designed 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] A sleep mode (HIBERATE8) is defined in the JEDEC220x UFS protocol. When in this mode, the device will be in a defined sleep state. In the sleep state, if the UFS sender needs to perform other operations on the UFS receiver, 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 need to go through the retransmission process. The receiving capability of the UFS receiver will be fixed after exiting the sleep state, and even if there is a retransmission mechanism, the link cannot be rebuilt. In the current related technology, the UFS controls the receiver to compare the first frame data received after exiting the sleep state. When the comparison fails, a NAC message is sent to the UFS sender to make the UFS sender resend the operation frame message. However, without the adaptive function, the equalizer parameters of the UFS receiver receiving the frame message will be fixed, and the re-received data frame will still fail to receive. Summary of the invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] 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.
[0006] In a first aspect, an embodiment of the present application provides a UFS self-detection method, which is 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; Comparing the check frame with the receiving capability of the UFS receiving end through the frame detection module; 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.
[0007] According to the method provided in some feasible embodiments of the present application, the method further includes: 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.
[0008] 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: In response to the UFS sending end's instruction to exit the sleep state, the UFS sending end exits the sleep state.
[0009] According to the method provided by some feasible embodiments of the present application, 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 the transmission mode or the transmission rate, the check frame comparison is wrong.
[0010] According to the method provided by some feasible embodiments of the present application, 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.
[0011] 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, the UFS receiving end 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; The negative response information 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 and when the check frame is compared incorrectly.
[0012] According to the method provided in some feasible embodiments of the present application, the method further includes: 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.
[0013] According to the method provided by some feasible embodiments of the present application, 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.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, including: 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 described in the first aspect or the second aspect of the present application is implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a processor, and the processor-executable computer program, when executed by the processor, is used to implement the method described in the first aspect or the second aspect of the present application.
[0016] The embodiments of the present application include at least the following beneficial effects: In the embodiment of the present application, a frame detection module is added to the UFS receiving end that performs UFS communication. After the UFS receiving end receives the check frame sent by the UFS sending end, the check frame is compared with the receiving capacity of the UFS receiving end through the frame detection module. When the check frame comparison is wrong, the receiving capacity of the UFS receiving end is adjusted, and a negative response message is sent to the UFS sending end. After receiving the negative response message, the UFS sending end sends the check frame again to the UFS receiving end whose receiving capacity has been adjusted. In the embodiment of the present application, the UFS receiving end with a frame detection module can timely compare the check frame sent by the UFS sending end. When a comparison error occurs, the receiving capacity of the receiving end is adjusted in time, and a negative response message is sent to the UFS sending end. The UFS sending end can resend the check frame to the adjusted UFS receiving end. The adjusted receiving capacity of the UFS receiving end can be correctly compared with the check frame, thereby realizing subsequent UFS communication, avoiding the situation where a frame message reception error occurs when exiting the sleep state and falls into a loop reception, and improving the stability and compatibility of UFS communication.
[0017] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0019] Figure 1 It is a structural schematic diagram of a UFS device; Figure 2 A schematic diagram of the structure of a UFS device provided in an embodiment of the present application; Figure 3 A schematic diagram of the steps of a UFS self-detection method provided in an embodiment of the present application; Figure 4 For the embodiment of this application Figure 3 Specific step diagram of step S120; Figure 5 For the embodiment of this application Figure 3 Specific step diagram of step S130; Figure 6 A schematic diagram of the steps of another UFS self-detection method provided in an embodiment of the present application; Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The present application is further described below in conjunction with the accompanying drawings and specific embodiments. The described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0021] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0023] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0024] Universal Flash Storage (UFS) is a storage standard designed for consumer electronics that require high performance and low power operation. It is designed 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 with full-duplex mode, which means it can perform read and write operations at the same time, 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 improving the performance of random reads and writes.
[0025] A sleep mode (HIBERATE8) is defined in the JEDEC220x UFS protocol. When in this mode, the Unipro state machine will also be in the defined HIBERATE state, MIPI MPHY will also be in the defined HIBERATE state, and the level on the differential line will be in the DIF-Z (A weak zero differential voltage) state.
[0026] Please refer to Figure 1 , is a schematic diagram of the structure of a UFS device, such as Figure 1 The structure of the original UFS device 100 shown includes: 1) Device Manager: The device manager is responsible for managing the overall operation 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.
[0027] 2) UFS Application Layer (UAP): UAP handles commands and transactions related to the UFS protocol and includes two service access points (SAP): UTP_CMD_SAP (for command transmission) and UTP_TM_SAP (for transaction management).
[0028] 3) UFS Transport Protocol Layer (UTP): The UTP layer is responsible for transmitting data between the UFS device and the host; it communicates with the device manager through UIO_SAP and with the UFS InterConnect Layer through UIC_SAP.
[0029] 4) UFS InterConnect Layer (UIC): 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.
[0030] 5) MIPI Unipro: MIPI Unipro is a protocol defined by the MIPI Alliance to enable communication between different modules in mobile devices; it communicates with the M-PHY layer through the RMMI interface.
[0031] 6) MIPI M-PHY: 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 sending and receiving data respectively. M-PHY communicates with external devices through the TX and RX pins.
[0032] 7) UDM_SAP: Service access point between the device manager and the UFS application layer.
[0033] 8) UIO_SAP: Service access point between the device manager and the UFS transport protocol layer.
[0034] 9) UIC_SAP: Service access point between the UFS transport protocol layer and the UFS interconnect layer.
[0035] 10) Cprot interface: the interface between the UFS interconnect layer and the MIPI Unipro layer.
[0036] 11) RMMI interface: the interface between the MIPI Unipro layer and the M-PHY layer.
[0037] A sleep mode (HIBERATE8) is defined in the JEDEC220x UFS protocol. When in this mode, Unipro will be in a defined sleep state, MIPI MPHY will also be in a defined sleep state, and the level on the differential line will be in the DIF-Z (A weak zero differential voltage) state. The UFS transmitter initiates the operation of entering HIBERATE8. After the UFS receiver successfully responds to HIBERATE8, both the UFS transmitter and the UFS receiver will enter the sleep state of HIBERATE8. At this time, the level on the differential line connecting the UFS transmitter and the UFS receiver will jump to DIF-Z. Before the UFS transmitter needs to perform other operations on the UFS receiver, it will first initiate an operation to exit HIBERATE8, and the UFS transmitter will first initiate an AFC TC frame to the UFS receiver. After receiving the AFC TC frame, the UFS receiver sends the corresponding AFC TC frame to the UFS transmitter. After completing the interaction of the AFC TC frame, the entire process of exiting HIBERATE8 is completed.
[0038] In the sleep state, if the UFS sender needs to perform other operations on the UFS receiver, 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 need to go through the retransmission process. The receiving capability of the UFS receiver will be fixed after exiting the sleep state, and even if there is a retransmission mechanism, the link cannot be rebuilt. In the current related technology, the UFS receiver is controlled to perform a comparison operation on the first frame data received after exiting the sleep state. When the comparison fails, a NAC message is sent to the UFS sender to make the UFS sender resend the operation frame message. However, without the adaptive function, the equalizer parameters of the UFS receiver receiving the frame message will be fixed, and the re-received data frame will still fail to receive.
[0039] 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.
[0040] Please refer to Figure 2 , is a schematic diagram of the structure of a UFS device provided in an embodiment of the present application, such as Figure 2 As shown, in the embodiment of the present application, the UFS device 200 now adds a frame check module, which is used to perform frequency check during data transmission. When the UFS receiving end receives frame data from the UFS transmitting end, it will first send the frame data to the frame check module for comparison to ensure that the frequency of the frame data is consistent with that of the UFS receiving end to avoid errors.
[0041] Please refer to Figure 3, is a schematic diagram of the steps of a UFS self-detection method provided in an embodiment of the present application, such as Figure 3 As shown, in the embodiment of the present application, the UFS self-detection method applied to the UFS receiving end connected to the UFS sending end may include but is not limited to steps S110 to S140.
[0042] 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). UFS hosts may include but are not limited to smartphones, laptops and PCs, embedded systems, servers and data storage devices, game consoles, etc., and UFS devices may include but are not limited to: UFS storage chips, built-in storage of smartphones, UFS memory cards (pluggable memory cards), solid-state drives (SSDs), automotive storage devices, storage in consumer electronic devices, etc.
[0043] Step S110: Receive a check frame sent by the UFS sending end, and transmit the check frame to a frame detection module.
[0044] It should be noted that in the embodiment 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 to the UFS receiver as check frames, and the frequency is determined by the UFS receiver.
[0045] 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 reception errors.
[0046] Step S120: Compare the verification frame with the receiving capability of the UFS receiving end through the frame detection module.
[0047] In the embodiment of the present application, the frame detection module compares AFC TC0 and AFC TC1 to determine whether the check frame matches the receiving capability of the UFS receiving end.
[0048] For example, refer to Figure 4 In the embodiment of the present application, step S120 may include but is not limited to step S121 and step S122: Step S121, comparing the frequency of the check frame with the transmission mode and transmission rate of the UFS receiving end; Step S122: 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.
[0049] AFC TC0 and AFC TC1 frames are control frames used to transmit frequency adjustment information in UFS communication, and are mainly used for frequency offset measurement and adjustment. They have the following functions: AFC TC0 frame: Usually used to start the frequency calibration process and provide a preliminary frequency offset estimate. It carries the frequency offset estimated by the transmitter and passes this information to the receiver.
[0050] AFC TC1 frames: used for fine frequency calibration and further optimization of frequency synchronization. With AFC TC1 frames, the transmitter can refine its estimate of frequency offset to ensure that the frequencies between the two devices are more accurately aligned.
[0051] Specifically, in a feasible embodiment of the present application, in the check frames AFC TC0 and AFC TC1, when the UFS receiving end receives AFC TC0, the frequency synchronization is initialized according to AFC TC0 to determine the offset of the current frequency; then the UFS receiving end receives AFC TC1 to confirm the state of the frequency synchronization, and determines the frequency offset between the UFS sending end and the UFS receiving end through the results of the frequency synchronization of AFC TC0 and AFC TC1.
[0052] In one embodiment, when the check frame received by the UFS receiving end corresponds to the current transmission mode and transmission rate, the comparison is correct, which means the following: (1) Frequency consistency: The receiving frequency of the UFS receiver is aligned with the frequency of the UFS transmitter. The frequency value calibrated by the AFC TC0 and AFC TC1 frames of the UFS transmitter fully matches the receiving capability of the UFS receiver.
[0053] (2) Transmission mode consistency: The transmission mode can refer to the signal modulation method, coding method, data rate, etc. The frequency of the check frame is compatible with the current transmission mode, indicating that the system operates at the appropriate frequency and supports the expected data rate.
[0054] (3) Error-free: Since the frequency matches the transmission mode, the UFS receiver can accurately decode the check frame and avoid erroneous data reception caused by frequency mismatch.
[0055] In the above three cases, the data transmission process is stable, and the UFS receiver can continue to receive and process data without additional correction.
[0056] However, when one of the above three situations is not satisfied (ie, a non-corresponding situation), incorrect comparison will occur, and step S130 needs to be performed at this time.
[0057] Step S130: When the check frame comparison is wrong, the receiving capability of the UFS receiving end is adjusted, and a negative response message is sent to the UFS sending end.
[0058] Reference Figure 5 In one embodiment of the present application, step S130 includes the following steps: Step S131, adjusting the continuous time linear equalizer parameters of the UFS receiving end; Among them, the continuous time linear equalizer (CTLE) is mainly used to compensate the frequency response of the signal, especially in the process of high-frequency signal transmission, to suppress the signal distortion caused by channel loss, attenuation or high-frequency noise. CTLE improves the quality and stability of the signal by adjusting the gain frequency characteristics.
[0059] CTLE compensates for the low-frequency and high-frequency parts of the signal through gain adjustment, restoring the spectral characteristics of the signal, especially the signal loss in the high-frequency band. It uses a linear filtering method to compensate for the distorted part of the signal and reduce signal degradation caused by factors such as channel attenuation and reflection.
[0060] Adjustment of CTLE usually involves the following aspects: Gain setting: CTLE compensates for signal attenuation by adjusting the gain of specific frequency bands, especially the signal loss at higher frequencies. Gain adjustment at different frequencies can make the signal closer to the ideal state and reduce errors.
[0061] Bandwidth adjustment: CTLE enhances the high-frequency portion of the signal by adjusting its operating bandwidth, enabling it to better adapt to different channel conditions.
[0062] Filtering characteristics: CTLE often uses low-pass, high-pass or band-pass filters to adjust the frequency response of the signal, remove unnecessary noise or attenuate excessive high-frequency components.
[0063] The adjustment methods of CTLE may include but are not limited to: Dynamically adjust gain: The UFS receiver dynamically adjusts the gain setting of the CTLE by monitoring the signal quality (such as signal-to-noise ratio, bit error rate, etc.). In this way, the receiver can optimize the signal reception capability in real time under different transmission conditions.
[0064] Frequency compensation: CTLE can adjust the degree of compensation 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 compensate for the high-frequency attenuation caused by channel loss.
[0065] Environmental adaptability: During signal transmission, environmental changes (such as temperature fluctuations, system load changes, etc.) may cause fluctuations in signal quality. CTLE uses an adaptive algorithm to automatically adjust gain and bandwidth to ensure signal stability.
[0066] Step S132: Adjust the decision feedback equalizer parameters of the UFS receiving end.
[0067] Decision Feedback Equalizer (DFE) is a feedback-based signal processing technology, which is mainly used to reduce inter-symbol interference (ISI) caused by multipath effects, channel interference, etc. DFE adjusts the demodulation process of the current signal by using the feedback information of the previous decision result, thereby reducing interference and errors.
[0068] 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: Forward equalizer: Reduces signal distortion by equalizing the received signal.
[0069] Feedback equalizer: Based on the feedback information of the already judged symbols, adjust the decision process of the current signal to further reduce inter-symbol interference.
[0070] On the UFS receiver side, DFE adjustment usually involves: Decision feedback optimization: DFE adjusts the feedback signal based on the historical decision results of the receiving end to reduce the probability of misjudgment. Through feedback, DFE can continuously optimize the accuracy of demodulation.
[0071] Inter-symbol interference elimination: The main function of DFE is to eliminate the interference between symbols, which is especially important for high-speed data transmission because high-speed transmission signals are more susceptible to multipath effects and channel losses.
[0072] Bit error rate optimization: DFE reduces inter-symbol interference and improves demodulation accuracy, thereby reducing the bit error rate (BER) and improving the reliability of data transmission.
[0073] DFE adjustment methods may include but are not limited to: Dynamic feedback adjustment: DFE can dynamically adjust the parameters of the feedback loop and optimize the decision process based on the real-time received signal and bit error feedback. This enables the receiver to gradually eliminate interference under complex channel conditions.
[0074] Adaptive algorithm: DFE can continuously adjust the parameters of the feedback equalizer according to the received signal through an adaptive algorithm (such as the LMS algorithm or the RLS algorithm) to ensure the accuracy of the feedback signal.
[0075] Multi-level feedback: In order to cope with more complex inter-symbol interference in high-speed transmission, DFE can adopt a multi-level feedback structure to reduce interference layer by layer and optimize the signal demodulation process through different feedback levels.
[0076] Through feedback adjustment, DFE can significantly reduce inter-symbol interference and improve the decision accuracy of the receiving end. Especially in high-speed data transmission and complex channel environments, DFE can significantly reduce the bit error rate and optimize data transmission performance. In addition, DFE can enhance the system's adaptability to non-ideal channels and improve the receiving end's receiving ability in adverse environments such as multipath interference and channel distortion.
[0077] In addition, it should be noted that in the embodiments of the present application, the joint adjustment of CTLE and DFE can also be used to optimize the receiving capability of the receiving end from different angles. CTLE mainly improves the signal quality from the frequency response aspect, compensates for high-frequency losses, and enhances the decodability of the signal; DFE focuses on eliminating inter-symbol interference and improving signal distortion caused by multipath effects or reflections.
[0078] The joint adjustment of the two can work together to provide all-round signal optimization, thereby maintaining signal stability in complex transmission environments and ensuring the reliability of data transmission.
[0079] After the receiving capability of the UFS receiving end is adjusted, a negative response 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 resends the check frame to the UFS receiving end.
[0080] By adjusting the parameters of the continuous time linear equalizer (CTLE) and decision feedback equalizer (DFE) of the UFS receiving end in step S130, the receiving ability of the receiving end can be significantly improved, and the quality and stability of the signal can be optimized. CTLE enhances the high-frequency signal by compensating for the frequency attenuation of the signal; DFE eliminates inter-symbol interference and reduces the bit error rate through a feedback mechanism. The precise adjustment and optimization of these two technologies enable the UFS system to achieve efficient and stable data transmission in a complex transmission environment.
[0081] Step S140: re-receive the check frame sent by the UFS sending end.
[0082] When the check frame received by the UFS receiver is incorrectly compared, after adjusting the receiving capability, NAC is sent to the UFS transmitter to inform the UFS transmitter to resend the check frame. By re-receiving the check frame sent by the UFS transmitter, the adjusted UFS receiver can successfully perform subsequent communication.
[0083] It should be noted that in the embodiment of the present application, the UFS self-detection method further includes: When the verification frame is correct, a response frame is sent to the UFS sender; Receive the data frame sent by the UFS sender.
[0084] In an embodiment 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 be carried out normally. Exemplarily, in an embodiment of the present application, when the UFS receiving end successfully compares AFC TC0 and AFC TC1, AFC TC0 and AFC TC1 are sent to the UFS sending end, and the UFS continues to send subsequent data frames to the UFS receiving end.
[0085] Specifically, in the embodiment of the present application, the data frame is a frame after the check frame, such as AFC TC2, AFC TC3, etc., which is used to execute instructions on the UFS receiving end.
[0086] It should be noted that, in the embodiment of the present application, before receiving the check frame sent by the UFS sender, the UFS self-detection method further includes: Respond to the UFS sender's exit-hibernation instruction and exit the hibernation state.
[0087] For example, in one 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: The UFS sender initiates a wake-up command: In the sleep state, the UFS sender will initiate a wake-up command as needed to request the UFS receiver to exit the sleep state. This wake-up command is usually triggered when data transmission or communication is required, such as the UFS sender requests to read data from or write data to the storage medium; The wake-up command is transmitted from the UFS transmitter to the UFS receiver through the UFS bus. The content of the wake-up command usually includes: wake-up request signal: notifying the device that it needs to exit low-power mode; clock synchronization information: ensuring that the device can synchronize with the host's clock during the recovery process; data transfer preparation signal: indicating that the device is ready to start or resume data transfer.
[0088] After receiving the wake-up command from the UFS transmitter, the UFS receiver will start to resume its working state; the UFS receiver will perform the following tasks in sequence: Recover the clock signal: The UFS receiver restarts the internal clock and synchronizes it with the UFS transmitter's clock. Clock synchronization is critical in the process of exiting sleep mode, because the UFS receiver must be aligned with the UFS receiver's clock to ensure the accuracy of data transmission.
[0089] Restore internal circuits: Other internal circuits of the UFS device (such as the transmission module, cache, etc.) will also be restored to normal, ready to receive and send data.
[0090] The UFS device exits the sleep state is a highly precise and coordinated process. The UFS transmitter sends a wake-up command, and the UFS receiver responds to the UFS transmitter's exit sleep command and exits the sleep state. The entire process relies on precise timing management, frequency calibration, and protocol interaction to ensure that the UFS receiver can efficiently recover and enter the working state.
[0091] In the embodiment of the present application, a frame detection module is added to the UFS receiving end that performs UFS communication. After the UFS receiving end receives the check frame sent by the UFS sending end, the check frame is compared with the receiving capacity of the UFS receiving end through the frame detection module. When the check frame comparison is wrong, the receiving capacity of the UFS receiving end is adjusted, and a negative response message is sent to the UFS sending end. After receiving the negative response message, the UFS sending end sends the check frame again to the UFS receiving end whose receiving capacity has been adjusted. In the embodiment of the present application, the UFS receiving end with a frame detection module can timely compare the check frame sent by the UFS sending end. When a comparison error occurs, the receiving capacity of the receiving end is adjusted in time, and a negative response message is sent to the UFS sending end. The UFS sending end can resend the check frame to the adjusted UFS receiving end. The adjusted receiving capacity of the UFS receiving end can be correctly compared with the check frame, thereby realizing subsequent UFS communication, avoiding the situation where a frame message reception error occurs when exiting the sleep state and falls into a loop reception, and improving the stability and compatibility of UFS communication.
[0092] Please refer to Figure 6 , is a schematic diagram of the steps of a UFS self-detection method provided in an embodiment of the present application, such as Figure 6 In the embodiment 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.
[0093] Step S210, sending a check frame to the UFS receiving end; It can be understood that in the embodiment 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.
[0094] Step S220: When receiving a negative response message sent by the UFS receiving end, resend the check frame to the UFS receiving end.
[0095] The negative response information is sent by the UFS receiving end when the verification frame is compared with the receiving capability of the UFS receiving end through the frame detection module and the verification frame is compared incorrectly.
[0096] The check frames sent by the UFS sender are AFC TC0 and AFC TC1, which are the first two frames of the frame data. AFCTC0 and AFC TC1 are sent as check frames to the UFS receiver, and the UFS receiver performs frequency judgment. When an error occurs, it is necessary to wait for the UFS receiver to send a negative response message, and then resend the check frame to the UFS receiver to avoid errors in subsequent information transmission.
[0097] It should be noted that, in the embodiment of the present application, the self-detection method applied to the UFS sending end may also include step S230: Step S230: In response to receiving the response frame sent by the UFS receiving end, send the data frame to the UFS receiving end.
[0098] In the embodiment of the present application, the response frame is sent by the UFS receiving end when the verification frame is compared with the receiving capability of the UFS receiving end through the frame detection module. When the UFS sending end receives the response frame, it means that the UFS receiving end is able to stably receive frame data at this time, and the UFS sending end starts to send data frames to the UFS receiving end.
[0099] It can be understood that in the embodiment of the present application, the data frame is a frame after the check frame, such as AFC TC2, AFCTC3, etc., which is used to execute instructions on the UFS receiving end.
[0100] It should be noted that, in the embodiment of the present application, before step S210, the UFS self-detection method applied to the UFS transmitter further includes: Exit the sleep state and send the exit sleep command to the UFS receiver.
[0101] In the dormant state, the UFS sender will initiate a wake-up command as needed to request the UFS receiver to exit the dormant state. This wake-up command is usually triggered when data transmission or communication is required, such as when the UFS sender requests to read or write data from the storage medium; The wake-up command is transmitted from the UFS transmitter to the UFS receiver through the UFS bus. The content of the wake-up command usually includes: wake-up request signal: notifying the device that it needs to exit low-power mode; clock synchronization information: ensuring that the device can synchronize with the host's clock during the recovery process; data transfer preparation signal: indicating that the device is ready to start or resume data transfer.
[0102] By sending an exit-hibernation instruction to the UFS receiver, the UFS receiver exits the hibernation state, ensuring that the UFS receiver can efficiently recover and enter the working state.
[0103] Reference Figure 7 The embodiment of the present application further discloses an electronic device, the electronic device 700 comprising: at least one processor 710; At least one memory 720, used to store at least one program; When the at least one program is executed by the at least one processor 710 , the aforementioned UFS self-detection method is implemented.
[0104] The embodiment of the present application further discloses a computer-readable storage medium, which stores a computer program executable by a processor. 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.
[0105] An embodiment of the present application also discloses a computer program product, including a computer program or computer instructions, wherein the computer program or computer instructions are stored in a computer-readable storage medium, a processor of an 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 performs the UFS self-detection method as described above.
[0106] 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 are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0107] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one 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, c can be single or multiple.
[0108] In the several embodiments provided in the present 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 merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0109] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), 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 part of an overall module or unit that includes the function of the module or unit.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0112] If 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 the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0113] The step numbers in the above method embodiment are only provided for the convenience of explanation and description, and no limitation is imposed on the order of the steps. The execution order of each step in the embodiment 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; Comparing the check frame with the receiving capability of the UFS receiving end through the frame detection module; 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; The negative response information 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 and when the check frame is compared incorrectly.
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
Downhole communication data processing method and device and electronic equipment
CN117336395A
UFS-based power consumption automatic test method and system and computer equipment
CN119181414A
Apparatus, method and system to exchange error information
EP3035579A1