TWI765257B - Firmware update method and device for USB-PD charger - Google Patents

Firmware update method and device for USB-PD charger Download PDF

Info

Publication number
TWI765257B
TWI765257B TW109114609A TW109114609A TWI765257B TW I765257 B TWI765257 B TW I765257B TW 109114609 A TW109114609 A TW 109114609A TW 109114609 A TW109114609 A TW 109114609A TW I765257 B TWI765257 B TW I765257B
Authority
TW
Taiwan
Prior art keywords
usb
charger
message
firmware update
host device
Prior art date
Application number
TW109114609A
Other languages
Chinese (zh)
Other versions
TW202139021A (en
Inventor
張華棟
Original Assignee
大陸商廣州昂寶電子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大陸商廣州昂寶電子有限公司 filed Critical 大陸商廣州昂寶電子有限公司
Publication of TW202139021A publication Critical patent/TW202139021A/en
Application granted granted Critical
Publication of TWI765257B publication Critical patent/TWI765257B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本發明涉及用於USB-PD充電器的韌體更新方法和裝置。提供了一種由USB-PD充電器執行的方法,包括:接收由USB-PD主控裝置基於從終端設備接收到的更新指令而發送的第一訊息;在基於第一訊息驗證USB-PD主控裝置合法時,向USB-PD主控裝置發送第一確認訊息,並且將USB-PD充電器的USB-PD IC模組用於執行程式的指標從使用者程式碼空間跳轉到在系統程式設計程式碼空間;接收由USB-PD主控裝置基於從終端設備接收到的韌體更新資料而發送的第二訊息,並且將第二訊息中的韌體更新資料寫入使用者程式碼空間;以及向USB-PD主控裝置發送第二確認訊息,並且將USB-PD充電器的USB-PD IC模組用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間。 The present invention relates to a firmware update method and device for a USB-PD charger. Provided is a method executed by a USB-PD charger, comprising: receiving a first message sent by a USB-PD master control device based on an update instruction received from a terminal device; verifying the USB-PD master control based on the first message When the device is legal, send the first confirmation message to the USB-PD host device, and jump from the user code space to the in-system programming program by using the USB-PD IC module of the USB-PD charger to execute the program index code space; receive a second message sent by the USB-PD host device based on the firmware update data received from the terminal device, and write the firmware update data in the second message into the user code space; and The USB-PD host device sends a second confirmation message, and jumps the indicator used by the USB-PD IC module of the USB-PD charger to execute the program from the system programming code space to the user code space.

Description

用於USB-PD充電器的韌體更新方法和裝置 Firmware update method and device for USB-PD charger

本發明涉及充電器領域,更具體地涉及一種用於USB-PD充電器的韌體更新方法和裝置。 The present invention relates to the field of chargers, and more particularly to a method and device for updating firmware for a USB-PD charger.

USB-PD(USB Power Delivery,USB功率傳輸)協議是USB-IF(USB Implementers Forum,USB開發者論壇)協會提出的一項快充協定,伴隨USB-PD協定誕生的還有USB Type-C介面。通過USB-PD協定和USB Type-C介面,USB-IF協會希望統一所有廠家的快充規格,改變廠家各自為戰的局面,實現一台充電器適配所有設備的遠景。從2014年誕生以來,USB-PD充電器蓬勃發展,特別是隨著Apple終於在iPhone11引入了對USB-PD協定的支援之後,整個USB-PD充電器市場迎來了大爆發。 The USB-PD (USB Power Delivery, USB Power Delivery) protocol is a fast charging protocol proposed by the USB-IF (USB Implementers Forum, USB Developers Forum) Association, and the USB Type-C interface was born with the USB-PD protocol. . Through the USB-PD protocol and the USB Type-C interface, the USB-IF Association hopes to unify the fast charging specifications of all manufacturers, change the situation of manufacturers fighting each other, and realize the prospect of one charger adapting to all devices. Since its birth in 2014, USB-PD chargers have flourished, especially after Apple finally introduced support for the USB-PD protocol in the iPhone 11, the entire USB-PD charger market has ushered in a big explosion.

隨著USB-PD協議不斷地被修改完善,一款USB-PD充電器生產出來,可能過一段時間就無法相容最新的USB-PD協議。然而,對於充電器廠家來說,USB-PD IC(USB-PD Integrated Circuit,USB-PD積體電路)相對於一般充電器IC在價格上較高,並且如果早期上市的USB-PD充電器有漏洞,則很可能導致召回及賠償。因此,充電器廠家希望能夠對USB-PD充電器進行韌體更新。 As the USB-PD protocol is continuously modified and improved, a USB-PD charger may not be compatible with the latest USB-PD protocol after a period of time. However, for charger manufacturers, the price of USB-PD IC (USB-PD Integrated Circuit, USB-PD integrated circuit) is higher than that of general charger IC, and if the USB-PD chargers listed earlier have loopholes, it is likely to lead to recalls and compensation. Therefore, charger manufacturers hope to be able to update the firmware of USB-PD chargers.

傳統的韌體更新方法需要充電器額外提供專用的燒錄引腳,典型的是一根時鐘信號SCL,一根資料信號線SDA。然而,在USB-PD充電器中,對外只有Type-C的信號線,無法提供專用的燒錄引腳。因此,需要一種用於USB-PD充電器的韌體更新方法和裝置。 The traditional firmware update method requires the charger to provide additional dedicated programming pins, typically a clock signal SCL and a data signal line SDA. However, in the USB-PD charger, there are only Type-C signal lines to the outside, and no dedicated programming pins can be provided. Therefore, there is a need for a firmware update method and apparatus for a USB-PD charger.

本發明的實施例提供了一種用於USB-PD充電器的韌體更新方法和裝置,能夠利用USB Type-C介面根據USB-PD協定來更新USB-PD充電器的韌體。 Embodiments of the present invention provide a method and device for updating firmware for a USB-PD charger, which can utilize the USB Type-C interface to update the firmware of the USB-PD charger according to the USB-PD protocol.

在第一方面中,本發明的實施例提供了一種由USB-PD充電器執行的方法,包括:接收由USB-PD主控裝置基於從終端設備接收到的更新指令而發送的第一訊息;在基於第一訊息驗證USB-PD主控裝置合法時,向USB-PD主控裝置發送第一確認訊息,並且將USB-PD充電器的USB-PD IC模組用於執行程式的指標從使用者程式碼空間跳轉到在系統程式設計程式碼空間;接收由USB-PD主控裝置基於從終端設備接收到的韌體更新資料而發送的第二訊息,並且將第二訊息中的韌體更新資料寫入使用者程式碼空間;以及向USB-PD主控裝置發送第二確認訊息,並且將USB-PD充電器的USB-PD IC模組用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間。 In a first aspect, an embodiment of the present invention provides a method executed by a USB-PD charger, comprising: receiving a first message sent by a USB-PD host device based on an update instruction received from a terminal device; When verifying that the USB-PD host device is legitimate based on the first message, send a first confirmation message to the USB-PD host device, and use the USB-PD IC module of the USB-PD charger to execute the program's index from using The user code space jumps to the in-system programming code space; receives the second message sent by the USB-PD host device based on the firmware update data received from the terminal device, and updates the firmware in the second message Write the data into the user code space; and send the second confirmation message to the USB-PD host device, and use the USB-PD IC module of the USB-PD charger to execute the program index from the in-system programming code The space jumps to the user code space.

在第一方面的一種可能的實施方式中,第一訊息包括加密資訊,並且其中,基於第一訊息驗證USB-PD主控裝置合法包括:對第一訊息中的加密資訊進行解密,並且基於解密的資訊來驗證USB-PD主控裝置合法。 In a possible implementation of the first aspect, the first message includes encrypted information, and wherein verifying that the USB-PD host device is legitimate based on the first message includes: decrypting the encrypted information in the first message, and based on the decryption information to verify the validity of the USB-PD host device.

在第一方面的一種可能的實施方式中,在接收由USB-PD主控裝置基於從終端設備接收到的韌體更新資料而發送的第二訊息之前,方法還包括:接收由USB-PD主控裝置發送的第三訊息,並且向USB-PD主控裝置發送第三確認訊息,並且其中,第三訊息包括韌體更新資料的資料塊數量和USB-PD充電器的USB-PD IC模組的記憶體的更新起始位址。 In a possible implementation of the first aspect, before receiving the second message sent by the USB-PD host control device based on the firmware update data received from the terminal device, the method further includes: receiving a message from the USB-PD host The third message is sent by the control device, and a third confirmation message is sent to the USB-PD host device, and the third message includes the number of data blocks of the firmware update data and the USB-PD IC module of the USB-PD charger. The update start address of the memory.

在第一方面的一種可能的實施方式中,接收由USB-PD主控裝置基於從終端設備接收到的韌體更新資料而發送的第二訊息包括:依次接收與韌體更新資料的資料塊數量相對應的多個第二子訊息。 In a possible implementation of the first aspect, receiving the second message sent by the USB-PD host device based on the firmware update data received from the terminal device includes: sequentially receiving the number of data blocks of the firmware update data Corresponding multiple second sub-messages.

在第一方面的一種可能的實施方式中,在向USB-PD主控裝置發送第二確認訊息之後,並且在將USB-PD充電器的USB-PD IC模 組用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間之前,方法還包括:接收由USB-PD主控裝置基於從終端設備接收到的校驗指令而發送的請求訊息;基於請求訊息,從使用者程式碼空間讀取韌體更新資料並且向USB-PD主控裝置發送韌體更新資料,以供USB-PD主控裝置將韌體更新資料發送至終端設備用於檢測一致性;以及接收由USB-PD主控裝置基於終端設備確認韌體更新資料的一致性而發送的第四訊息,並且向USB-PD主控裝置發送第四確認訊息。 In a possible implementation of the first aspect, after sending the second confirmation message to the USB-PD host device, and after the USB-PD IC module of the USB-PD charger is Before the set of indicators for executing the program is jumped from the system programming code space to the user code space, the method further includes: receiving a request sent by the USB-PD host device based on the verification command received from the terminal device message; based on the request message, read the firmware update data from the user code space and send the firmware update data to the USB-PD host device for the USB-PD host device to send the firmware update data to the terminal device. for detecting consistency; and receiving a fourth message sent by the USB-PD host device based on the terminal device confirming the consistency of the firmware update data, and sending a fourth confirmation message to the USB-PD host device.

在第一方面的一種可能的實施方式中,向USB-PD主控裝置發送韌體更新資料包括:依次發送韌體更新資料的各個資料塊。 In a possible implementation manner of the first aspect, sending the firmware update data to the USB-PD host device includes: sequentially sending each data block of the firmware update data.

在第一方面的一種可能的實施方式中,USB-PD充電器與USB-PD主控裝置之間的通信是經由USB Type-C介面根據USB-PD協定進行的,並且USB-PD主控裝置與終端設備之間的通信是經由UART(通用非同步接收發送器,universal asynchronous receiver transmitter)介面進行的。 In a possible implementation of the first aspect, the communication between the USB-PD charger and the USB-PD host device is performed according to the USB-PD protocol via the USB Type-C interface, and the USB-PD host device Communication with the terminal device is via a UART (universal asynchronous receiver transmitter) interface.

在第二方面中,本發明的實施例提供了一種由USB-PD主控裝置執行的方法,包括:基於從終端設備接收到的更新指令而向USB-PD充電器發送第一訊息;接收由USB-PD充電器在基於第一訊息驗證USB-PD主控裝置合法時而發送的第一確認訊息,以及使得USB-PD充電器的USB-PD IC模組用於執行程式的指標從使用者程式碼空間跳轉到在系統程式設計程式碼空間;基於從終端設備接收到的韌體更新資料而向USB-PD充電器發送第二訊息;以及接收由USB-PD充電器在將第二訊息中的韌體更新資料寫入使用者程式碼空間之後而發送的第二確認訊息,以及使得USB-PD充電器的USB-PD IC模組用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間。 In a second aspect, an embodiment of the present invention provides a method executed by a USB-PD host device, comprising: sending a first message to a USB-PD charger based on an update instruction received from a terminal device; receiving a first message from a USB-PD charger; The first confirmation message sent by the USB-PD charger when it verifies that the USB-PD host device is legitimate based on the first message, and the indicator that the USB-PD IC module of the USB-PD charger is used to execute the program is obtained from the user The code space jumps to the in-system programming code space; sends a second message to the USB-PD charger based on the firmware update data received from the terminal device; and receives a second message from the USB-PD charger in the second message The second confirmation message sent after the firmware update data of the USB-PD charger is written into the user code space, and the indicator that the USB-PD IC module of the USB-PD charger is used to execute the program jumps from the system programming code space into the user code space.

在第二方面的一種可能的實施方式中,第一訊息包括加密資訊。 In a possible implementation of the second aspect, the first message includes encrypted information.

在第二方面的一種可能的實施方式中,在基於從終端設備接收到的韌體更新資料而向USB-PD充電器發送第二訊息之前,方法還 包括:向USB-PD充電器發送第三訊息,並且接收由USB-PD充電器發送的第三確認訊息;並且其中,第三訊息包括韌體更新資料的資料塊數量和USB-PD充電器的USB-PD IC模組的記憶體的更新起始位址。 In a possible implementation of the second aspect, before sending the second message to the USB-PD charger based on the firmware update data received from the terminal device, the method further includes Including: sending a third message to the USB-PD charger, and receiving a third confirmation message sent by the USB-PD charger; and wherein, the third message includes the number of data blocks of the firmware update data and the USB-PD charger. The update start address of the memory of the USB-PD IC module.

在第二方面的一種可能的實施方式中,基於從終端設備接收到的韌體更新資料而向USB-PD充電器發送第二訊息包括:依次發送與韌體更新資料的資料塊數量相對應的多個第二子訊息。 In a possible implementation of the second aspect, sending the second message to the USB-PD charger based on the firmware update data received from the terminal device includes: sequentially sending data blocks corresponding to the number of data blocks of the firmware update data. Multiple second sub-messages.

在第二方面的一種可能的實施方式中,在接收由USB-PD充電器在將第二訊息中的韌體更新資料寫入使用者程式碼空間之後而發送的第二確認訊息之後,並且在使得USB-PD充電器的USB-PD IC模組用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間之前,方法還包括:基於從終端設備接收到的校驗指令而向USB-PD充電器發送請求訊息;接收由USB-PD充電器從使用者程式碼空間讀取並且發送的韌體更新資料,並且將韌體更新資料發送至終端設備用於檢測一致性;以及基於終端設備確認韌體更新資料的一致性而向USB-PD充電器發送第四訊息,並且接收由USB-PD充電器發送的第四確認訊息。 In a possible implementation of the second aspect, after receiving the second confirmation message sent by the USB-PD charger after writing the firmware update data in the second message into the user code space, and Before the index used for executing the program by the USB-PD IC module of the USB-PD charger is jumped from the system programming code space to the user code space, the method further includes: based on the verification command received from the terminal device Send a request message to the USB-PD charger; receive the firmware update data read and sent by the USB-PD charger from the user code space, and send the firmware update data to the terminal device for checking consistency; and sending a fourth message to the USB-PD charger based on the terminal device confirming the consistency of the firmware update data, and receiving the fourth confirmation message sent by the USB-PD charger.

在第二方面的一種可能的實施方式中,接收由USB-PD充電器從使用者程式碼空間讀取並且發送的韌體更新資料包括:依次接收韌體更新資料的各個資料塊。 In a possible implementation of the second aspect, receiving the firmware update data read and sent by the USB-PD charger from the user code space includes: sequentially receiving each data block of the firmware update data.

在第二方面的一種可能的實施方式中,USB-PD充電器與USB-PD主控裝置之間的通信是經由USB Type-C介面根據USB-PD協定進行的,並且USB-PD主控裝置與終端設備之間的通信是經由UART介面進行的。 In a possible implementation of the second aspect, the communication between the USB-PD charger and the USB-PD host device is performed according to the USB-PD protocol via the USB Type-C interface, and the USB-PD host device Communication with the terminal device is via the UART interface.

在第三方面中,本發明的實施例提供了一種USB-PD IC模組,包括:微控制器核心、可多次擦寫記憶體、USB-PD資料緩衝器、VBUS控制模組、USB-PD實體層介面電路、和UART/I2C介面電路,並且其中,微控制器核心分別與可多次擦寫記憶體、USB-PD協定發送接收資料緩衝器、VBUS控制模組、USB-PD實體層介面電路、和UART/I2C介面 電路可通信地連接;可多次擦寫記憶體包括使用者程式碼空間和在系統程式設計程式碼空間;USB-PD資料緩衝器用於緩衝根據USB-PD協定傳輸的資料;VBUS控制模組用於充電控制;USB-PD實體層介面電路用於經由USB Type-C介面根據USB-PD協定進行通信;UART/I2C介面電路用於經由UART介面進行通信。 In a third aspect, an embodiment of the present invention provides a USB-PD IC module, including: a microcontroller core, a rewritable memory, a USB-PD data buffer, a VBUS control module, a USB-PD PD physical layer interface circuit, and UART/I2C interface circuit, and among them, the microcontroller core is respectively connected with rewritable memory, USB-PD protocol sending and receiving data buffer, VBUS control module, USB-PD physical layer Interface circuit, and UART/I2C interface The circuit is communicatively connected; the rewritable memory includes user code space and in-system programming code space; the USB-PD data buffer is used to buffer the data transmitted according to the USB-PD protocol; the VBUS control module is used for For charging control; the USB-PD physical layer interface circuit is used to communicate according to the USB-PD protocol through the USB Type-C interface; the UART/I2C interface circuit is used to communicate through the UART interface.

在第四方面中,本發明的實施例提供了一種USB-PD充電器,包括根據第三方面的USB-PD IC模組,其中,該USB-PD IC模組中的UART/I2C介面電路被封裝並且不與外部通信,並且其中,該USB-PD充電器用於執行根據第一方面的方法。 In a fourth aspect, an embodiment of the present invention provides a USB-PD charger, including the USB-PD IC module according to the third aspect, wherein the UART/I2C interface circuit in the USB-PD IC module is packaged and not in communication with the outside, and wherein the USB-PD charger is used to perform the method according to the first aspect.

在第五方面中,本發明的實施例提供了一種USB-PD主控裝置,包括根據第三方面的USB-PD IC模組,其中,該USB-PD主控裝置用於執行根據第二方面的方法。 In a fifth aspect, an embodiment of the present invention provides a USB-PD host device, including the USB-PD IC module according to the third aspect, wherein the USB-PD host device is configured to execute the second aspect. Methods.

在第六方面中,本發明的實施例提供了一種系統,包括根據第四方面的USB-PD充電器、根據第五方面的USB-PD主控裝置、以及終端設備。 In a sixth aspect, an embodiment of the present invention provides a system including the USB-PD charger according to the fourth aspect, the USB-PD host device according to the fifth aspect, and a terminal device.

如上所述,本發明的實施例通過終端設備和USB-PD主控裝置來對USB-PD充電器進行韌體更新。具體地,終端設備可以向USB-PD主控裝置發送韌體更新資料,並且USB-PD主控裝置可以將韌體更新資料轉發給USB-PD充電器,使得僅需要通過USB Type-C介面根據USB-PD協定來更新USB-PD充電器的韌體。此外,USB-PD充電器還可以將韌體更新資料經由USB-PD主控裝置發送回終端設備,使得由終端設備進行一致性檢測以校驗USB-PD充電器中的韌體更新資料。通過以上方式,在不需要對USB-PD充電器進行拆分並且不需要提供專用燒錄引腳的情況下,可以實現對USB-PD充電器進行韌體更新,並且確保韌體更新資料的一致性。 As described above, the embodiments of the present invention update the firmware of the USB-PD charger through the terminal device and the USB-PD host device. Specifically, the terminal device can send the firmware update data to the USB-PD host device, and the USB-PD host device can forward the firmware update data to the USB-PD charger, so that only the USB Type-C interface needs to be USB-PD protocol to update the firmware of USB-PD chargers. In addition, the USB-PD charger can also send the firmware update data back to the terminal device via the USB-PD host device, so that the terminal device can perform a consistency check to verify the firmware update data in the USB-PD charger. Through the above methods, the firmware update of the USB-PD charger can be realized without the need to disassemble the USB-PD charger and provide a dedicated programming pin, and the consistency of the firmware update data can be ensured sex.

1~18,S401~S404,S501~S504:步驟 1~18, S401~S404, S501~S504: Steps

400,500:方法 400,500: Method

CC,CC1,CC2:通道配置 CC, CC1, CC2: Channel configuration

GND:接地線 GND: ground wire

VBUS:供電線 VBUS: Power supply line

VDM1:第一訊息 VDM1: First message

VDM2:第二(子)訊息 VDM2: Second (sub) message

VDM3:第三訊息 VDM3: The third message

VDM4:第四訊息 VDM4: The Fourth Message

從下面結合圖式對本發明的具體實施方式的描述中,可以更好地理解本發明,其中:圖1是USB-PD充電器和移動設備的充電示意圖。 The present invention can be better understood from the following description of the specific embodiments of the present invention in conjunction with the drawings, wherein: FIG. 1 is a schematic diagram of charging a USB-PD charger and a mobile device.

圖2示出了根據本發明的實施例的USB-PD充電器的韌體更新示意圖。 FIG. 2 shows a schematic diagram of firmware update of a USB-PD charger according to an embodiment of the present invention.

圖3示出了圖2中的USB-PD IC模組的示意圖。 FIG. 3 shows a schematic diagram of the USB-PD IC module in FIG. 2 .

圖4示出了根據本發明的實施例的由USB-PD充電器執行的方法400的流程圖。 FIG. 4 shows a flowchart of a method 400 performed by a USB-PD charger according to an embodiment of the present invention.

圖5示出了根據本發明的實施例的由USB-PD主控裝置執行的方法500的流程圖。 FIG. 5 shows a flowchart of a method 500 performed by a USB-PD host device according to an embodiment of the present invention.

圖6示出了根據本發明的實施例的USB-PD充電器的韌體更新時序圖。 FIG. 6 shows a firmware update sequence diagram of a USB-PD charger according to an embodiment of the present invention.

下面將詳細描述本發明各個方面的特徵和示例性實施例。下面的描述涵蓋了許多具體細節,以便提供對本發明的全面理解。但是,對於本領域技術人員來說顯而易見的是,本發明可以在不需要這些具體細節中的一些細節的情況下實施。下面對實施例的描述僅僅是為了通過示出本發明的示例來提供對本發明更清楚的理解。本發明絕不限於下面所提出的任何具體配置,而是在不脫離本發明的精神的前提下覆蓋了相關元素或部件的任何修改、替換和改進。 Features and exemplary embodiments of various aspects of the invention are described in detail below. The following description covers numerous specific details in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a clearer understanding of the present invention by illustrating examples of the invention. The present invention is in no way limited to any specific configuration set forth below, but covers any modification, substitution and improvement of the relevant elements or components without departing from the spirit of the invention.

圖1是USB-PD充電器和移動設備的充電示意圖。在圖1中,USB-PD充電器的硬體介面可以是USB Type-C介面,該USB Type-C介面可以包括VBUS(供電線)、CC(CC1或CC2)(Channel Configuration,通道配置)和GND(接地線),其中,VBUS和GND可以提供充電回路,而CC可以用於傳輸源與接收點之間的協定資訊。USB-PD充電器可以通過USB Type-C介面經由USB Type-C線纜與移動設備連接。 Figure 1 is a schematic diagram of charging a USB-PD charger and a mobile device. In FIG. 1, the hardware interface of the USB-PD charger may be a USB Type-C interface, and the USB Type-C interface may include VBUS (power supply line), CC (CC1 or CC2) (Channel Configuration, channel configuration) and GND (ground line), where VBUS and GND can provide a charging loop, and CC can be used to transmit protocol information between the source and sink. The USB-PD charger can be connected to a mobile device via a USB Type-C cable via the USB Type-C interface.

在本發明的實施例中,在不增加額外資源的情況下,充分利用USB-PD充電器的USB Type-C介面以及USB-PD協定,提供了一 種用於USB-PD充電器的韌體更新方法和裝置。具體地,定義了USB-PD IC模組,通過運行有USB-PD韌體更新軟體的終端設備,利用具有該USB-PD IC模組的USB-PD主控裝置,來對具有該USB-PD IC模組的USB-PD充電器進行韌體更新。因此,實現了通過USB Type-C介面直接對USB-PD充電器進行韌體更新。 In the embodiment of the present invention, without adding additional resources, the USB Type-C interface and the USB-PD protocol of the USB-PD charger are fully utilized to provide a A method and device for updating firmware for a USB-PD charger. Specifically, a USB-PD IC module is defined, and through the terminal device running the USB-PD firmware update software, the USB-PD master device with the USB-PD IC module is used to update the USB-PD with the USB-PD. The firmware of the USB-PD charger of the IC module is updated. Therefore, it is possible to directly update the firmware of the USB-PD charger through the USB Type-C interface.

圖2示出了根據本發明的實施例的USB-PD充電器的韌體更新示意圖。根據本發明的實施例,USB-PD充電器可以包括USB-PD IC模組,USB-PD主控裝置可以包括USB-PD IC模組,並且終端設備可以運行有USB-PD韌體更新軟體。在實施例中,終端設備可以是主機PC。終端設備與USB-PD主控裝置可以經由UART介面進行通信,並且USB-PD主控裝置與USB-PD充電器可以經由USB Type-C介面進行通信。 FIG. 2 shows a schematic diagram of firmware update of a USB-PD charger according to an embodiment of the present invention. According to an embodiment of the present invention, the USB-PD charger may include a USB-PD IC module, the USB-PD host device may include a USB-PD IC module, and the terminal device may run USB-PD firmware update software. In an embodiment, the terminal device may be a host PC. The terminal device and the USB-PD host device can communicate via the UART interface, and the USB-PD host device and the USB-PD charger can communicate via the USB Type-C interface.

圖3示出了圖2中的USB-PD IC模組的示意圖。根據本發明的實施例,USB-PD IC模組可以包括MCU(微控制器,Microcontroller Unit)核心、可多次擦寫記憶體、USB-PD資料緩衝器、VBUS控制模組、USB-PD實體層介面電路、和UART/I2C介面電路。在實施例中,微控制器核心可以分別與可多次擦寫記憶體、USB-PD協定發送接收資料緩衝器、VBUS控制模組、USB-PD實體層介面電路、和UART/I2C介面電路可通信地連接。 FIG. 3 shows a schematic diagram of the USB-PD IC module in FIG. 2 . According to an embodiment of the present invention, the USB-PD IC module may include an MCU (Microcontroller, Microcontroller Unit) core, a multiple-rewritable memory, a USB-PD data buffer, a VBUS control module, and a USB-PD entity Layer interface circuit, and UART/I2C interface circuit. In an embodiment, the microcontroller core can be respectively connected with the rewritable memory, the USB-PD protocol transmit and receive data buffer, the VBUS control module, the USB-PD physical layer interface circuit, and the UART/I2C interface circuit. communicatively connected.

根據本發明的實施例,可多次擦寫記憶體可以包括使用者程式碼空間和在系統程式設計程式碼空間。在實施例中,使用者程式碼空間可以用於存儲使用者程式資料,包括韌體更新資料等等。在系統程式設計程式碼空間可以用於韌體更新時的在系統程式設計。在實施例中,USB-PD資料緩衝器可以用於緩衝根據USB-PD協定發送的資料,例如,韌體更新資料等等。在實施例中,VBUS控制模組可以用於充電控制。 According to an embodiment of the present invention, the rewritable memory may include a user code space and an in-system programming code space. In an embodiment, the user code space may be used to store user program data, including firmware update data and the like. The in-system programming code space can be used for in-system programming during firmware updates. In an embodiment, the USB-PD data buffer may be used to buffer data sent according to the USB-PD protocol, eg, firmware update data, and the like. In an embodiment, the VBUS control module can be used for charging control.

根據本發明的實施例,USB-PD實體層介面電路可以用於經由USB Type-C介面根據USB-PD協定進行通信。例如,USB-PD實體層介面電路可以用於USB-PD充電器與USB-PD主控裝置之間的通信。在實 施例中,UART/I2C介面電路可以用於經由UART介面進行通信。例如,UART/I2C介面電路可以用於USB-PD主控裝置與終端設備之間的通信。 According to an embodiment of the present invention, the USB-PD physical layer interface circuit may be used to communicate according to the USB-PD protocol via the USB Type-C interface. For example, the USB-PD physical layer interface circuit can be used for communication between the USB-PD charger and the USB-PD host device. in real In an embodiment, a UART/I2C interface circuit may be used to communicate via the UART interface. For example, a UART/I2C interface circuit can be used for communication between the USB-PD host device and the terminal device.

在實施例中,USB-PD充電器中的USB-PD IC模組的UART/I2C介面電路可以被封裝並且不與外部通信。此外,USB-PD充電器中的USB-PD IC模組的USB-PD實體層介面電路可以用於與外部設備進行通信,例如,由於USB-PD充電器的硬體介面僅為USB Type-C介面。在實施例中,USB-PD主控裝置中的USB-PD IC模組的UART/I2C介面電路可以用於與終端設備進行通信,而USB-PD主控裝置中的USB-PD IC模組的USB-PD實體層介面電路可以用於與USB-PD充電器進行通信。 In an embodiment, the UART/I2C interface circuit of the USB-PD IC module in the USB-PD charger may be packaged and not communicate with the outside. In addition, the USB-PD physical layer interface circuit of the USB-PD IC module in the USB-PD charger can be used to communicate with external devices. For example, since the hardware interface of the USB-PD charger is only USB Type-C interface. In the embodiment, the UART/I2C interface circuit of the USB-PD IC module in the USB-PD host device can be used to communicate with the terminal device, and the USB-PD IC module in the USB-PD host device The USB-PD physical layer interface circuit can be used to communicate with the USB-PD charger.

圖4示出了根據本發明的實施例的由USB-PD充電器執行的方法400的流程圖。在實施例中,由USB-PD充電器執行的方法400可以包括以下步驟。在步驟S401中,接收由USB-PD主控裝置基於從終端設備接收到的更新指令而發送的第一訊息。在實施例中,第一訊息可以是根據USB-PD協定定義的VDM(Vendor Define Message,供應商定義訊息)1。例如,第一訊息VDM 1可以具有以下訊息格式。 FIG. 4 shows a flowchart of a method 400 performed by a USB-PD charger according to an embodiment of the present invention. In an embodiment, the method 400 performed by a USB-PD charger may include the following steps. In step S401, a first message sent by the USB-PD host device based on the update instruction received from the terminal device is received. In an embodiment, the first message may be a VDM (Vendor Define Message, vendor defined message) 1 defined according to the USB-PD protocol. For example, the first message VDM 1 may have the following message format.

Figure 109114609-A0305-02-0010-3
Figure 109114609-A0305-02-0010-3

在步驟S402中,在基於第一訊息驗證USB-PD主控裝置合法時,向USB-PD主控裝置發送第一確認訊息,並且將USB-PD充電器的USB-PD IC模組用於執行程式的指標從使用者程式碼空間跳轉到在系統程式設計程式碼空間。在實施例中,第一訊息可以包括加密資訊,例如,如上所述第一訊息VDM 1中的26個位元組的標識資料可以是加密資訊。 In step S402, when verifying that the USB-PD host device is legitimate based on the first message, a first confirmation message is sent to the USB-PD host device, and the USB-PD IC module of the USB-PD charger is used to execute Program pointers jump from user code space to in-system programming code space. In an embodiment, the first message may include encrypted information, for example, the 26-byte identification data in the first message VDM 1 as described above may be encrypted information.

在實施例中,基於第一訊息驗證USB-PD主控裝置合法可以包括:對第一訊息中的加密資訊進行解密,並且基於解密的資訊來驗 證USB-PD主控裝置合法。在實施例中,通過對標識資料進行加密,可以保證USB-PD充電器能夠識別合法的USB-PD主控裝置。此外,在其他非法裝置向USB-PD充電器發送訊息並且試圖篡改USB-PD充電器的USB-PD IC模組時,USB-PD充電器可以發送拒絕訊息,並且阻止這些非法操作。 In an embodiment, verifying that the USB-PD host device is legitimate based on the first message may include: decrypting encrypted information in the first message, and verifying based on the decrypted information Verify that the USB-PD host device is legal. In the embodiment, by encrypting the identification data, it can be ensured that the USB-PD charger can identify the legitimate USB-PD host device. In addition, when other illegal devices send messages to the USB-PD charger and try to tamper with the USB-PD IC module of the USB-PD charger, the USB-PD charger can send a rejection message and prevent these illegal operations.

在步驟S403中,接收由USB-PD主控裝置基於從終端設備接收到的韌體更新資料而發送的第二訊息,並且將第二訊息中的韌體更新資料寫入使用者程式碼空間。在實施例中,在接收由USB-PD主控裝置基於從終端設備接收到的韌體更新資料而發送的第二訊息之前,方法400還可以包括:接收由USB-PD主控裝置發送的第三訊息,並且向USB-PD主控裝置發送第三確認訊息,並且其中,第三訊息包括韌體更新資料的資料塊數量和USB-PD充電器的USB-PD IC模組的記憶體的更新起始位址。 In step S403, a second message sent by the USB-PD host device based on the firmware update data received from the terminal device is received, and the firmware update data in the second message is written into the user code space. In an embodiment, before receiving the second message sent by the USB-PD host device based on the firmware update data received from the terminal device, the method 400 may further include: receiving a first message sent by the USB-PD host device Three messages, and a third confirmation message is sent to the USB-PD host device, and the third message includes the number of data blocks of the firmware update data and the update of the memory of the USB-PD IC module of the USB-PD charger start address.

在實施例中,第二訊息可以是根據USB-PD協定定義的VDM 2。例如,第二訊息VDM 2可以具有以下訊息格式。 In an embodiment, the second message may be VDM 2 defined according to the USB-PD protocol. For example, the second message VDM 2 may have the following message format.

Figure 109114609-A0305-02-0011-2
Figure 109114609-A0305-02-0011-2

在實施例中,一個資料塊可以具有256個位元組的資料。此外,當USB-PD充電器接收到第三訊息之後,USB-PD充電器可以根據第三訊息中的更新起始位址以及總資料塊數量,對USB-PD充電器中的USB-PD IC模組的記憶體進行設置,以便能夠預留出相應的存儲空間,從而接收韌體更新資料。 In an embodiment, one data block may have 256 bytes of data. In addition, after the USB-PD charger receives the third message, the USB-PD charger can update the USB-PD IC in the USB-PD charger according to the updated starting address and the total number of data blocks in the third message. The memory of the module is set so that the corresponding storage space can be reserved to receive firmware update data.

在實施例中,接收由USB-PD主控裝置基於從終端設備接收到的韌體更新資料而發送的第二訊息包括:依次接收與韌體更新資料的資料塊數量相對應的多個第三訊息。在實施例中,第三訊息可以是根據 USB-PD協定定義的VDM 3。例如,第三訊息VDM 3可以具有以下訊息格式。 In an embodiment, receiving the second message sent by the USB-PD host device based on the firmware update data received from the terminal device includes: sequentially receiving a plurality of third messages corresponding to the number of data blocks of the firmware update data message. In an embodiment, the third message may be based on VDM 3 defined by the USB-PD protocol. For example, the third message VDM 3 may have the following message format.

Figure 109114609-A0305-02-0012-4
Figure 109114609-A0305-02-0012-4

在實施例中,USB-PD充電器可以根據資料塊編號來依次接收多個第三訊息VDM 3,並且將第三訊息VDM 3中的韌體更新資料依次寫入記憶體的使用者程式碼空間。在實施例中,通過將韌體更新資料分資料塊來進行發送,可以實現更有效並且更準確的資料傳輸。 In an embodiment, the USB-PD charger can sequentially receive a plurality of third messages VDM 3 according to the data block numbers, and sequentially write the firmware update data in the third messages VDM 3 into the user code space of the memory. . In an embodiment, by dividing the firmware update data into data blocks for sending, more efficient and accurate data transmission can be achieved.

在步驟S404中,向USB-PD主控裝置發送第二確認訊息,並且將USB-PD充電器的USB-PD IC模組用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間。在實施例中,當USB-PD充電器將所有韌體更新資料寫入記憶體的使用者程式碼空間之後,可以發送第二確認訊息,並且可以將用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間。這樣,USB-PD充電器可以完成更新,並且實現僅需要通過USB Type-C介面根據USB-PD協定來更新USB-PD充電器的韌體。 In step S404, a second confirmation message is sent to the USB-PD host device, and the indicator that the USB-PD IC module of the USB-PD charger is used to execute the program is jumped from the in-system programming code space to the user code space. In an embodiment, after the USB-PD charger writes all firmware update data into the user code space of the memory, a second confirmation message can be sent, and the index for executing the program can be changed from the in-system programming The code space jumps to the user code space. In this way, the USB-PD charger can be updated, and the implementation only needs to update the firmware of the USB-PD charger according to the USB-PD protocol through the USB Type-C interface.

在實施例中,在向USB-PD主控裝置發送第二確認訊息之後,並且在將USB-PD充電器的USB-PD IC模組用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間之前,方法400還可以包括:接收由USB-PD主控裝置基於從終端設備接收到的校驗指令而發送的請求訊息;基於請求訊息,從使用者程式碼空間讀取韌體更新資料並且向USB-PD主控裝置發送韌體更新資料,以供USB-PD主控裝置將韌體更新資料發送至終端設備用於檢測一致性;以及接收由USB-PD主控裝置基於終端設備確認韌體更新資料的一致性而發送的第四訊息,並且向 USB-PD主控裝置發送第四確認訊息。例如,第四訊息VDM 4可以具有以下訊息格式。 In the embodiment, after sending the second confirmation message to the USB-PD host device, and after using the USB-PD IC module of the USB-PD charger to execute the program index jump from the in-system programming code space Before reaching the user code space, the method 400 may further include: receiving a request message sent by the USB-PD host device based on the verification command received from the terminal device; based on the request message, reading from the user code space Firmware update data and send firmware update data to USB-PD host device for USB-PD host device to send firmware update data to terminal device for checking consistency; and receive data from USB-PD host device The fourth message is sent based on the terminal device confirming the consistency of the firmware update data, and is sent to the The USB-PD host device sends a fourth confirmation message. For example, the fourth message VDM 4 may have the following message format.

Figure 109114609-A0305-02-0013-5
Figure 109114609-A0305-02-0013-5

在實施例中,通過將USB-PD充電器存儲的韌體更新資料發送回終端設備,並且由終端設備對韌體更新資料進行一致性檢測,來確保USB-PD充電器接收到的韌體更新資料是正確的。在實施例中,向USB-PD主控裝置發送韌體更新資料包括:依次發送韌體更新資料的各個資料塊。例如,可以通過如上所述的第三訊息VDM 3來將韌體更新資料按照資料塊編號依次發送至USB-PD主控裝置並且再轉發回終端設備。在實施例中,終端設備可以依次對韌體更新資料的各個資料塊進行一致性檢測。例如,終端設備可以在相應資料塊具有一致性時,繼續接收和檢測下一個資料塊,並且可以在相應資料塊不具有一致性時,報告錯誤。當韌體更新資料的所有資料塊都完成一致性檢測時,可以驗證USB-PD充電器接收到的韌體更新資料是正確的。 In an embodiment, the firmware update data stored by the USB-PD charger is sent back to the terminal device, and the terminal device performs consistency detection on the firmware update data to ensure that the firmware update data received by the USB-PD charger is updated The information is correct. In an embodiment, sending the firmware update data to the USB-PD host device includes: sequentially sending each data block of the firmware update data. For example, the firmware update data can be sequentially sent to the USB-PD host device according to the data block numbers through the third message VDM 3 as described above, and then forwarded back to the terminal device. In an embodiment, the terminal device may sequentially perform consistency detection on each data block of the firmware update data. For example, the terminal device can continue to receive and detect the next data block when the corresponding data block is consistent, and can report an error when the corresponding data block is not consistent. When all data blocks of the firmware update data have completed the consistency check, it can be verified that the firmware update data received by the USB-PD charger is correct.

在實施例中,USB-PD充電器與USB-PD主控裝置之間的通信是經由USB Type-C介面根據USB-PD協定進行的,並且USB-PD主控裝置與終端設備之間的通信是經由UART介面進行的。這樣,可以實現僅需要通過USB Type-C介面根據USB-PD協定來更新USB-PD充電器的韌體。 In an embodiment, the communication between the USB-PD charger and the USB-PD host device is performed according to the USB-PD protocol via the USB Type-C interface, and the communication between the USB-PD host device and the terminal device This is done via the UART interface. In this way, only the firmware of the USB-PD charger needs to be updated according to the USB-PD protocol through the USB Type-C interface.

圖5示出了根據本發明的實施例的由USB-PD主控裝置執行的方法500的流程圖。在實施例中,由USB-PD主控裝置執行的方法500可以包括以下步驟。在步驟S501中,基於從終端設備接收到的更新指令而向USB-PD充電器發送第一訊息。在實施例中,第一訊息可以是如上所述 的VDM 1,並且具有如上所述的訊息格式。 FIG. 5 shows a flowchart of a method 500 performed by a USB-PD host device according to an embodiment of the present invention. In an embodiment, the method 500 performed by a USB-PD host device may include the following steps. In step S501, a first message is sent to the USB-PD charger based on the update instruction received from the terminal device. In an embodiment, the first message may be as described above VDM 1, and has the message format as described above.

在步驟S502中,接收由USB-PD充電器在基於第一訊息驗證USB-PD主控裝置合法時而發送的第一確認訊息,以及使得USB-PD充電器的USB-PD IC模組用於執行程式的指標從使用者程式碼空間跳轉到在系統程式設計程式碼空間。在實施例中,第一訊息可以包括加密資訊,例如,如上所述VDM 1中的26個位元組的標識資料可以是加密資訊。 In step S502, a first confirmation message sent by the USB-PD charger when verifying the validity of the USB-PD host device based on the first message is received, and the USB-PD IC module of the USB-PD charger is used for The pointer of the executing program jumps from the user code space to the in-system programming code space. In an embodiment, the first message may include encrypted information, for example, the 26-byte identification data in VDM 1 as described above may be encrypted information.

在步驟S503中,基於從終端設備接收到的韌體更新資料而向USB-PD充電器發送第二訊息。在實施例中,在基於從終端設備接收到的韌體更新資料而向USB-PD充電器發送第二訊息之前,方法500還包括:向USB-PD充電器發送第三訊息,並且接收由USB-PD充電器發送的第三確認訊息;並且其中,第三訊息包括韌體更新資料的資料塊數量和USB-PD充電器的USB-PD IC模組的記憶體的更新起始位址。在實施例中,第三訊息可以是如上所述的VDM 3,並且可以具有如上所述的訊息格式。在實施例中,USB-PD主控裝置可以初始化資料塊計數器N=0。 In step S503, a second message is sent to the USB-PD charger based on the firmware update data received from the terminal device. In an embodiment, before sending the second message to the USB-PD charger based on the firmware update data received from the terminal device, the method 500 further includes: sending a third message to the USB-PD charger, and receiving a third message from the USB-PD charger. - a third confirmation message sent by the PD charger; and wherein the third message includes the number of data blocks of the firmware update data and the update start address of the memory of the USB-PD IC module of the USB-PD charger. In an embodiment, the third message may be VDM 3 as described above, and may have a message format as described above. In an embodiment, the USB-PD host device may initialize the data block counter N=0.

在實施例中,基於從終端設備接收到的韌體更新資料而向USB-PD充電器發送第二訊息包括:依次發送與韌體更新資料的資料塊數量相對應的多個第二子訊息。在實施例中,第二子訊息可以是如上所述的VDM 2,並且可以具有如上所述的訊息格式。此外,USB-PD主控裝置可以在發送一個第二子訊息之後,對資料塊計數器N進行遞增操作,直到所有第二子訊息發送完畢,並且資料塊計數器N等於韌體更新資料的資料塊數量。 In an embodiment, sending the second message to the USB-PD charger based on the firmware update data received from the terminal device includes sequentially sending a plurality of second sub-messages corresponding to the number of data blocks of the firmware update data. In an embodiment, the second sub-message may be VDM 2 as described above, and may have a message format as described above. In addition, after sending a second sub-message, the USB-PD host device can increment the data block counter N until all the second sub-messages are sent, and the data block counter N is equal to the number of data blocks of the firmware update data .

在步驟S504中,接收由USB-PD充電器在將第二訊息中的韌體更新資料寫入使用者程式碼空間之後而發送的第二確認訊息,以及使得USB-PD充電器的USB-PD IC模組用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間。在實施例中,當USB-PD主控裝置接收到第二確認訊息之後,可以完成對USB-PD充電器的韌體更新,並且因此,可以實現僅需要通過USB Type-C介面根據USB-PD協定來更 新USB-PD充電器的韌體。 In step S504, receive the second confirmation message sent by the USB-PD charger after writing the firmware update data in the second message into the user code space, and enable the USB-PD charger of the USB-PD charger The indicator used by the IC module to execute the program jumps from the system programming code space to the user code space. In the embodiment, after the USB-PD host device receives the second confirmation message, the firmware update of the USB-PD charger can be completed, and therefore, only the USB-PD charger needs to be updated through the USB Type-C interface. agreement to change Firmware for the new USB-PD charger.

在實施例中,在接收由USB-PD充電器在將第二訊息中的韌體更新資料寫入使用者程式碼空間之後而發送的第二確認訊息之後,並且在使得USB-PD充電器的USB-PD IC模組用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間之前,方法500還包括:基於從終端設備接收到的校驗指令而向USB-PD充電器發送請求訊息;接收由USB-PD充電器從使用者程式碼空間讀取並且發送的韌體更新資料,並且將韌體更新資料發送至終端設備用於檢測一致性;以及基於終端設備確認韌體更新資料的一致性而向USB-PD充電器發送第四訊息,並且接收由USB-PD充電器發送的第四確認訊息。 In an embodiment, after receiving the second acknowledgment message sent by the USB-PD charger after writing the firmware update data in the second message into the user code space, and after enabling the USB-PD charger's Before the index used by the USB-PD IC module for executing the program jumps from the system programming code space to the user code space, the method 500 further includes: charging the USB-PD based on the verification command received from the terminal device The device sends a request message; receives the firmware update data read and sent by the USB-PD charger from the user code space, and sends the firmware update data to the terminal device for checking consistency; and confirms the firmware based on the terminal device. The fourth message is sent to the USB-PD charger according to the consistency of the body update data, and the fourth confirmation message sent by the USB-PD charger is received.

在實施例中,通過將USB-PD充電器存儲的韌體更新資料發送回終端設備,並且由終端設備對韌體更新資料進行一致性檢測,來確保USB-PD充電器接收到的韌體更新資料是正確的。在實施例中,接收由USB-PD充電器從使用者程式碼空間讀取並且發送的韌體更新資料包括:依次接收韌體更新資料的各個資料塊。例如,USB-PD主控裝置可以通過如上所述的第三訊息VDM 3來按照資料塊編號依次接收韌體更新資料並且再轉發回終端設備。在實施例中,終端設備可以依次對韌體更新資料的各個資料塊進行一致性檢測。例如,終端設備可以在相應資料塊具有一致性時,繼續接收和檢測下一個資料塊,並且可以在相應資料塊不具有一致性時,報告錯誤。當韌體更新資料的所有資料塊都完成一致性檢測時,可以驗證USB-PD充電器接收到的韌體更新資料是正確的。 In an embodiment, the firmware update data stored by the USB-PD charger is sent back to the terminal device, and the terminal device performs consistency detection on the firmware update data to ensure that the firmware update data received by the USB-PD charger is updated The information is correct. In an embodiment, receiving the firmware update data read and sent by the USB-PD charger from the user code space includes: sequentially receiving each data block of the firmware update data. For example, the USB-PD host device can receive the firmware update data in sequence according to the data block number through the third message VDM 3 described above and forward it back to the terminal device. In an embodiment, the terminal device may sequentially perform consistency detection on each data block of the firmware update data. For example, the terminal device can continue to receive and detect the next data block when the corresponding data block is consistent, and can report an error when the corresponding data block is not consistent. When all data blocks of the firmware update data have completed the consistency check, it can be verified that the firmware update data received by the USB-PD charger is correct.

在實施例中,USB-PD充電器與USB-PD主控裝置之間的通信是經由USB Type-C介面根據USB-PD協定進行的,並且USB-PD主控裝置與終端設備之間的通信是經由UART介面進行的。這樣,可以實現僅需要通過USB Type-C介面根據USB-PD協定來更新USB-PD充電器的韌體。 In an embodiment, the communication between the USB-PD charger and the USB-PD host device is performed according to the USB-PD protocol via the USB Type-C interface, and the communication between the USB-PD host device and the terminal device This is done via the UART interface. In this way, only the firmware of the USB-PD charger needs to be updated according to the USB-PD protocol through the USB Type-C interface.

圖6示出了根據本發明的實施例的USB-PD充電器的韌體 更新時序圖。根據本發明的實施例,在步驟1中,終端設備可以向USB-PD主控裝置發送更新指令,以指示需要更新USB-PD充電器的韌體。在步驟2中,USB-PD主控裝置向USB-PD充電器發送第一訊息VDM 1。在步驟3中,USB-PD充電器在基於第一訊息VDM 1中的加密資訊驗證USB-PD主控裝置合法時發送確認訊息,並且將用於執行程式的指標從使用者程式碼空間跳轉到在系統程式設計程式碼空間。在步驟4中,USB-PD主控裝置在接收到第一確認訊息之後,向USB-PD充電器發送第二訊息VDM 2。在步驟5中,USB-PD充電器接收第二訊息VDM 2,並且向USB-PD主控裝置發送確認訊息。在步驟6中,USB-PD主控裝置通知終端設備以開始發送韌體更新資料。在步驟7中,終端設備向USB-PD主控裝置發送韌體更新資料。在步驟8中,USB-PD主控裝置向USB-PD充電器發送第三訊息VDM 3。在步驟9中,USB-PD充電器將韌體更新資料寫入使用者程式碼空間,並且向USB-PD主控裝置發送確認訊息。此外,步驟7~9可以重複執行,直到所有韌體更新資料都被發送至USB-PD充電器。在步驟10中,USB-PD主控裝置通知終端設備所有韌體更新資料已經發送完畢。 FIG. 6 shows firmware of a USB-PD charger according to an embodiment of the present invention Update timing diagram. According to an embodiment of the present invention, in step 1, the terminal device may send an update instruction to the USB-PD host device to indicate that the firmware of the USB-PD charger needs to be updated. In step 2, the USB-PD host device sends a first message VDM 1 to the USB-PD charger. In step 3, the USB-PD charger sends a confirmation message when verifying the validity of the USB-PD host device based on the encrypted information in the first message VDM 1, and jumps the indicator for executing the program from the user code space to In the system programming code space. In step 4, after receiving the first confirmation message, the USB-PD host device sends a second message VDM 2 to the USB-PD charger. In step 5, the USB-PD charger receives the second message VDM 2 and sends a confirmation message to the USB-PD host device. In step 6, the USB-PD host device notifies the terminal device to start sending firmware update data. In step 7, the terminal device sends firmware update data to the USB-PD host device. In step 8, the USB-PD host device sends a third message VDM 3 to the USB-PD charger. In step 9, the USB-PD charger writes the firmware update data into the user code space, and sends a confirmation message to the USB-PD host device. Also, steps 7-9 can be repeated until all firmware updates are sent to the USB-PD charger. In step 10, the USB-PD host device notifies the terminal device that all firmware update data have been sent.

在實施例中,在步驟11中,終端設備向USB-PD主控裝置發送校驗指令,以指示要讀取USB-PD充電器中存儲的韌體更新資料。在步驟12中,USB-PD主控裝置向USB-PD充電器發送請求訊息。在步驟13中,USB-PD充電器從使用者程式碼空間讀取韌體更新資料,並且向USB-PD主控裝置發送第三訊息VDM 3。在步驟14中,USB-PD主控裝置將韌體更新資料發送回終端設備,並且終端設備檢測韌體更新資料是否具有一致性。此外,步驟11~14可以重複執行,直到所有韌體更新資料都被驗證。在步驟15中,終端設備向USB-PD主控裝置發送更新完成指令,以指示更新結束。在步驟16中,USB-PD主控裝置向USB-PD充電器發送第四訊息VDM 4。在步驟17中,USB-PD充電器向USB-PD主控裝置發送確認訊息,並且將用於執行程式的指標從在系統程式設計程式碼空間跳轉到使用者程式碼空間。在步驟18中,USB-PD主控裝置通知終端設備更新結 束。 In an embodiment, in step 11, the terminal device sends a verification command to the USB-PD host device to indicate that the firmware update data stored in the USB-PD charger is to be read. In step 12, the USB-PD host device sends a request message to the USB-PD charger. In step 13, the USB-PD charger reads the firmware update data from the user code space, and sends a third message VDM 3 to the USB-PD host device. In step 14, the USB-PD host device sends the firmware update data back to the terminal device, and the terminal device detects whether the firmware update data is consistent. Additionally, steps 11 to 14 can be repeated until all firmware updates are verified. In step 15, the terminal device sends an update completion instruction to the USB-PD host device to indicate the end of the update. In step 16, the USB-PD host device sends a fourth message VDM 4 to the USB-PD charger. In step 17, the USB-PD charger sends a confirmation message to the USB-PD host device, and jumps the pointer for executing the program from the in-system programming code space to the user code space. In step 18, the USB-PD host device notifies the terminal device to update the result bundle.

如上所述,本發明的實施例通過終端設備和USB-PD主控裝置來對USB-PD充電器進行韌體更新。具體地,終端設備可以向USB-PD主控裝置發送韌體更新資料,並且USB-PD主控裝置可以將韌體更新資料轉發給USB-PD充電器,使得僅需要通過USB Type-C介面根據USB-PD協定來更新USB-PD充電器的韌體。此外,USB-PD充電器還可以將韌體更新資料經由USB-PD主控裝置發送回終端設備,使得由終端設備進行一致性檢測以校驗USB-PD充電器中的韌體更新資料。通過以上方式,在不需要對USB-PD充電器進行拆分並且不需要提供專用燒錄引腳的情況下,可以實現對USB-PD充電器進行韌體更新,並且確保韌體更新資料的一致性。 As described above, the embodiments of the present invention update the firmware of the USB-PD charger through the terminal device and the USB-PD host device. Specifically, the terminal device can send the firmware update data to the USB-PD host device, and the USB-PD host device can forward the firmware update data to the USB-PD charger, so that only the USB Type-C interface needs to be USB-PD protocol to update the firmware of USB-PD chargers. In addition, the USB-PD charger can also send the firmware update data back to the terminal device via the USB-PD host device, so that the terminal device can perform a consistency check to verify the firmware update data in the USB-PD charger. Through the above methods, the firmware update of the USB-PD charger can be realized without the need to disassemble the USB-PD charger and provide a dedicated programming pin, and the consistency of the firmware update data can be ensured sex.

雖然已經參考實施例對本發明進行了描述,但在不脫離本發明的範圍的情況下,可以對其進行各種改進並且可以用等效物替換其中的部件。尤其是,只要不存在結構衝突,各個實施例中所提到的各項技術特徵均可以任意方式組合起來。本發明並不局限於文中公開的特定實施例,而是包括落入申請專利範圍的範圍內的所有技術方案。 While the present invention has been described with reference to the embodiments, various modifications may be made and equivalents may be substituted for parts thereof without departing from the scope of the invention. In particular, as long as there is no structural conflict, each technical feature mentioned in each embodiment can be combined in any manner. The present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the patent application.

S401~S404:步驟 S401~S404: Steps

400:方法 400: Method

Claims (16)

一種由USB-PD充電器執行的方法,包括:接收由USB-PD主控裝置基於從終端設備接收到的更新指令而發送的第一訊息,所述第一訊息包括加密資訊;在基於所述第一訊息驗證所述USB-PD主控裝置合法時,向所述USB-PD主控裝置發送第一確認訊息,並且將所述USB-PD充電器的USB-PD IC模組用於執行程式的指標從使用者程式碼空間跳轉到在系統程式設計程式碼空間,且,對所述第一訊息中的加密資訊進行解密,並且基於解密的資訊來驗證所述USB-PD主控裝置合法;接收由所述USB-PD主控裝置基於從所述終端設備接收到的韌體更新資料而發送的第二訊息,並且將所述第二訊息中的韌體更新資料寫入所述使用者程式碼空間;以及向所述USB-PD主控裝置發送第二確認訊息,並且將所述USB-PD充電器的USB-PD IC模組用於執行程式的指標從所述在系統程式設計程式碼空間跳轉到所述使用者程式碼空間。 A method performed by a USB-PD charger, comprising: receiving a first message sent by a USB-PD host device based on an update instruction received from a terminal device, the first message including encrypted information; When the first message verifies that the USB-PD host device is legitimate, a first confirmation message is sent to the USB-PD host device, and the USB-PD IC module of the USB-PD charger is used to execute the program The indicator jumps from the user code space to the in-system programming code space, and decrypts the encrypted information in the first message, and verifies that the USB-PD host device is legal based on the decrypted information; Receive a second message sent by the USB-PD host device based on the firmware update data received from the terminal device, and write the firmware update data in the second message into the user program code space; and send a second confirmation message to the USB-PD host device, and use the USB-PD IC module of the USB-PD charger to execute the program index from the in-system programming code Space jumps to the user code space. 如請求項1所述的方法,其中,在接收由所述USB-PD主控裝置基於從所述終端設備接收到的韌體更新資料而發送的第二訊息之前,所述方法還包括:接收由所述USB-PD主控裝置發送的第三訊息,並且向所述USB-PD主控裝置發送第三確認訊息,並且其中,所述第三訊息包括所述韌體更新資料的資料塊數量和所述USB-PD充電器的USB-PD IC模組的記憶體的更新起始位址。 The method of claim 1, wherein before receiving the second message sent by the USB-PD host device based on the firmware update data received from the terminal device, the method further comprises: receiving a third message sent by the USB-PD host device, and a third confirmation message is sent to the USB-PD host device, and wherein the third message includes the number of data blocks of the firmware update data and the update starting address of the memory of the USB-PD IC module of the USB-PD charger. 如請求項2所述的方法,其中,接收由所述USB-PD主控裝置基於從所述終端設備接收到的韌體更新資料而發送的第二訊息包括:依次接收與所述韌體更新資料的資料塊數量相對應的多個第二子訊息。 The method of claim 2, wherein receiving the second message sent by the USB-PD host device based on the firmware update data received from the terminal device comprises: sequentially receiving and updating the firmware A plurality of second sub-messages corresponding to the number of data blocks of the data. 如請求項1所述的方法,其中,在向所述USB-PD主控裝置發送第二確認訊息之後,並且在將所述USB-PD充電器的USB-PD IC模組用於執 行程式的指標從所述在系統程式設計程式碼空間跳轉到所述使用者程式碼空間之前,所述方法還包括:接收由所述USB-PD主控裝置基於從所述終端設備接收到的校驗指令而發送的請求訊息;基於所述請求訊息,從所述使用者程式碼空間讀取所述韌體更新資料並且向所述USB-PD主控裝置發送所述韌體更新資料,以供所述USB-PD主控裝置將所述韌體更新資料發送至所述終端設備用於檢測一致性;以及接收由所述USB-PD主控裝置基於所述終端設備確認所述韌體更新資料的一致性而發送的第四訊息,並且向所述USB-PD主控裝置發送第四確認訊息。 The method of claim 1, wherein after sending a second confirmation message to the USB-PD host device, and after the USB-PD IC module of the USB-PD charger is used to execute the Before the index of the trip type is jumped from the in-system programming code space to the user code space, the method further includes: receiving by the USB-PD host device based on the data received from the terminal device. The request message sent by the verification command; based on the request message, read the firmware update data from the user code space and send the firmware update data to the USB-PD host device to for the USB-PD host device to send the firmware update data to the terminal device for checking consistency; and to receive confirmation of the firmware update by the USB-PD host device based on the terminal device A fourth message is sent according to the consistency of the data, and a fourth confirmation message is sent to the USB-PD host device. 如請求項4所述的方法,其中,向所述USB-PD主控裝置發送所述韌體更新資料包括:依次發送所述韌體更新資料的各個資料塊。 The method according to claim 4, wherein sending the firmware update data to the USB-PD host device comprises: sequentially sending each data block of the firmware update data. 如請求項1所述的方法,其中,所述USB-PD充電器與所述USB-PD主控裝置之間的通信是經由USB Type-C介面根據USB-PD協定進行的,並且所述USB-PD主控裝置與所述終端設備之間的通信是經由UART介面進行的。 The method of claim 1, wherein the communication between the USB-PD charger and the USB-PD host device is performed according to a USB-PD protocol via a USB Type-C interface, and the USB - The communication between the PD master and the terminal equipment is carried out via the UART interface. 一種由USB-PD主控裝置執行的方法,包括:基於從終端設備接收到的更新指令而向USB-PD充電器發送第一訊息,所述第一訊息包括加密資訊;接收由所述USB-PD充電器在基於所述第一訊息驗證所述USB-PD主控裝置合法時而發送的第一確認訊息,以及使得所述USB-PD充電器的USB-PD IC模組用於執行程式的指標從使用者程式碼空間跳轉到在系統程式設計程式碼空間;基於從所述終端設備接收到的韌體更新資料而向所述USB-PD充電器發送第二訊息;以及接收由所述USB-PD充電器在將所述第二訊息中的韌體更新資料寫入 所述使用者程式碼空間之後而發送的第二確認訊息,以及使得所述USB-PD充電器的USB-PD IC模組用於執行程式的指標從所述在系統程式設計程式碼空間跳轉到所述使用者程式碼空間。 A method performed by a USB-PD host control device, comprising: sending a first message to a USB-PD charger based on an update instruction received from a terminal device, the first message including encryption information; The first confirmation message sent by the PD charger when it verifies that the USB-PD host device is legitimate based on the first message, and the USB-PD IC module of the USB-PD charger is used to execute the program The pointer jumps from the user code space to the in-system programming code space; sends a second message to the USB-PD charger based on the firmware update data received from the terminal device; - The PD charger is writing the firmware update data in the second message The second confirmation message sent after the user code space, and the indicator that the USB-PD IC module of the USB-PD charger is used to execute the program jumps from the in-system programming code space to the user code space. 如請求項7所述的方法,其中,在基於從所述終端設備接收到的韌體更新資料而向所述USB-PD充電器發送第二訊息之前,所述方法還包括:向所述USB-PD充電器發送第三訊息,並且接收由所述USB-PD充電器發送的第三確認訊息;並且其中,所述第三訊息包括所述韌體更新資料的資料塊數量和所述USB-PD充電器的USB-PD IC模組的記憶體的更新起始位址。 The method of claim 7, wherein before sending the second message to the USB-PD charger based on the firmware update data received from the terminal device, the method further comprises: sending the USB - the PD charger sends a third message, and receives a third confirmation message sent by the USB-PD charger; and wherein the third message includes the number of data blocks of the firmware update data and the USB-PD The update start address of the memory of the USB-PD IC module of the PD charger. 如請求項8所述的方法,其中,基於從所述終端設備接收到的韌體更新資料而向所述USB-PD充電器發送第二訊息包括:依次發送與所述韌體更新資料的資料塊數量相對應的多個第二子訊息。 The method of claim 8, wherein sending the second message to the USB-PD charger based on the firmware update data received from the terminal device comprises: sequentially sending data related to the firmware update data A plurality of second sub-messages corresponding to the number of blocks. 如請求項7所述的方法,其中,在接收由所述USB-PD充電器在將所述第二訊息中的韌體更新資料寫入所述使用者程式碼空間之後而發送的第二確認訊息之後,並且在使得所述USB-PD充電器的USB-PD IC模組用於執行程式的指標從所述在系統程式設計程式碼空間跳轉到所述使用者程式碼空間之前,所述方法還包括:基於從所述終端設備接收到的校驗指令而向所述USB-PD充電器發送請求訊息;接收由所述USB-PD充電器從所述使用者程式碼空間讀取並且發送的所述韌體更新資料,並且將所述韌體更新資料發送至所述終端設備用於檢測一致性;以及基於所述終端設備確認所述韌體更新資料的一致性而向所述USB-PD充電器發送第四訊息,並且接收由所述USB-PD充電器發送的第四確認訊息。 The method of claim 7, wherein a second acknowledgment sent by the USB-PD charger after writing the firmware update data in the second message into the user code space is received After the message, and before causing the pointer of the USB-PD IC module of the USB-PD charger for executing programs to jump from the in-system programming code space to the user code space, the method It also includes: sending a request message to the USB-PD charger based on the verification instruction received from the terminal device; receiving and sending the information read and sent by the USB-PD charger from the user code space the firmware update data, and send the firmware update data to the terminal device for checking consistency; and send the firmware update data to the USB-PD based on the terminal device confirming the consistency of the firmware update data The charger sends a fourth message, and receives a fourth confirmation message sent by the USB-PD charger. 如請求項10所述的方法,其中,接收由所述USB-PD充電器從所述使用者程式碼空間讀取並且發送的所述韌體更新資料包括: 依次接收所述韌體更新資料的各個資料塊。 The method of claim 10, wherein receiving the firmware update data read and sent by the USB-PD charger from the user code space comprises: Each data block of the firmware update data is received in sequence. 如請求項7所述的方法,其中,所述USB-PD充電器與所述USB-PD主控裝置之間的通信是經由USB Type-C介面根據USB-PD協定進行的,並且所述USB-PD主控裝置與所述終端設備之間的通信是經由UART介面進行的。 The method of claim 7, wherein the communication between the USB-PD charger and the USB-PD host device is performed according to a USB-PD protocol via a USB Type-C interface, and the USB - The communication between the PD master and the terminal equipment is carried out via the UART interface. 一種USB-PD IC模組,包括:微控制器核心、可多次擦寫記憶體、USB-PD資料緩衝器、VBUS控制模組、USB-PD實體層介面電路、和UART/I2C介面電路,並且其中,所述微控制器核心分別與所述可多次擦寫記憶體、所述USB-PD協定發送接收資料緩衝器、所述VBUS控制模組、所述USB-PD實體層介面電路、和所述UART/I2C介面電路可通信地連接;所述可多次擦寫記憶體包括使用者程式碼空間和在系統程式設計程式碼空間;所述USB-PD資料緩衝器用於緩衝根據USB-PD協定傳輸的資料;所述VBUS控制模組用於充電控制;所述USB-PD實體層介面電路用於經由USB Type-C介面根據USB-PD協定進行通信;所述UART/I2C介面電路用於經由UART介面進行通信。 A USB-PD IC module, comprising: a microcontroller core, a multiple-erasable memory, a USB-PD data buffer, a VBUS control module, a USB-PD physical layer interface circuit, and a UART/I2C interface circuit, And wherein, the microcontroller core is respectively connected with the rewritable memory, the USB-PD protocol sending and receiving data buffer, the VBUS control module, the USB-PD physical layer interface circuit, and the UART/I2C interface circuit is communicatively connected; the rewritable memory includes user code space and in-system programming code space; the USB-PD data buffer is used for buffering according to the USB- The data transmitted by the PD protocol; the VBUS control module is used for charging control; the USB-PD physical layer interface circuit is used to communicate according to the USB-PD protocol via the USB Type-C interface; the UART/I2C interface circuit is used for for communication via the UART interface. 一種USB-PD充電器,包括如請求項13所述的USB-PD IC模組,其中,所述USB-PD IC模組中的所述UART/I2C介面電路被封裝並且不與外部通信,並且其中,所述USB-PD充電器用於執行如請求項1-6中任一項所述的方法。 A USB-PD charger, comprising the USB-PD IC module according to claim 13, wherein the UART/I2C interface circuit in the USB-PD IC module is packaged and does not communicate with the outside, and Wherein, the USB-PD charger is used to execute the method according to any one of claim 1-6. 一種USB-PD主控裝置,包括如請求項13所述的USB-PD IC模組,其中,所述USB-PD主控裝置用於執行如請求項7-12中任一項所述的方法。 A USB-PD host control device, comprising the USB-PD IC module according to claim 13, wherein the USB-PD host control device is used to execute the method according to any one of claim items 7-12 . 一種USB-PD更新系統,包括如請求項14所述的USB-PD充電器、如請求項15所述的USB-PD主控裝置、以及終端設備。 A USB-PD update system includes the USB-PD charger according to claim 14, the USB-PD host device according to claim 15, and a terminal device.
TW109114609A 2020-03-31 2020-04-30 Firmware update method and device for USB-PD charger TWI765257B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010240827.5A CN111352645B (en) 2020-03-31 2020-03-31 Firmware updating method and device for USB-PD charger
CN202010240827.5 2020-03-31

Publications (2)

Publication Number Publication Date
TW202139021A TW202139021A (en) 2021-10-16
TWI765257B true TWI765257B (en) 2022-05-21

Family

ID=71197504

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109114609A TWI765257B (en) 2020-03-31 2020-04-30 Firmware update method and device for USB-PD charger

Country Status (2)

Country Link
CN (1) CN111352645B (en)
TW (1) TWI765257B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326057B (en) * 2021-06-30 2023-04-14 安克创新科技股份有限公司 Main control program upgrading method, device and system and electronic equipment
CN113328505B (en) * 2021-08-03 2021-10-29 深圳英集芯科技股份有限公司 Charging demand adaptation method, electronic equipment and related product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1540497A (en) * 2003-04-21 2004-10-27 矽成积体电路股份有限公司 Method of updating firmware for USB device
CN101963910A (en) * 2010-09-21 2011-02-02 深圳市元征软件开发有限公司 General USB (Universal Serial Bus) based equipment firmware updating method
US20160306616A1 (en) * 2015-04-20 2016-10-20 Microsoft Technology Licensing, Llc Firmware update by usb cc
TW201939298A (en) * 2018-03-13 2019-10-01 美商賽普拉斯半導體公司 Programmable gate driver control in USB power delivery

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116561A (en) * 2011-11-17 2013-05-22 凹凸电子(武汉)有限公司 Digital signal receiving and sending device, method and electric vehicle system
US9431831B1 (en) * 2014-07-25 2016-08-30 Google Inc. Updating firmware for charging device
JP6501867B2 (en) * 2014-08-05 2019-04-17 テキサス インスツルメンツ インコーポレイテッド Method, electronic device, and charger device for rapid USB charging
CN110489137B (en) * 2018-05-15 2024-04-09 恩智浦美国有限公司 System and method for updating firmware in a wireless charger
CN110457055B (en) * 2019-07-29 2023-06-09 珠海一微半导体股份有限公司 Firmware upgrading control method, system and control terminal for quick-charging protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1540497A (en) * 2003-04-21 2004-10-27 矽成积体电路股份有限公司 Method of updating firmware for USB device
CN101963910A (en) * 2010-09-21 2011-02-02 深圳市元征软件开发有限公司 General USB (Universal Serial Bus) based equipment firmware updating method
US20160306616A1 (en) * 2015-04-20 2016-10-20 Microsoft Technology Licensing, Llc Firmware update by usb cc
TW201939298A (en) * 2018-03-13 2019-10-01 美商賽普拉斯半導體公司 Programmable gate driver control in USB power delivery

Also Published As

Publication number Publication date
CN111352645B (en) 2023-08-22
CN111352645A (en) 2020-06-30
TW202139021A (en) 2021-10-16

Similar Documents

Publication Publication Date Title
US10735427B2 (en) Method and apparatus for managing program of electronic device
TWI765257B (en) Firmware update method and device for USB-PD charger
CN101479737B (en) Method and system for authenticating an accessory
CN106415433B (en) Message is transmitted by the tunnel USB to control power Transmission
US9563368B2 (en) Embedded multimedia card and method of operating the same
TW200903264A (en) Data sharing and transfer systems and methods
CN111694589B (en) Upgrade package generation method, device, server and computer readable storage medium
EP2704021B1 (en) SRAM handshake
US20140129206A1 (en) Simulator and simulating method for flash memory background
JP2005050306A (en) Information processor and information processing terminal
CN104333401A (en) Methods, devices and systems for sending and receiving Bluetooth data
CN106649158B (en) Device and method for reading and writing internal register file through I2C interface
CN110045974B (en) Upgrading method and device for display firmware and terminal
CN102222181A (en) Method for realizing trusted computing platform in embedded device
CN112181460B (en) Program firmware upgrading method and device, electronic equipment and storage medium
CN115688120A (en) Secure chip firmware importing method, secure chip and computer readable storage medium
KR20110089129A (en) Bit inversion for communication interface
CN111381838B (en) Data writing method, burning system, data updating method and storage device
CN114650138A (en) I2C communication method, system, equipment and medium
CN108134963B (en) Digital television all-in-one machine upgrading method, device, medium and computer equipment
TWI783514B (en) Signal processing system and method for identifying and pairing a signal transmitting device
CN112202636B (en) Communication test method and system
CN111240726B (en) Embedded data processing system
CN112306553B (en) Processing method and device for extension information in installation package file and electronic equipment
CN114356382A (en) Method for upgrading IAP application program of insulin pump main controller