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

CN120407457BActive Publication Date: 2026-09-18PHYTIUM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0004]然而,当软件环境从OS切换至BIOS,再切换回OS之后,经常会出现I3C控制器无法与其从设备进行通信的问题

Benefits of technology

[0018] The improved communication method for an internal integrated circuit controller provided in this application allows for the backup of slave device information of the I3C controller under the OS when switching from the current software environment to BIOS. After initializing the I3C controller under BIOS, the backed-up slave device information is used to restore the I3C controller's data. Thus, after new slave device information overwrites the slave device information of the I3C controller under the OS, the data recovery process ensures that the slave device information of the I3C controller is recalibrated to match the information of the slave devices under the OS. Upon switching to the OS, the data-restored I3C controller can successfully communicate with its slave devices, avoiding the situation where the I3C controller cannot communicate with its slave devices due to the new slave device information being overwritten.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407457B_ABST
    Figure CN120407457B_ABST
Patent Text Reader

Abstract

This application discloses a communication method, apparatus, electronic device, and computer program product for a controller, applied in the field of improved internal integrated circuit technology. The method includes: in response to a target operation, switching the current software environment from an operating system to a basic input / output system (BIOS), and backing up the slave device information of the improved internal integrated circuit controller under the BIOS; after initializing the improved internal integrated circuit controller under the BIOS, restoring the data of the improved internal integrated circuit controller using the backed-up slave device information; and, upon switching to the operating system, controlling the restored improved internal integrated circuit controller to communicate with the target slave device. This application can avoid the situation where the improved internal integrated circuit controller cannot communicate with its slave devices due to the slave device information being overwritten by new slave device information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of improved internal integrated circuit technology, and more particularly to a communication method, apparatus, electronic device, and computer program product for a controller. Background Technology

[0002] With the rise of multifunctional smart hardware devices, the number of sensors and other devices that need to be integrated into hardware systems is increasing. In scenarios using the Inter-Integrated Circuit (I2C) bus, numerous requirements arise for signals such as interrupts, chip select, enable, and sleep, leading to increased chip costs and design complexity. Therefore, a faster, more efficient, and lower-power bus protocol has emerged: the Improved Inter-Integrated Circuit (I3C) bus protocol. The I3C bus protocol is not only compatible with the I2C bus protocol but also incorporates many new features such as support for in-band interrupts, dynamic addressing, and more advanced power management. An I3C controller can use a single I3C bus to combine multiple slave devices, such as sensors, and enable them to communicate with each other. For example, electrically erasable programmable read-only memory (EEPROM) and temperature sensors can be connected to the I3C bus as slave devices.

[0003] Currently, in hardware systems using the I3C bus, to ensure normal startup, stable operation, and efficient resource management, the software environment typically includes a Basic Input Output System (BIOS) and an Operating System (OS). In some business scenarios, it's necessary to switch between these two software environments. For example, to obtain time from a Real-Time Clock (RTC) device under the OS, it's necessary to switch to the BIOS, and then switch back to the OS to use the obtained time for business operations.

[0004] However, when the software environment is switched from OS to BIOS and then back to OS, the I3C controller often fails to communicate with its slave devices. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides a communication method, apparatus, electronic device, and computer program product for a controller, so as to ensure smooth communication between the I3C controller and its slave devices after the software environment is switched back to the OS.

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

[0007] In a first aspect, embodiments of this application provide an improved communication method for an internal integrated circuit controller, the improved communication method for the internal integrated circuit controller comprising:

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

[0009] After initializing the improved internal integrated circuit controller under the basic input / output system, data recovery of the improved internal integrated circuit controller is performed using the backup slave device information;

[0010] When switching to the operating system, the improved internal integrated circuit controller after control data recovery communicates with the target slave device, wherein the target slave device includes the slave device indicated by the backup slave device information.

[0011] Secondly, embodiments of this application provide a communication device for an improved internal integrated circuit controller, the communication device for the improved internal integrated circuit controller comprising:

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

[0013] The data recovery module is used to recover data from the improved internal integrated circuit controller after initialization under the basic input / output system, using the backed-up slave device information.

[0014] A communication module is used to communicate between an improved internal integrated circuit controller and a target slave device after data recovery, in the event of a switch to an operating system, wherein the target slave device includes the slave device indicated by the backup slave device information.

[0015] Thirdly, embodiments of this application provide an electronic device including a processor configured to perform a communication method of an improved internal integrated circuit controller as described in the first aspect.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the communication method of the improved internal integrated circuit controller as described in the first aspect.

[0017] Fifthly, embodiments of this application provide a computer program product or a computer program, the computer program product including a computer program 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, it implements the steps of the communication method of the improved internal integrated circuit controller as described in the first aspect.

[0018] The improved communication method for an internal integrated circuit controller provided in this application allows for the backup of slave device information of the I3C controller under the OS when switching from the current software environment to BIOS. After initializing the I3C controller under BIOS, the backed-up slave device information is used to restore the I3C controller's data. Thus, after new slave device information overwrites the slave device information of the I3C controller under the OS, the data recovery process ensures that the slave device information of the I3C controller is recalibrated to match the information of the slave devices under the OS. Upon switching to the OS, the data-restored I3C controller can successfully communicate with its slave devices, avoiding the situation where the I3C controller cannot communicate with its slave devices due to the new slave device information being overwritten. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0020] Figure 1 A schematic diagram illustrating an application scenario of an improved communication method for an internal integrated circuit controller provided in this application embodiment;

[0021] Figure 2 One of the flowcharts illustrating an improved communication method for an internal integrated circuit controller provided in this application embodiment;

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

[0023] Figure 4 This is a schematic diagram illustrating the data recovery process in an embodiment of this application;

[0024] Figure 5 This is a schematic diagram illustrating the data communication between the I3C controller and the non-volatile flash memory via the SPI bus in an embodiment of this application.

[0025] Figure 6 A second schematic flowchart illustrating an improved communication method for an internal integrated circuit controller provided in this application embodiment;

[0026] Figure 7 A structural block diagram of a communication device for an improved internal integrated circuit controller provided in this application embodiment;

[0027] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0028] Unless otherwise defined, the technical or scientific terms used in the embodiments of this specification shall have the ordinary meaning understood by one of ordinary skill in the art to which this specification pertains. The terms "first," "second," and similar terms used in the embodiments of this specification do not indicate any order, quantity, or importance, but are merely used to avoid confusion of constituent elements.

[0029] Unless the context otherwise requires, throughout this specification, "a plurality of" means "at least two," and "including" is interpreted as open-ended or encompassing, that is, "including, but not limited to." In the description of this specification, terms such as "one embodiment," "some embodiments," "exemplary embodiment," "example," "specific example," or "some examples" are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this specification. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the embodiments described below are to be understood as implementation methods.

[0030] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0031] Overview

[0032] As described in the background section, in some business scenarios, the software environment typically switches between the OS and BIOS. When switching to the BIOS, the I3C controller needs to be initialized, which overwrites the slave device information in the I3C controller. The overwritten slave device information then becomes the information of the relevant slave devices under the BIOS. Therefore, when switching back to the OS, if the I3C controller tries to communicate with its slave devices, the communication will fail because its currently stored slave device information is from the BIOS.

[0033] Taking a time acquisition scenario as an example, an RTC device, as a specialized device for maintaining and tracking time, provides an essential and accurate time reference for the hardware system. Since the operating system (OS) does not describe the RTC device, it typically needs to communicate with it via a specific interface in the BIOS to obtain the time. Upon entering the BIOS, the I3C controller is reinitialized, causing the slave device information of the I3C controller to be overwritten by the RTC device's information. Upon returning to the OS, because the slave device information has been overwritten with the RTC device's information, the I3C controller can no longer communicate with its slave devices.

[0034] To address the aforementioned technical limitations, the inventors of this application propose a method to back up the slave device information of the I3C controller under the OS when switching from the current software environment to BIOS. After initializing the I3C controller under BIOS, the backed-up slave device information is used to restore the I3C controller's data. Thus, after the new slave device information overwrites the OS-based I3C controller's slave device information, the data recovery process ensures that the I3C controller's slave device information is recalibrated to match the OS-based information. Upon switching to the OS, the data-restored I3C controller can then communicate smoothly with its slave devices, preventing the I3C controller from being unable to communicate with its slave devices due to the new slave device information being overwritten.

[0035] Exemplary methods

[0036] This application provides an improved communication method for an internal integrated circuit controller. This method can be applied to hardware devices using the I3C bus, which have both an OS and a BIOS software environment and can switch between them during business operations. For example, the structure of the hardware device can be as follows: Figure 1 As shown, it includes: an I3C master device and multiple slave devices (including but not limited to...) Figure 1The system consists of three slave devices (first slave device, second slave device, and third slave device), a serial data line (SDA), a serial clock line (SCL), an I3C driver under the OS, an I3C driver under the BIOS, and a memory unit.

[0037] The I3C controller in the I3C master device communicates with each slave device via the SDA and SCL lines. Under the OS, the I3C driver operates on some slave devices (such as the first and second slave devices) and can save their information to the I3C controller. Under the BIOS, the I3C driver operates on other slave devices (such as the third slave device) and can also save their information to the I3C controller. Simultaneously, the BIOS-based I3C driver can operate on the memory unit through a specific interface, saving information from the I3C controller to that memory unit. It's important to note that during communication between the I3C master and slave devices, the drivers for different slave devices may reside in different software environments. Therefore, any slave device can be considered a slave device within its corresponding software environment. For example, the first and second slave devices are controlled by the OS-based I3C driver, while the third slave device is controlled by the BIOS-based I3C driver. Thus, the first and second slave devices can be considered OS-based slave devices, and the third slave device can be considered a BIOS-based slave device.

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

[0039] S201: 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.

[0040] In this step, the target operation includes any operation that triggers a switch from the OS to the BIOS in the software environment. This can include operations that directly trigger the switch, such as a system firmware update. It can also include operations that trigger a specified service, which can then trigger the switch. For example, the target operation could include triggering an RTC service. The specified service includes, but is not limited to, the RTC service. For example, the specified service could also include initialization services for certain advanced security features, power management settings, or specific hardware.

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

[0042] The backed-up slave device information is the information required by the I3C controller under the OS to communicate with its slave devices. For example, slave device information includes: the slave device's temporary ID, address mode, I3C address, I3C mode, etc. Therefore, under the OS, the I3C controller can communicate with its slave devices based on this slave device information. For example... Figure 1 As shown, the slave device information includes: information about the first slave device and / or information about 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 using the slave device information.

[0043] In some embodiments, when backing up the slave device information of the I3C controller under the OS, this slave device information may only include information about the slave devices required to implement the specified services described above. For example, Figure 1 In this case, if only the second slave device is required to implement a specified service, then only the information of the second slave device needs to be backed up. Of course, to avoid omissions, 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, the I3C controller allocates a dynamic address to each slave device. For I3C slave devices that already have I2C static addresses, a dynamic address is allocated using the SETDASA generic command code; for I3C slave devices that do not have I2C static addresses, an address is allocated using the ENTDAABroadcast generic command code. Furthermore, during initialization, the I3C controller stores slave device information, such as configuration information, address information, device characteristic registers, and bus characteristic registers, in 12 sets of reserved device registers. The first set of reserved device registers stores information about the I3C controller itself, and the remaining 11 sets store slave device information.

[0045] It is worth noting 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 be used as the new slave device information, overwriting 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, data recovery of the improved internal integrated circuit controller is performed using the backup slave device information.

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

[0048] In some embodiments, when the target operation includes triggering the RTC service, after switching to BIOS to initialize the I3C controller, the I3C controller can first 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 can be restored using the backed-up slave device information.

[0049] The specific process of data recovery is not detailed here. It's worth noting that after data recovery, upon switching back to the OS, the recovered I3C controller can communicate smoothly with the slave devices under the OS based on the current slave device information. Continuing... Figure 1 For example, the I3C controller, after data recovery, can continue to communicate with the first slave device and / or the second slave device.

[0050] S203: When switching to the operating system, the improved internal integrated circuit controller, after the control data is recovered, communicates 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. Because the I3C controller restores the slave device information under the OS through data recovery, it can successfully communicate with the slave device under the OS. For example, when the target operation includes triggering the RTC service, in the case of switching to the OS, the I3C controller, after data recovery, communicates with the target slave device to inform it of the current time obtained from the RTC device.

[0052] In some embodiments, after the current software environment switches from BIOS to OS, the I3C controller can be initialized again. The initialization process for the I3C controller is similar to that under BIOS, and will not be described again here. It is worth noting that, to avoid driver conflicts, slave devices under OS differ from slave devices under BIOS. For example, slave devices under BIOS, such as RTC devices, are not described under OS.

[0053] In this embodiment, when switching from the OS to the BIOS in the current software environment, the slave device information of the I3C controller under the OS can be backed up. After initializing the I3C controller under the BIOS, the backed-up slave device information is used to restore the I3C controller's data. Thus, after the new slave device information overwrites the I3C controller's slave device information under the OS, the data recovery process ensures that the I3C controller's slave device information is recalibrated to match the information of the I3C controller's slave devices under the OS. When switching to the OS, the data-restored I3C controller can successfully communicate with its slave devices. This avoids the I3C controller being unable to communicate with its slave devices due to the new slave device information being overwritten.

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

[0055] Data recovery of the improved internal integrated circuit controller is performed using backup slave device information, including:

[0056] The target registers for data recovery are determined from the improved internal integrated circuit controller, including the slave device register and the status register.

[0057] Data is recovered from the target register based on the backed-up slave device information and status information.

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

[0059] To prevent the I3C controller's own state from affecting normal communication, this embodiment restores not only the slave device information but also the I3C controller's state information during data recovery. By restoring both the slave device and state information, the communication environment between the I3C controller and the target slave device is consistent after switching back to the OS and before the OS switch-out. The I3C controller can then communicate normally with the target slave device, just as it did before the OS switch-out.

[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, data recovery of the slave device registers can be performed solely based on the backup slave device information.

[0061] The status register is a register in the I3C controller that stores status information. Status information may include, for example, information about the status register's enable, interrupt, buffer, and command response.

[0062] The slave device register is a register in the I3C controller that stores slave device information. For details regarding slave device information, please refer to the relevant descriptions in the above embodiments; they will not be repeated here.

[0063] In this embodiment, both the slave device information and status information are restored simultaneously, ensuring that the communication environment between the I3C controller and the target slave device is consistent after switching back to the OS and before switching away from the slave OS. This avoids the I3C controller's own state affecting normal communication.

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

[0065] The write timing of each register in the target register is determined according to the improved internal integrated circuit protocol;

[0066] According to the write sequence, the backed-up slave device information and status information are written to the target register.

[0067] It should be noted that due to the coupling relationships between the various registers of the I3C controller, restoring the I3C controller cannot involve directly writing the backup information into each register; a specific timing sequence is required for restoration. In I3C controller communication scenarios, the coupling relationships between registers are specified in the I3C protocol. The I3C protocol is an improvement upon the I2C protocol, which will not be detailed here. In other words, all communication processes with the I3C controller, and all operations on the I3C controller, must adhere to the I3C protocol; otherwise, the I3C controller may malfunction, and consequently, it will be unable to communicate properly with its slave devices.

[0068] Understandably, the I3C protocol specifies the normal procedure for writing data to the registers in the I3C controller. Successful writing requires following this normal procedure. In this embodiment, slave device information and status information need to be written to the target register. The writing timing follows the normal procedure for writing data to the target register according to the I3C protocol.

[0069] In some embodiments, the slave device register may include a device control register and a device reserved register. The status register may include an enable register, an interrupt register, a buffer control register, a command response queue register, etc. The target register may also include a prescaler and a low-level count register.

[0070] Among them, the prescaler and low-level count register, device control register, and 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 slave device information and status information for data recovery.

[0071] The remaining registers mentioned above, such as enable registers, interrupt registers, cache control registers, and command response queue registers, all need to be restored according to the I3C protocol specifications. For example, after deactivating a register, the interrupt register needs to be disabled to ensure that the I3C controller does not generate new interrupt responses. Also, before restoring slave device information under the OS, registers related to the cache queue in the controller under the BIOS need to be cleared. Furthermore, a deactivated register cannot be enabled before other registers are written to; otherwise, other registers cannot be written to. Additionally, the command response queue register needs to be cleared using a circular read method within the enable register; otherwise, it cannot properly respond to slave device read / write requests under the OS.

[0072] In some embodiments, the write timing sequence of each register in the target register includes: disabling the register, disabling the interrupt register, clearing the buffer control register, restoring the prescaler and low-level count registers, restoring the device control register and device reserved register, clearing the command response queue register, enabling the interrupt register, and enabling the register. The process of writing the backed-up slave device information and status information into the target register according to the write timing sequence is as follows: Figure 3 As shown, it includes: S301, disable register; S302, disable interrupt register; S303, clear buffer 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, enable interrupt register; S308, enable register.

[0073] In this embodiment of the application, the backed-up slave device information and status information are written to the target register in accordance with the I3C protocol specification, which can avoid the situation where data cannot be recovered or cannot be successfully written during the data recovery process.

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

[0075] Identify the target registers from the improved internal integrated circuit controller that require data recovery, including:

[0076] Based on the backed-up slave device information and status information, determine the slave device registers and status registers from the improved internal integrated circuit controller where data has changed;

[0077] The slave device registers and status registers whose data have changed are identified as the target registers.

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

[0079] However, with changes in the software environment, not all slave device information stored in slave device registers will change. Continuing... Figure 1 For example, suppose the I3C controller has a first slave device register and a second slave device register. Under the operating system, the first slave device register stores information about the first slave device, and the second slave device register stores information about the second slave device. When switching to the BIOS, the first slave device register will store information about the third slave device, while the second slave device register will still store information about the second slave device. In this case, simply use the first slave device register as the target register to restore its data. Similarly, changes in the software environment do not necessarily change the status information stored in all status registers; this will not be discussed in detail 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 data recovery process can be as follows: Figure 4 As shown, it includes:

[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 register differences to determine the target register. Using the information recorded in the initialization process, determine the register where the data has changed, i.e., the target register.

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

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

[0085] In this embodiment, data recovery can be performed only on the slave device registers and status registers where the data has changed, thereby improving the efficiency of data recovery.

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

[0087] Call the Runtime Server interface under the Basic Input / Output System (PIOS), and after entering the PIOS environment, read the slave device information of the improved internal integrated circuit controller and store the read slave device information to the target storage unit.

[0088] It should be noted that after triggering the RTC service, the Runtime Server interface under the BIOS will be invoked 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. It can send this time information to the target slave device, or the I3C controller, after data recovery, determines the service operation based on this time information, and then communicates with the target slave device based on the determined service operation.

[0089] When backing up slave device information, a target storage unit can be used to store the backed-up slave device information. This target storage unit can reuse storage devices within the hardware system; for example, it can be a hard disk drive (HDD), solid-state drive (SSD), or a dedicated storage device within the hardware system.

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

[0091] For example, device information can be read from the getVariable interface and then stored in non-volatile flash memory using the setVariable interface. The getVariable and setVariable interfaces are a set of interfaces used to save and set variables in the runtimesevice of the Unified Extensible Firmware Interface (UEFI) open-source framework, which will not be described in detail here.

[0092] In this embodiment, when the target operation includes triggering the real-time clock service, the Runtime Server interface under the BIOS can be invoked to communicate with the RTC device to obtain time information. This time information can then be used to complete relevant business operations under the OS.

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

[0094] The real-time clock device is identified as a slave device of the improved internal integrated circuit controller, and the information of the real-time clock device is used as slave device information to initialize the improved internal integrated circuit controller.

[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 BIOS, the I3C controller updates the slave device register as slave device information during initialization. This will overwrite the slave device information originally in the OS's slave device register.

[0096] In this embodiment of the application, when the target operation includes triggering the real-time clock service, the RTC device can be used as a slave device of the I3C controller under the BIOS, thereby obtaining time information and using the time information to complete the relevant business operations under the OS.

[0097] To facilitate understanding, a specific example will be used below to explain the communication methods of the I3C controller in detail. Assume that time information is obtained under the OS through the communication methods of the I3C controller to complete related business tasks. Then, as... Figure 6 As shown, the communication method includes the following steps:

[0098] S601: Determine whether the operation under the OS calls the RTC service. If so, execute S602; otherwise, execute S609.

[0099] S602: Call the Runtime Service in the BIOS. Specifically, you can call the Time Service in the Runtime Service under the OS, such as GetTime() / SetTime() / GetWakeupTime() / SetWakeupTime(), thereby entering the BIOS environment.

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

[0101] S604: Write slave device information to storage media. For example, NV FLASH can be operated through another set of RuntimeService services under BIOS (i.e., the setVariable interface). Calling the setVariable interface will save the obtained slave device information to NV FLASH.

[0102] S605: Initialize the I3C controller and establish communication under BIOS. The initialization process is the same as the I3C controller initialization process described above, and will not be repeated here. During communication, the RTC device can be operated to read time information.

[0103] S606: Read slave device information from storage media. For example, obtain slave device information from NVFALSH through the BIOS driver's 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, the slave device information is written into the target register of the I3C controller to perform slave device information or I3C controller data recovery.

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

[0106] S609: Communication between the I3C controller and slave devices under the OS. For example, time information from S605 can be communicated to the slave device.

[0107] This application's embodiments can be applied to scenarios where different software environments conflict with the I3C controller. By saving slave device information from the previous software environment using NVFALSH, processing it in the current software environment, and then restoring the slave device information according to the I3C protocol, the slave device information of the I3C controller is no longer affected by different software environments, thus achieving compatibility across different software environments. This solves the problem of I3C slave devices becoming unusable due to conflicts in slave device information under different software environments. Furthermore, compared to hardware implementations that design the RTC device as a dedicated channel, this reduces design costs and saves I3C bus resources.

[0108] Exemplary device

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

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

[0111] The data recovery module 702 is used to recover data from 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] The communication module 703 is used to communicate with the target slave device after the control data is restored when switching to the operating system, wherein the target slave device includes a slave device indicated by the backup slave device information.

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

[0114] Data recovery module 702 includes:

[0115] A determining unit is used to determine the target register from the improved internal integrated circuit controller that needs to be data recovered, wherein the target register includes: a slave device register and a status register;

[0116] The data recovery unit is used to recover data from the target register based on the backed-up slave device information and status information.

[0117] In some embodiments, the data recovery unit is specifically used to determine the write timing of each register in the target register according to the improved internal integrated circuit protocol; and to 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: disabling the register, disabling the interrupt register, clearing the buffer control register, restoring the prescaler and low-level count register, restoring the device control register and device reserved register, clearing the command response queue register, enabling the interrupt register, and enabling the register.

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

[0120] The determining unit is specifically used to determine the slave device registers and status registers whose data has changed from the improved internal integrated circuit controller based on the backed-up slave device information and status information; and to determine the slave device registers and status registers whose data has changed as target registers.

[0121] In some embodiments, the target operation includes triggering a real-time clock service.

[0122] In some embodiments, the response module 701 is specifically used to call the RuntimeServer 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 to the target storage unit.

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

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

[0125] The communication device for the improved internal integrated circuit controller provided in this application embodiment belongs to the same inventive concept as the communication method for the improved internal integrated circuit controller provided in the above embodiments of this application. Technical details not described in detail in this embodiment can be found in the specific processing content of the communication method for the improved internal integrated circuit controller provided in the above embodiments of this application, and will not be repeated here.

[0126] Exemplary electronic devices

[0127] Another embodiment of this application also provides an electronic device including a processor configured to perform steps in the communication method of the improved internal integrated circuit controller according to various embodiments of this application described above. See also Figure 8 As shown, an exemplary embodiment of this application also provides an electronic device, including: a memory and a processor, the memory storing a computer program, the processor executing the computer program to perform steps in the communication method of the improved internal integrated circuit controller according to various embodiments of this application described above.

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

[0129] The processor may include the main processor, as well as baseband chips, modems, etc.

[0130] The memory stores a program that executes the technical solution of this invention, and may also store an operating system and other critical business functions. Specifically, the program may include program code, which includes computer operation instructions. More specifically, the memory may include read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), other types of dynamic storage devices capable of storing information and instructions, disk storage, 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 used to control the execution of the program of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0132] Input devices may include devices that receive data and information input by the user, such as keyboards, mice, cameras, scanners, light pens, voice input devices, touch screens, pedometers, or gravity sensors.

[0133] Output devices may include devices that allow information to be output to a user, such as displays, printers, speakers, etc.

[0134] The communication interface may include any transceiver-like device 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 the various steps of the communication method of any of the improved internal integrated circuit controllers provided in the above embodiments of this application.

[0136] The electronic device may also include a display component and a voice component. The display component may be a liquid crystal display screen or an e-ink display screen. The input device of the electronic device may be a touch layer covering the display component, or a button, trackball or touchpad set on the casing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0137] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0138] Exemplary computer program products and storage media

[0139] In addition to the methods and devices described above, the communication method of the improved internal integrated circuit controller provided in the embodiments of this application can also be a computer program product, which includes computer program instructions that, when executed by a processor, cause the processor to perform the steps in the communication method of the improved internal integrated circuit controller according to various embodiments of this application as described in the "Exemplary Methods" section above.

[0140] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0141] Furthermore, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor of the steps in the communication method of the improved internal integrated circuit controller according to various embodiments of this application as described in the "Exemplary Methods" section above.

[0142] Those skilled in the art will understand that all or part of the processes described in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0143] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this application.

[0144] The embodiments described above are merely illustrative of several implementations of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the solutions provided by the embodiments of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. An improved communication method for an internal integrated circuit controller, characterized in that, The method includes: In response to the target operation, the current software environment is switched from the operating system to the basic input / output system, and the slave device information of the improved internal integrated circuit controller under the operating system is backed up; After initializing the improved internal integrated circuit controller under the basic input / output system, data recovery of the improved internal integrated circuit controller is performed using the backup slave device information; When switching to the operating system, the improved internal integrated circuit controller after control data recovery communicates with the target slave device, wherein the target slave device includes the slave device indicated by the backup 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 state information of the improved internal integrated circuit controller under the operating system; Data recovery of the improved internal integrated circuit controller is performed using backup slave device information, including: The target register for data recovery is determined from the improved internal integrated circuit controller, wherein the target register includes a slave device register and a status register; Data recovery is performed on the target register based on the backed-up slave device information and the status information.

3. The method according to claim 2, characterized in that, Data recovery of the target register is performed based on the backed-up slave device information and the status information, including: The write timing of each register in the target register is determined according to the improved internal integrated circuit protocol; According to the writing sequence, the backed-up slave device information and the status information are written into the target register.

4. The method according to claim 3, characterized in that, The write timing sequence of each register in the target register includes: disabling the register, disabling the interrupt register, clearing the buffer control register, restoring the prescaler and low-level count register, restoring the device control register and device reserved register, clearing the command response queue register, enabling the interrupt register, and enabling the register.

5. The method according to claim 2, characterized in that, The slave device information of the improved internal integrated circuit controller under the operating system includes: information in the slave device register of the improved internal integrated circuit controller under the operating system; Determining the target register from the improved internal integrated circuit controller that requires data recovery includes: Based on the backed-up slave device information and the status information, the slave device registers and status registers whose data has changed are determined from the improved internal integrated circuit controller; The slave device registers and status registers whose data have changed are identified as the target registers.

6. The method according to claim 1, characterized in that, The target operation includes triggering the real-time clock service.

7. The method according to claim 6, characterized in that, In response to the target operation, the current software environment is switched from the operating system to the basic input / output system, and the slave device information of the improved internal integrated circuit controller under the operating system is backed up, including: Call the Runtime Server interface under the Basic Input / Output System (PIOS), and after entering the PIOS environment, read the slave device information of the improved internal integrated circuit controller and store the read slave device information to the 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, characterized in that, Initialize the improved internal integrated circuit controller under the basic input / output system, including: The real-time clock device is identified as a slave device of the improved internal integrated circuit controller, and the information of the real-time clock device is used as slave device information to initialize the improved internal integrated circuit controller.

10. A communication device with an improved internal integrated circuit controller, characterized in that, The communication device of the improved internal integrated circuit controller includes: The response module is used to switch the current software environment from the operating system to the basic input / output system in response to the target operation, and to back up the slave device information of the improved internal integrated circuit controller under the operating system. The data recovery module is used to recover data from the improved internal integrated circuit controller after initialization under the basic input / output system, using the backed-up slave device information. A communication module is used to communicate between an improved internal integrated circuit controller and a target slave device after data recovery, in the event of a switch to an operating system, wherein the target slave device includes the slave device indicated by the backup slave device information.

11. An electronic device, characterized in that, Includes a processor configured to perform the communication method of the improved internal integrated circuit controller as described in any one of claims 1 to 9.

12. A computer program product, characterized in that, The computer program product stores a computer program, which, when executed by a processor, implements the communication method of the improved internal integrated circuit controller as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Firmware burning method, device and equipment

    CN116820495A

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

    CN118747080A