Communication method and device of controller, electronic equipment and computer program product

By backing up and restoring the slave information of the I3C controller under the basic input and output system in the I3C bus hardware system, the problem that the I3C controller cannot communicate after switching the software environment is solved, and the smooth communication between the I3C controller and the slave device is achieved, and the stability and efficiency of the system are improved.

CN120407457AActive Publication Date: 2025-08-01PHYTIUM TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510442445.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-08-01
Estimated Expiration
2045-04-09

AI Technical Summary

Technical Problem

In the I3C bus hardware system, after the software environment switches from the operating system to the basic input and output system, the slave information of the I3C controller is overwritten, resulting in the problem of not being able to communicate with the slave.

Method used

When switching to the basic input and output system, backup the slave device information of the I3C controller under the operating system, and after initialization under the basic input and output system, data recovery is used to ensure that the slave device information is corrected as the correct information under the operating system when switching back to the operating system.

Benefits of technology

It solves the problem that the I3C controller cannot communicate with the slave device after switching the software environment, ensuring the smooth progress of communication, especially in business scenarios such as acquisition time, and improving the stability and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407457A_ABST
    Figure CN120407457A_ABST
Patent Text Reader

Abstract

The invention discloses a communication method and device of a controller, electronic equipment and a computer program product, which are applied to the technical field of improved internal integrated circuits, and the method comprises the following steps: responding to a target operation, switching a current software environment from an operating system to a basic input / output system, the slave equipment information of the improved internal integrated circuit controller under the operating system is backed up; after the improved internal integrated circuit controller is initialized under the basic input and output system, data recovery is conducted on the improved internal integrated circuit controller through the backup slave device information; and under the condition of switching to the operating system, controlling the improved internal integrated circuit controller after data recovery to communicate with the target slave device. The problem that the improved internal integrated circuit controller cannot communicate with the slave device due to the fact that the slave device information of the improved internal integrated circuit controller is covered by the new slave device information can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of improved internal integrated circuit, and particularly relates to a communication method, device, electronic device and computer program product of a controller. Background Art

[0002] With the rise of multi-functional intelligent hardware devices, more and more devices such as sensors need to be integrated in the hardware system. In the scenario of using the Inter Integrated Circuit (I2C) bus, it brings many requirements for signals such as interrupt, chip select, enable and sleep, resulting in an increase in chip cost and design difficulty. Therefore, a faster, more efficient and low-power bus protocol, namely the Improved InterIntegrated Circuit (I3C) bus protocol, appears. Among them, the I3C bus protocol not only is compatible with the I2C bus protocol, but also adds many new functions such as support for in-band interrupt, dynamic addressing and more advanced power management. The I3C controller can combine multiple slave devices such as various sensors together by using a single I3C bus and realize mutual communication. For example, slave devices such as Electrically Erasable Programmable read only memory (EEPROM) and temperature sensors can be mounted under the I3C bus.

[0003] Currently, in the hardware system using the I3C bus, to ensure that the hardware system can start normally, run stably and manage resources efficiently, its software environment usually includes the Basic Input Output System (BIOS) and the Operating System (OS). In some business scenarios, it is necessary to switch between two software environments. For example, to obtain time from a Real-Time clock (RTC) device under the OS, it is necessary to switch to the BIOS, and then switch back to the OS, and then use the obtained time for business operations.

[0004] However, when the software environment switches from the OS to the BIOS and then back to the OS, there often appears a problem that the I3C controller cannot communicate with its slave devices. Summary of the Invention

[0005] To solve the above technical problems, the present application provides a communication method, device, electronic device and computer program product of a controller, so as to achieve the purpose of ensuring smooth communication between the I3C controller and its slave devices after the software environment switches back to the OS again.

[0006] To achieve the above technical objectives, the embodiments of the present application provide the following technical solutions:

[0007] In a first aspect, the embodiments of the present application provide a communication method for an improved internal integrated circuit controller. The communication method for the improved internal integrated circuit controller includes:

[0008] In response to a target operation, switch the current software environment from the operating system to the basic input / output system, and back up the slave device information of the improved internal integrated circuit controller under the operating system;

[0009] After initializing the improved internal integrated circuit controller under the basic input / output system, use the backed-up slave device information to perform data recovery on the improved internal integrated circuit controller;

[0010] When switching to the operating system, control the improved internal integrated circuit controller after data recovery to communicate with the target slave device, where the target slave device includes the slave device indicated by the backed-up slave device information.

[0011] In a second aspect, the embodiments of the present application provide a communication device for an improved internal integrated circuit controller. The communication device for the improved internal integrated circuit controller includes:

[0012] A response module, configured to, in response to a target operation, switch the current software environment from the operating system to the basic input / output system, and back up the slave device information of the improved internal integrated circuit controller under the operating system;

[0013] A data recovery module, configured to, after initializing the improved internal integrated circuit controller under the basic input / output system, use the backed-up slave device information to perform data recovery on the improved internal integrated circuit controller;

[0014] A communication module, configured to, when switching to the operating system, control the improved internal integrated circuit controller after data recovery to communicate with the target slave device, where the target slave device includes the slave device indicated by the backed-up slave device information.

[0015] In a third aspect, the embodiments of the present application provide an electronic device, including a processor configured to execute the communication method for the improved internal integrated circuit controller as described in the first aspect.

[0016] In a fourth aspect, the embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it implements the communication method for the improved internal integrated circuit controller as described in the first aspect.

[0017] Fifth aspect, an embodiment of the present application provides a computer program product or a computer program. The computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium. A processor of the computer device reads the computer program from the computer-readable storage medium, and when the processor executes the computer program, the steps of the communication method of the improved internal integrated circuit controller as described in the first aspect are implemented.

[0018] The communication method of the improved internal integrated circuit controller provided by the embodiment of the present application can back up the slave device information of the I3C controller under the OS when the current software environment switches from the OS to the BIOS. After initializing the I3C controller under the BIOS, the backed-up slave device information is used to perform data recovery on the I3C controller. In this way, after the new slave device information overwrites the slave device information of the I3C controller under the OS, through the data recovery process, the slave device information of the I3C controller is corrected to the slave device information of the I3C controller under the OS. When switching to the OS, the I3C controller after data recovery can communicate smoothly with its slave device. It is avoided that the I3C controller cannot communicate with its slave device due to the slave device information of the I3C controller being overwritten by the new slave device information. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0020] Figure 1 It is a schematic diagram of the application scenario of a communication method of an improved internal integrated circuit controller provided by an embodiment of the present application;

[0021] Figure 2 It is one of the schematic flowcharts of a communication method of an improved internal integrated circuit controller provided by an embodiment of the present application;

[0022] Figure 3 It is a schematic diagram of the process of writing data to a target register according to the write timing in an embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of the process of performing data recovery in an embodiment of the present application;

[0024] Figure 5 It is a schematic diagram of the I3C controller communicating with the non-volatile flash memory via the SPI bus in an embodiment of the present application;

[0025] Figure 6 This is the second flowchart diagram of a communication method for an improved internal integrated circuit controller provided by an embodiment of the present application;

[0026] Figure 7 This is the structural block diagram of a communication device for an improved internal integrated circuit controller provided by an embodiment of the present application;

[0027] Figure 8 This is the structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0028] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of this specification should have the ordinary meanings understood by those of ordinary skill in the art to which this specification belongs. The "first", "second" and similar terms used in the embodiments of this specification do not represent any order, quantity or importance, but are only used to avoid confusion of components.

[0029] Unless otherwise required by the context, throughout this specification, "a plurality of" means "at least two", and "including" is interpreted as an open and inclusive meaning, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "examples", "specific examples" or "some examples" etc. are intended to indicate that specific features, structures, materials or characteristics related to the embodiment or example are included in at least one embodiment or example of this specification. The schematic representations of the above terms do not necessarily refer to the same embodiment or example. In addition, the embodiments described below can be understood as implementation manners.

[0030] Next, the technical solutions in the embodiments of this specification will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this specification.

[0031] Overview

[0032] As described in the background art, in some business scenarios, the software environment usually switches between the OS and the BIOS. Since the I3C controller needs to be initialized after switching to the BIOS, the slave device information in the I3C controller will be overwritten, and the overwritten slave device information will become the information of the relevant slave devices under the BIOS. Therefore, when switching back to the OS again, when the I3C controller communicates with its slave devices, since the currently stored slave device information is the information of the relevant slave devices under the BIOS, communication failures will occur.

[0033] Taking the business scenario of obtaining time as an example, the RTC device, as a device dedicated to maintaining and tracking time, can provide an essential accurate time reference for the hardware system. Since the RTC device is not described under the OS. Therefore, usually, in order to obtain time under the OS, specific interfaces under the BIOS need to be called to communicate with the RTC device. After entering the BIOS, the I3C controller is re-initialized, so that the slave device information of the I3C controller is overwritten by the information of the RTC device. When returning to the OS again, since the slave device information is overwritten with the information of the RTC device, the I3C controller will no longer be able to communicate with its slave devices.

[0034] In view of the above technical status quo, the inventors of the present application propose that when the current software environment switches from the OS to the BIOS, the slave device information of the I3C controller under the OS can be backed up. Thus, after initializing the I3C controller under the BIOS, the backed-up slave device information is used to recover the data of the I3C controller. In this way, after the new slave device information overwrites the slave device information of the I3C controller under the OS, through the data recovery process, the slave device information of the I3C controller is corrected back to the slave device information of the I3C controller under the OS. In the case of switching to the OS, the I3C controller after data recovery can successfully communicate with its slave devices. This avoids the situation where the I3C controller cannot communicate with its slave devices due to the slave device information of the I3C controller being overwritten by new slave device information.

[0035] Exemplary Method

[0036] The embodiment of the present application provides a communication method for an improved internal integrated circuit controller. This method can be applied to hardware devices using the I3C bus. The hardware device is provided with two software environments, namely the OS and the BIOS, and can switch between the two software environments during business operations. For example, the structure of the hardware device can be as Figure 1 shown, including: an I3C master device, multiple slave devices (including but not limited to Figure 1Among the three slave devices, namely the first slave device, the second slave device, and the third slave device), a serial data line (Serial Data, abbreviated as SDA), a serial clock line (Serial Clock, abbreviated as SCL), an I3C driver under the operating system (OS), an I3C driver under the Basic Input / Output System (BIOS), and a storage unit.

[0037] The I3C controller in the I3C master device communicates with each slave device through these two lines, SDA and SCL. The I3C driver under the OS operates on some slave devices (such as the first slave device and the second slave device), and at the same time, it can save the information of the slave devices into the I3C controller. The I3C driver under the BIOS operates on other slave devices (such as the third slave device), and at the same time, it can save the information of the slave devices into the I3C controller. Meanwhile, the I3C driver under the BIOS can operate on the storage unit through a specific interface to save the information in the I3C controller into the storage unit. It should be noted that during the communication process between the I3C master device and the slave devices, the drivers of different slave devices may be in different software environments. Therefore, for any slave device, it can be regarded as a slave device in the corresponding software environment. For example, the first slave device and the second slave device are affected by the I3C driver under the OS. The third slave device is affected by the I3C driver under the BIOS. Then, the first slave device and the second slave device can be regarded as slave devices under the OS, and the third slave device can be regarded as a slave device under the BIOS.

[0038] Such as Figure 2 As shown, the communication method of the improved internal integrated circuit controller may include:

[0039] S201: In response to a target operation, switch the current software environment from the operating system to the Basic Input / Output System and back up the slave device information of the improved internal integrated circuit controller under the operating system.

[0040] In this step, the target operation includes any operation that triggers the software environment to switch from the OS to the BIOS. It can include directly triggering the operation of switching the software environment from the OS to the BIOS. For example, a system firmware update operation. It can also include triggering an operation of a specified service, and this specified service can trigger the software environment to switch from the OS to the BIOS. For example, the target operation includes: triggering an operation of the RTC service. Among them, the specified service includes but is not limited to the RTC service. For example, the specified service can also include: certain advanced security functions, power management settings, or initialization services for specific hardware.

[0041] After the current software environment switches from the OS to the BIOS, the I3C controller will be initialized. In this embodiment, before this initialization, the slave device information of the I3C controller under the OS can be backed up.

[0042] Among them, the backed-up slave device information is the information of the slave device required for the I3C controller under the OS to communicate with its slave device. For example, the slave device information includes: the temporary ID of the slave device, address mode, I3C address, I3C mode and other information. Therefore, the I3C controller under the OS can communicate with its slave device according to the slave device information. For example Figure 1 As shown, the slave device information includes: the information of the first slave device and / or the information of the second slave device. Under the OS, the I3C controller of the I3C master device can communicate with the first slave device and / or the second slave device by means of the slave device information.

[0043] In some embodiments, when backing up the slave device information of the I3C controller under the OS, the slave device information can be only the information of the slave device required to implement the above-specified service. For example, Figure 1 if the slave device required to implement the specified service is only the second slave device, then only the information of the second slave device can be backed up. Of course, to avoid omission, the information of all slave devices of the I3C controller under the OS can also be backed up.

[0044] In some embodiments, after the current software environment switches from the OS to the BIOS, the process of initializing the I3C controller includes: in the Driver Execution Environment (DEX) phase of the BIOS, dynamic addresses are assigned to each slave device through the I3C controller. For I3C slave devices with existing I2C static addresses, dynamic addresses are assigned to them through the SETDASA general command code command; for I3C slave devices without I2C static addresses, addresses are assigned through the ENTDAABroadcast general command code command. And during the initialization process, the I3C controller stores slave device information, such as configuration information, address information, device feature registers and bus feature registers, in 12 groups of device reserved registers of the I3C controller. The first group of device reserved registers stores the information of the I3C controller itself, and the remaining 11 groups of device reserved registers store the slave device information.

[0045] It should be noted that after the I3C controller is initialized, the slave device information in the I3C controller will change. For example Figure 1 As shown, after switching from the OS to the BIOS and initializing the I3C controller, the information of the third slave device will, as the new slave device information, overwrite the information of the first slave device and / or the second slave device.

[0046] S202: After initializing the improved internal integrated circuit controller under the basic input / output system, use the backed-up slave device information to perform data recovery on the improved internal integrated circuit controller.

[0047] In this step, after initializing the I3C controller under the BIOS, the I3C controller can be controlled to communicate with the slave device under the BIOS based on the current slave device information to complete the specified service operation. Then, after completing the specified service operation, the I3C controller is restored with the slave device information backed up in S201. Continuing with Figure 1 as an example, after initializing the I3C controller under the BIOS, the I3C controller can be controlled to communicate with the slave device under the BIOS (the third slave device) based on the current slave device information (the information of the third slave device). Then, the I3C controller is restored with the slave device information (the information of the first and second slave devices) backed up in S201.

[0048] In some embodiments, when the target operation includes an operation to trigger the RTC service, after initializing the I3C controller under the BIOS, the I3C controller can be controlled to communicate with the RTC device based on the current slave device information to obtain the current time. Then, after obtaining the current time, the I3C controller is restored with the backed-up slave device information.

[0049] Regarding the specific process of data restoration, it is not limited here. It should be noted that after data restoration, when switching back to the OS again, the restored I3C controller can communicate smoothly with the slave device under the OS based on the current slave device information. Continuing with Figure 1 as an example, the restored I3C controller can continue to communicate with the first slave device and / or the second slave device.

[0050] S203: When switching to the operating system, control the improved internal integrated circuit controller after data restoration to communicate with the target slave device.

[0051] In this step, the target slave device includes the slave device indicated by the backed-up slave device information. Since the I3C controller restores the information of the slave device under the OS through data restoration. Therefore, the I3C controller can communicate smoothly with the slave device under the OS. For example, when the target operation includes an operation to trigger the RTC service, when switching to the OS, control the restored I3C controller to communicate with the target slave device to inform the target slave device of the current time obtained from the RTC device.

[0052] In some embodiments, after the current software environment switches from the BIOS to the OS, the I3C controller can be initialized again. The process of initializing the I3C controller is similar to the process of initializing the I3C controller under the BIOS, which will not be elaborated here. It should be noted that, in order to avoid driver conflicts, the slave devices under the OS are different from those under the BIOS. For example, the slave devices under the BIOS, such as the RTC device, are not described under the OS.

[0053] In the embodiments of the present application, when the current software environment switches from the OS to the BIOS, the slave device information of the I3C controller under the OS can be backed up. Then, after initializing the I3C controller under the BIOS, the backed-up slave device information is used to perform data recovery on the I3C controller. In this way, after the new slave device information overwrites the slave device information of the I3C controller under the OS, through the data recovery process, the slave device information of the I3C controller is corrected to the slave device information of the I3C controller under the OS again. When switching to the OS, the I3C controller after data recovery can communicate with its slave device smoothly. This avoids the situation where the I3C controller cannot communicate with its slave device due to the slave device information of the I3C controller being overwritten by the new slave device information.

[0054] In some embodiments of the present application, to avoid the state of the I3C controller affecting its communication with the target slave device, the method further includes: in response to a target operation, recording the state information of the improved internal integrated circuit controller under the operating system.

[0055] Performing data recovery on the improved internal integrated circuit controller using the backed-up slave device information includes:

[0056] Determining the target registers that need to be data recovered from the improved internal integrated circuit controller, where the target registers include: slave device registers and status registers;

[0057] Performing data recovery on the target registers according to the backed-up slave device information and status information.

[0058] It should be noted that the I3C controller storing the slave device information pointing to the target slave device is a necessary condition for the I3C controller to communicate with the target slave device smoothly. However, even if the I3C controller stores this slave device information, it does not guarantee that the I3C controller can definitely communicate with the target slave device normally. Whether the two can communicate normally is also affected by the state of the I3C controller during communication.

[0059] To avoid the normal communication being affected by the self - state of the I3C controller during communication, in this embodiment, when performing data recovery on the I3C controller, not only the slave device information needs to be recovered, but also the state information of the I3C controller needs to be recovered. By recovering the slave device information and the state information, the communication environment between the I3C controller and the target slave device after switching back to the OS is made consistent with that before switching away from the OS. The I3C controller can communicate with the target slave device normally as it did before switching away from the OS.

[0060] Of course, the state of the I3C controller does not necessarily affect its normal communication with the target slave device. Therefore, in some embodiments, the data recovery of the slave device registers can be performed only based on the backed - up slave device information.

[0061] The status register is a register in the I3C controller that stores status information. The status information can include, for example, information such as the enable, interrupt, cache, and command response of the status register.

[0062] The slave device register is a register in the I3C controller that stores slave device information. Regarding the slave device information, reference can be made to the relevant descriptions in the above - mentioned embodiments, and details will not be elaborated here.

[0063] In the embodiments of this application, by recovering both the slave device information and the state information, the communication environment between the I3C controller and the target slave device after switching back to the OS is made consistent with that before switching away from the OS. Thus, the normal communication is prevented from being affected by the self - state of the I3C controller during communication.

[0064] In some embodiments of this application, performing data recovery on the target register according to the backed - up slave device information and state information includes:

[0065] Determining the writing timing of each register in the target register according to the Improved Inter - Integrated Circuit (I3C) protocol;

[0066] Writing the backed - up slave device information and state information into the target register according to the writing timing.

[0067] It should be noted that since there is a coupling relationship between the registers of the I3C controller, when recovering the I3C controller, the backed - up information cannot be directly written into each register, and a certain timing needs to be followed for recovery. In the communication scenario of the I3C controller, the coupling relationship and other specifications between the registers are defined in the I3C protocol. Regarding the I3C protocol, it is improved based on the I2C protocol and will not be elaborated here. That is to say, all communication processes of the I3C controller, all operations on the I3C controller, etc. need to follow the I3C protocol, otherwise the I3C controller may not work properly and thus may not be able to communicate with its slave device normally.

[0068] It can be understood that the I3C protocol stipulates the normal process of writing data to each register in the I3C controller. When writing data to each register in the I3C controller, it is necessary to follow this normal process to successfully write. In this embodiment, it is necessary to write slave device information and status information to the target register. The writing timing is the normal process of writing data to the target register in the I3C protocol.

[0069] In some embodiments, the slave device registers may include: a device control register and a device reserved register. The status registers may include: an enable register, an interrupt register, a cache control register, a command response queue register, etc. At the same time, the target register may further include: a prescaler and low-level count register.

[0070] Among them, the prescaler and low-level count register, the device control register, and the device reserved register are all related to the status of the slave device and the I3C controller under the OS. Therefore, it is necessary to use the slave device information and status information for data recovery.

[0071] For the above remaining registers, such as the enable register, the interrupt register, the cache control register, the command response queue register, etc., data recovery needs to be performed according to the I3C protocol specification. For example, the interrupt register needs to be closed after the non-enable register to ensure that the I3C controller does not generate new interrupt responses. Another example is that before restoring the slave device information under the OS, it is necessary to clear the registers related to the cache queue in the controller under the BIOS. Another example is that the non-enable register cannot be enabled before other registers are written, otherwise other registers cannot be written. Another example is that for the command response queue register, it needs to be cleared in the enable register using the cyclic read method, otherwise it cannot normally respond to the read and write requests of the slave device under the OS.

[0072] In some embodiments, the writing timing of each register in the target register includes: non-enable register, close interrupt register, clear cache control register, restore prescaler and low-level count register, restore device control register and device reserved register, clear command response queue register, open interrupt register, enable register. According to the writing timing, the process of writing the backed-up slave device information and status information to the target register is as Figure 3 shown, including: S301, non-enable register; S302, close interrupt register; S303, clear cache control register; S304, restore prescaler and low-level count register; S305, restore device control register and device reserved register; S306, clear command response queue register; S307, open interrupt register; S308, enable register.

[0073] In the embodiments of the present application, in accordance with the I3C protocol specification, writing the backed-up slave device information and status information into the target register can avoid the situation where data cannot be restored or successfully written during the data recovery process.

[0074] In some embodiments of the present application, the slave device information of the improved internal integrated circuit controller under the operating system includes: the information in the slave device register in the improved internal integrated circuit controller under the operating system;

[0075] Determining the target register that needs to perform data recovery from the improved internal integrated circuit controller includes:

[0076] According to the backed-up slave device information and status information, determining the slave device register and status register whose data has changed from the improved internal integrated circuit controller;

[0077] Determining the slave device register and status register whose data has changed as the target register.

[0078] It should be noted that the I3C controller stores the slave device information through the slave device register. Changes in the software environment will cause the slave device information in the slave device register to change. For example, Figure 1 In it, the slave device information of the first slave device and the second slave device is stored in the slave device register under the OS. The slave device information of the third slave device will be stored in the slave device register under the BIOS.

[0079] However, after the software environment changes, not all the slave device information stored in the slave device registers will change. Continuing with Figure 1 as an example, assume that the I3C controller is provided with a first slave device register and a second slave device register. Under the OS, the first slave device register stores the information of the first slave device, and the second slave device register stores the information of the second slave device. When switching to the BIOS, the first slave device register will store the information of the third slave device, and the second slave device register still stores the information of the second slave device. At this time, only the first slave device register needs to be used as the target register, that is, data recovery is performed on the first slave device register. Similarly, after the software environment changes, not all the status information stored in the status registers will change, which will not be elaborated here.

[0080] Therefore, data recovery can be performed only on the slave device registers and status registers whose data has changed due to changes in the software environment. The process of performing data recovery can be as Figure 4 shown, including:

[0081] S401, record the initialization process. This initialization process includes the process of initializing the I3C controller under the OS and the process of initializing the I3C controller under the BIOS.

[0082] S402. Compare the register differences to determine the target register. Determine the register in which the data has changed, i.e., the target register, using the recorded conditions of each register in the initialization process.

[0083] S403. Determine the write timing. Here, based on the I3C protocol, determine the write timing that needs to be followed when writing data to the target register.

[0084] S404. Complete the data recovery of the target register based on the write timing. This process is the same as the process of writing the backed-up slave device information and status information to the target register according to the write timing in the above embodiment, and will not be repeated here.

[0085] In the embodiments of the present application, data recovery can be performed only on the slave device registers and status registers in which the data has changed, thereby improving the efficiency of data recovery.

[0086] In some embodiments of the present application, when the target operation includes an operation of triggering a real-time clock service, in response to the target operation, switch the current software environment from the operating system to the basic input / output system, and back up the slave device information of the improved internal integrated circuit controller under the operating system, including:

[0087] Call the Runtime Server interface under the basic input / output system, and after entering the basic input / output system, read the slave device information of the improved internal integrated circuit controller, and store the read slave device information in the target storage unit.

[0088] It should be noted that after triggering the RTC service, the Runtime Server interface under the BIOS will be called to communicate with the RTC device to obtain time information. Correspondingly, after the software environment is switched back to the OS, the I3C controller after data recovery communicates with the target slave device, and can send the time information to the target slave device, or the I3C controller after data recovery determines a service operation based on the time information, and then communicates with the target slave device based on the determined service operation.

[0089] When backing up the slave device information, the target storage unit can be used to store the backed-up slave device information. Regarding the target storage unit, the storage device in the hardware system can be reused. For example, the target storage unit can be a hard disk drive, a solid-state drive, etc. in the hardware system. A storage device can also be specifically set in the hardware system.

[0090] In some embodiments, the target storage unit includes: non-volatile flash (NVFLASH). The reading and writing of slave device information in the target storage unit can be implemented via the SPI (Serial Peripheral Interface) bus. As Figure 5 shown, the I3C controller can act as an SPI master device and communicate data with the non-volatile flash acting as an SPI slave device via the SPI bus. Among them, the SPI bus at least includes: four transmission lines, namely SCK (Serial Clock), MOSI (Master Out Slave In), MISO (Master In Slave Out), and CS (Chip Select). The I3C controller can read and write the non-volatile flash via the MOSI and MISO transmission lines.

[0091] For example, the slave device information can be read out through the getVariable interface and then stored in the non-volatile flash through the setVariable interface. The getVariable interface and the setVariable interface are a set of interfaces in the runtimesevice of the Unified Extensible Firmware Interface (UEFI) open source framework for saving and setting variables, which will not be elaborated here.

[0092] In the embodiments of the present application, when the target operation includes an operation of triggering the real-time clock service, the Runtime Server interface under the BIOS can be called to communicate with the RTC device to obtain time information. Furthermore, relevant service operations under the OS can be completed with the help of the time information.

[0093] In some embodiments of the present application, when the target operation includes an operation of triggering the real-time clock service, initializing the improved internal integrated circuit controller under the basic input / output system includes:

[0094] Determining the real-time clock device as a slave device of the improved internal integrated circuit controller, and initializing the improved internal integrated circuit controller with the information of the real-time clock device as slave device information.

[0095] It should be noted that in the hardware system, the RTC device is a slave device of the I3C controller under the BIOS. Therefore, after the RTC service is triggered, when the software environment switches to the BIOS, when the I3C controller is initialized, the information of the RTC device is updated as slave device information to the slave device register. Thus, the slave device information in the slave device register under the original OS will be overwritten.

[0096] In the embodiments of the present application, when the target operation includes an operation to trigger the real-time clock service, the RTC device can be used as a slave device of the I3C controller under the BIOS, so that time information can be obtained, and relevant service operations under the OS can be completed with the help of the time information.

[0097] For ease of understanding, the communication method of the I3C controller will be described in detail below with a specific example. Assume that time information is obtained under the OS through the communication method of the I3C controller to complete relevant services. Then, as Figure 6 shown, the process of the communication method includes:

[0098] S601: Determine whether the operation under the OS calls the RTC service. If so, execute S602; if not, S609 can be executed.

[0099] S602: Call the Runtime Service in the BIOS. Specifically, the Time Service in the Runtime Service can be called under the OS, such as GetTime() / SetTime() / GetWakeupTime() / SetWakeupTime(), so as to enter the BIOS environment.

[0100] S603: Read the slave device information of the I3C controller. For example, the target register in the I3C controller is read through the BIOS driver. The target register mainly includes a slave device register and a status register. This process is the same as the process of backing up the slave device information in the above embodiment and will not be elaborated here.

[0101] S604: Write the slave device information into the storage medium. For example, the NV FALSH can be operated through another group of RuntimeService services (i.e., the setVariable interface) under the BIOS, and the obtained slave device information is saved to the NV FLASH by calling the setVariable interface.

[0102] S605: Initialize and communicate with the I3C controller under the BIOS. The initialization process refers to the above process of initializing the I3C controller and will not be repeated here. During the communication process, the RTC device can be operated to read the time information.

[0103] S606: Read the slave device information from the storage medium. For example, the slave device information in the NVFALSH is obtained through the BIOS driver getVariable interface.

[0104] S607: Perform data recovery on the I3C controller using the read slave device information. For example, according to the I3C protocol specification, write the slave device information into the target register of the I3C controller to perform data recovery of the slave device information or the I3C controller.

[0105] S608: Return the result of the Runtime Service call.

[0106] S609: Communicate between the I3C controller and the slave device under the OS. For example, the time information in S605 can be informed to the slave device.

[0107] In the embodiments of the present application, it can be applied to the conflict scenario of the I3C controller in different software environments. By saving the slave device information in the previous software environment through NVFALSH, after being processed by the current software environment, and then according to the I3C protocol, perform recovery processing on its slave device information, so that the slave device information of the I3C controller is no longer affected by different software environments, thereby achieving compatibility in different software environments. It solves the problem that the I3C slave device becomes unavailable due to the conflict of slave device information in different software environments. At the same time, compared with the implementation solution of designing the RTC device as an exclusive path in hardware, it reduces the design cost and saves the I3C bus resources.

[0108] Exemplary device

[0109] Some embodiments of the present application also provide a communication device for an improved internal integrated circuit controller, as Figure 7 shown, the communication device for the improved internal integrated circuit controller includes:

[0110] A response module 701, configured to switch the current software environment from the operating system to the basic input / output system in response to a target operation, and back up the slave device information of the improved internal integrated circuit controller under the operating system;

[0111] A data recovery module 702, configured to perform data recovery on the improved internal integrated circuit controller using the backed-up slave device information after initializing the improved internal integrated circuit controller under the basic input / output system;

[0112] A communication module 703, configured to control the improved internal integrated circuit controller after data recovery to communicate with a target slave device when switching to the operating system, where the target slave device includes the slave device indicated by the backed-up slave device information.

[0113] In some embodiments, the device further includes: a status information module, configured to record the status information of the improved internal integrated circuit controller under the operating system in response to a target operation;

[0114] The data recovery module 702 includes:

[0115] A determination unit, configured to determine a target register that needs to perform data recovery from an improved internal integrated circuit controller, where the target register includes: a slave device register and a status register;

[0116] A data recovery unit, configured to perform data recovery on the target register according to the backed-up slave device information and status information.

[0117] In some embodiments, the data recovery unit is specifically configured to determine the write timing of each register in the target register according to the improved internal integrated circuit protocol; and write the backed-up slave device information and status information into the target register according to the write timing.

[0118] In some embodiments, the write timing of each register in the target register includes: a non-enable register, a disable interrupt register, a clear cache control register, a restore prescaler and low-level count register, a restore device control register and a device reserved register, a clear command response queue register, an enable interrupt register, an enable register.

[0119] In some embodiments, the slave device information of the improved internal integrated circuit controller under the operating system includes: the information in the slave device register in the improved internal integrated circuit controller under the operating system;

[0120] The determination unit is specifically configured to determine the slave device register and the status register in which the data has changed from the improved internal integrated circuit controller according to the backed-up slave device information and status information; and determine the slave device register and the status register in which the data has changed as the target register.

[0121] In some embodiments, the target operation includes: an operation to trigger a real-time clock service.

[0122] In some embodiments, the response module 701 is specifically configured to call the RuntimeServer interface under the basic input / output system, and read the slave device information of the improved internal integrated circuit controller after entering the basic input / output system, and store the read slave device information in the target storage unit.

[0123] In some embodiments, the target storage unit includes: a non-volatile flash memory.

[0124] In some embodiments, initializing the improved internal integrated circuit controller under the basic input / output system includes: determining the real-time clock device as the slave device of the improved internal integrated circuit controller, and initializing the improved internal integrated circuit controller with the information of the real-time clock device as the slave device information.

[0125] The communication device of the improved internal integrated circuit controller provided by the embodiment of the present application belongs to the same inventive concept as the communication method of the improved internal integrated circuit controller provided by the above embodiment of the present application. For technical details not described in detail in this embodiment, reference may be made to the specific processing content of the communication method of the improved internal integrated circuit controller provided by the above embodiment of the present application, which will not be elaborated here.

[0126] Exemplary Electronic Device

[0127] Another embodiment of the present application further provides an electronic device, including a processor configured to execute the steps in the communication method of the improved internal integrated circuit controller according to various embodiments of the present application described in the above embodiment of the present application. Refer to Figure 8 As shown, an exemplary embodiment of the present application further provides an electronic device, including: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes the steps in the communication method of the improved internal integrated circuit controller according to various embodiments of the present application described in the above embodiment of the present application.

[0128] The internal structure of the electronic device may be as Figure 8 As shown, the electronic device includes a processor, a memory, a network interface, and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it performs the steps in the communication method of the improved internal integrated circuit controller according to various embodiments of the present application described in the above embodiment of the present application.

[0129] The processor may include a main processor, and may also include a baseband chip, a modem, etc.

[0130] The memory stores a program for implementing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include program code, and the program code includes computer operation instructions. More specifically, the memory may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk memory, a flash memory, etc.

[0131] The processor can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the solution of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0132] The input device can include devices for receiving user input data and information, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer or a gravity sensor, etc.

[0133] The output device can include devices for allowing output of information to the user, such as a display screen, a printer, a speaker, etc.

[0134] The communication interface can include devices of any transceiver type for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.

[0135] The processor executes the program stored in the memory and calls other devices, which can be used to implement each step of any of the improved internal integrated circuit controller communication methods provided in the above embodiments of the present application.

[0136] The electronic device can also include a display component and a voice component. The display component can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covered on the display component, or a button, a trackball or a touchpad provided on the housing of the electronic device, or an external keyboard, a touchpad or a mouse, etc.

[0137] Those skilled in the art can understand that Figure 8 the structure shown in

[0138] Exemplary Computer Program Product and Storage Medium

[0139] In addition to the above methods and devices, the improved internal integrated circuit controller communication method provided by the embodiments of the present application may also be a computer program product, which includes computer program instructions. When the computer program instructions are run by a processor, the processor is caused to execute the steps in the improved internal integrated circuit controller communication method according to various embodiments of the present application described in the "Exemplary Method" section above.

[0140] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present application. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0141] In addition, the embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. The computer program is executed by a processor to perform the steps in the improved internal integrated circuit controller communication method according to various embodiments of the present application described in the "Exemplary Method" section above.

[0142] Those of ordinary skill in the art can understand that to implement all or part of the processes in the above embodiments, it can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it may include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the present application may include non-volatile and / or volatile memories. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0143] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.

[0144] The above-described embodiments only represent several embodiments of this application, and the description thereof is relatively specific and detailed. However, it should not be construed as a limitation on the scope of the solutions provided by the embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims

1. A communication method for an improved internal integrated circuit controller, characterized in that, The method includes: In response to a target operation, switching the current software environment from the operating system to the basic input / output system, and backing up the slave device information of the improved integrated circuit controller under the operating system; After initializing the improved integrated circuit controller under the basic input / output system, performing data recovery on the improved integrated circuit controller by using the backed-up slave device information; When switching to the operating system, controlling the improved integrated circuit controller after data recovery to communicate with a target slave device, where the target slave device includes the slave device indicated by the backed-up slave device information.

2. The method according to claim 1, characterized in that, The method further includes: In response to the target operation, recording the status information of the improved integrated circuit controller under the operating system; Performing data recovery on the improved integrated circuit controller by using the backed-up slave device information includes: Determining target registers in the improved integrated circuit controller that need to perform data recovery, where the target registers include: slave device registers and status registers; Performing data recovery on the target registers according to the backed-up slave device information and the status information.

3. The method according to claim 2, wherein Performing data recovery on the target registers according to the backed-up slave device information and the status information includes: Determining the write timing of each register in the target registers according to the improved integrated circuit protocol; Writing the backed-up slave device information and the status information into the target registers according to the write timing.

4. The method according to claim 3, wherein The write timing of each register in the target registers includes: non-enable register, disable interrupt register, clear cache control register, restore prescaler and low-level count register, restore device control register and device reserved register, clear command response queue register, enable interrupt register, enable register.

5. The method according to claim 2, wherein The slave device information of the improved integrated circuit controller under the operating system includes: the information in the slave device registers in the improved integrated circuit controller under the operating system; Determining target registers in the improved integrated circuit controller that need to perform data recovery includes: Determining the slave device registers and status registers whose data has changed in the improved integrated circuit controller according to the backed-up slave device information and the status information; Determining the slave device registers and status registers whose data has changed as target registers.

6. The method according to claim 1, wherein The target operation includes: an operation that triggers the real-time clock service.

7. The method according to claim 6, wherein In response to a target operation, switching the current software environment from the operating system to the basic input / output system, and backing up the slave device information of the improved integrated circuit controller under the operating system includes: Invoking the Runtime Server interface under the basic input / output system, and after entering the basic input / output system, reading the slave device information of the improved integrated circuit controller, and storing the read slave device information into a target storage unit.

8. The method according to claim 7, characterized in that The target storage unit includes: non-volatile flash memory.

9. The method according to claim 6, wherein Initializing the improved integrated circuit controller under the basic input / output system includes: Determine the real-time clock device as a slave device of the improved internal integrated circuit controller, and initialize the improved internal integrated circuit controller with the information of the real-time clock device as slave device information.

10. A communication device for an improved internal integrated circuit controller, characterized in that, The communication device of the improved internal integrated circuit controller includes: A response module, configured to switch the current software environment from the operating system to the basic input / output system in response to a target operation, and back up the slave device information of the improved internal integrated circuit controller under the operating system; A data recovery module, configured to perform data recovery on the improved internal integrated circuit controller by using the backed-up slave device information after initializing the improved internal integrated circuit controller under the basic input / output system; A communication module, configured to control the improved internal integrated circuit controller after data recovery to communicate with a target slave device when switching to the operating system, wherein the target slave device includes the slave device indicated by the backed-up slave device information.

11. An electronic device, characterized in that, Comprising a processor configured to execute the communication method of the improved internal integrated circuit controller according to any one of claims 1 to 9.

12. A computer program product, characterized in that, A computer program is stored on the computer program product, and when the computer program is executed by a processor, the communication method of the improved internal integrated circuit controller according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • I3C circuit device, I3C circuit system and communication method

    CN107967230A

  • Firmware burning method, device and equipment

    CN116820495A

  • Basic input and output system configuration updating method, server and equipment

    CN118747080A

  • System and method for overcoming in-band interrupt starvation with dynamic address remapping

    US20210271619A1

  • Dual-computer hot standby system

    WO2021073105A1