TWI768198B - Microcontroller, memory module, and method for updating firmware of the microcontroller - Google Patents

Microcontroller, memory module, and method for updating firmware of the microcontroller Download PDF

Info

Publication number
TWI768198B
TWI768198B TW108111648A TW108111648A TWI768198B TW I768198 B TWI768198 B TW I768198B TW 108111648 A TW108111648 A TW 108111648A TW 108111648 A TW108111648 A TW 108111648A TW I768198 B TWI768198 B TW I768198B
Authority
TW
Taiwan
Prior art keywords
mcu
data
checksum
application
check
Prior art date
Application number
TW108111648A
Other languages
Chinese (zh)
Other versions
TW202038091A (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 美商海盜船記憶體公司
Priority to TW108111648A priority Critical patent/TWI768198B/en
Publication of TW202038091A publication Critical patent/TW202038091A/en
Application granted granted Critical
Publication of TWI768198B publication Critical patent/TWI768198B/en

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

The present disclosure provides a microcontroller unit having a processing unit and a memory unit. The memory unit is configured to include a bootloader section with a computer program code. When the computer program code is executed by the processing unit, the microcontroller unit performs a check mechanism according to a plurality of data blocks and a plurality of checksums associated with the data blocks to generate a plurality of first check results during update of firmware. A memory module including the microcontroller unit is also provided. A method for initializing and updating firmware of the microcontroller unit is also provided.

Description

微控制器、記憶體模組及用於更新微控制器之韌體的方法Microcontroller, memory module and method for updating firmware of microcontroller

本發明係關於一種微控制器、記憶體模組及用於更新微控制器之韌體的方法,尤其是關於一種可不斷電進行韌體更新的微控制器、記憶體模組及方法。 The present invention relates to a microcontroller, a memory module and a method for updating the firmware of the microcontroller, in particular to a microcontroller, a memory module and a method for updating the firmware without power failure.

記憶體模組可包括模組板及安裝於模組板上之一些揮發性記憶體組件。除記憶體組件以外的一些組件(例如光學組件、音訊組件等)亦可整合至模組板中。一或多個控制器(例如,微控制器單元Microcontroller Unit,MCU)由此引入於記憶體模組上以控制此等組件。 A memory module may include a module board and some volatile memory components mounted on the module board. Some components other than memory components (eg, optical components, audio components, etc.) can also be integrated into the module board. One or more controllers (eg, Microcontroller Unit, MCU) are thus introduced on the memory module to control these components.

由控制器運行之韌體可能需要更新以修正錯誤(其導致此等非記憶體組件之故障)或將特徵添加至此等非記憶體組件。 The firmware run by the controller may need to be updated to fix bugs that cause the failure of these non-memory components or to add features to these non-memory components.

本發明提供一種不需要關閉電腦電源以使對使用者之中斷最小化的韌體更新方案。 The present invention provides a firmware update solution that does not require shutting down the computer power to minimize interruption to users.

本發明之一些實施例提供一種微控制器單元(Microcontroller Unit,MCU)。MCU包括處理單元及記憶體單元。記憶體單元經組態以包括開機載入程式區段。開機載入程式區段經組態以儲存 電腦程式碼。該電腦程式碼在由該處理單元執行時,使得該MCU根據複數個資料塊及與該等資料塊相關聯的複數個檢查和執行第一檢查機制,以在韌體更新階段產生複數個第一檢查結果。 Some embodiments of the present invention provide a microcontroller unit (Microcontroller Unit, MCU). The MCU includes a processing unit and a memory unit. The memory unit is configured to include a boot loader section. The boot loader section is configured to store computer code. The computer code, when executed by the processing unit, causes the MCU to perform a first check mechanism according to a plurality of data blocks and a plurality of check sums associated with the data blocks to generate a plurality of first check mechanisms during the firmware update phase test result.

本發明之一些實施例提供一種記憶體模組。該記憶體模組包括模組板、複數個揮發性記憶體組件及MCU。模組板具有介面。揮發性記憶體組件安置於模組板上,且經由介面電連接至外部中央處理單元(Central Processing Unit,CPU)。MCU安置於模組板上,且經組態以:在開機載入程式模式下自外部CPU接收複數個資料塊及複數個檢查和,複數個資料塊中之每一者與來自該複數個檢查和的指定檢查和配對,其中資料塊及檢查和由外部CPU自經更新之韌體檔案擷取;以及檢查複數個資料塊中之每一者是否對應於指定檢查和。 Some embodiments of the present invention provide a memory module. The memory module includes a module board, a plurality of volatile memory components and an MCU. The module board has an interface. The volatile memory component is disposed on the module board, and is electrically connected to an external central processing unit (CPU) through an interface. The MCU is disposed on the module board and is configured to: receive a plurality of data blocks and a plurality of checksums from an external CPU in a boot loader mode, each of the plurality of data blocks and a plurality of checksums from the plurality of checksums a specified checksum pairing of the sums, wherein the data blocks and the checksums are retrieved from the updated firmware file by the external CPU; and checking whether each of the plurality of data blocks corresponds to the specified checksums.

本發明之一些實施例提供一種用於更新MCU之韌體的方法。MCU經由通道與外部CPU以通信方式耦接。該方法包括:外部CPU接收經更新之韌體檔案;外部CPU執行經更新之韌體檔案以獲取複數個資料塊及與該等資料塊相關聯的複數個檢查和;MCU接收複數個資料塊中之第一資料塊及複數個檢查和中指定給第一資料塊之第一檢查和;以及MCU根據第一資料塊及第一檢查和執行檢查機制,以產生第一檢查結果。 Some embodiments of the present invention provide a method for updating the firmware of an MCU. The MCU is communicatively coupled to an external CPU via a channel. The method includes: an external CPU receives an updated firmware file; the external CPU executes the updated firmware file to obtain a plurality of data blocks and a plurality of checksums associated with the data blocks; the MCU receives the data in the plurality of data blocks The first data block and the plurality of checksums are assigned to a first checksum of the first data block; and the MCU executes a check mechanism according to the first data block and the first checksum to generate a first check result.

本發明之一些實施例提供一種用於初始化MCU之方法。MCU經由通道與外部CPU以通信方式耦接。該方法包括:MCU根據應用程式區段中之應用程式資料及資料區段中之應用程式檢查和執行第一檢查機制,以產生第一檢查結果;當第一檢查結果正確時,MCU進入應用程式模式;當第一檢查結果不正確時,MCU進入開機載入程式模式;以及 當MCU處於開機載入程式模式下時,執行所提及之更新MCU之韌體的方法。 Some embodiments of the present invention provide a method for initializing an MCU. The MCU is communicatively coupled to an external CPU via a channel. The method includes: the MCU checks and executes a first check mechanism according to the application data in the application section and the application in the data section to generate a first check result; when the first check result is correct, the MCU enters the application program mode; when the first check result is incorrect, the MCU enters the boot loader mode; and When the MCU is in the boot loader mode, execute the mentioned method of updating the firmware of the MCU.

10:網路連接 10: Internet connection

11:更新韌體提供端 11: Update the firmware provider

13:經更新韌體接收端 13: Updated firmware receiver

21:經更新韌體提供端 21: Updated firmware provider

23:經更新韌體裝置 23: Updated firmware device

25:使用者終端 25: User terminal

27:電腦可讀媒體 27: Computer-readable media

110:經更新韌體 110:Updated firmware

130:匯流排 130: Busbar

131:通信模組 131: Communication module

132:中央處理單元 132: Central Processing Unit

133:記憶體模組 133: Memory module

135:MCU 135:MCU

139:主機板 139: Motherboard

210:經更新韌體 210: Updated firmware

230:匯流排 230: Busbar

231:介面 231: Interface

232:CPU 232:CPU

233:記憶體模組 233: Memory Module

235:MCU 235:MCU

239:主機板 239: Motherboard

310:經更新韌體檔案 310: Updated firmware file

330:系統管理匯流排或積體電路間匯流排 330: System management bus or inter-circuit bus

332:CPU 332:CPU

333:記憶體模組 333: Memory Module

334:模組板 334: Module Board

335:MCU 335:MCU

336:串列存在偵測單元 336: Serial presence detection unit

337:介面 337: Interface

339:主機板 339: Motherboard

411:資料塊 411: Data block

412:檢查和 412: Checksum

435:MCU 435:MCU

435M:記憶體單元 435M: memory unit

435P:處理單元 435P: Processing unit

901:連接器 901: Connector

903:MCU 903:MCU

4350:應用程式區段 4350: Application section

4350a:應用程式資料 4350a: Application Data

4352:資料區段 4352: Data section

4352a:應用程式資料之資訊 4352a: Information on application data

4352b:應用程式檢查和 4352b: Application Checksum

4354:開機載入程式區段 4354: Bootloader section

PG:電腦程式碼 PG: computer code

PG1:第一檢查機制 PG1: First Check Mechanism

PG2:第二檢查機制 PG2: Second Inspection Mechanism

S501:操作 S501: Operation

S502:操作 S502: Operation

S503:操作 S503: Operation

S504:操作 S504: Operation

S505:操作 S505: Operation

S701:操作 S701: Operation

S702:操作 S702: Operation

S703:操作 S703: Operation

S704:操作 S704: Operation

S705:操作 S705: Operation

S706:操作 S706: Operation

S707:操作 S707: Operation

S708:操作 S708: Operation

S709:操作 S709: Operation

S801:操作 S801: Operation

S802:操作 S802: Operation

S803:操作 S803: Operation

S804:操作 S804: Operation

S805:操作 S805: Operation

S806:操作 S806: Operation

S807:操作 S807: Operation

S808:操作 S808: Operation

S809:操作 S809: Operation

S810:操作 S810: Operation

S811:操作 S811: Operation

U1:揮發性記憶體組件 U1: Volatile Memory Components

U2:揮發性記憶體組件 U2: Volatile Memory Components

U3:揮發性記憶體組件 U3: Volatile Memory Components

U4:揮發性記憶體組件 U4: Volatile Memory Components

U5:揮發性記憶體組件 U5: Volatile Memory Components

U6:揮發性記憶體組件 U6: Volatile Memory Components

U7:揮發性記憶體組件 U7: Volatile Memory Components

U8:揮發性記憶體組件 U8: Volatile Memory Components

結合附圖閱讀以下詳細描述會最佳地理解本發明之態樣。應注意,各種特徵可能未按比例繪製。事實上,可出於論述清楚起見,而任意地增大或減小各種特徵之尺寸。 Aspects of the invention are best understood when the following detailed description is read in conjunction with the accompanying drawings. It should be noted that various features may not be drawn to scale. In fact, the dimensions of the various features may be arbitrarily increased or decreased for clarity of discussion.

圖1為根據本發明之一些實施例的包括經更新韌體提供端及經更新韌體接收器的韌體更新環境之方塊圖。 1 is a block diagram of a firmware update environment including an updated firmware provider and an updated firmware receiver, according to some embodiments of the present invention.

圖2為根據本發明之一些實施例的包括經更新韌體提供端、使用者終端及電腦可讀媒體的韌體更新環境之方塊圖。 2 is a block diagram of a firmware update environment including an updated firmware provider, a user terminal, and a computer-readable medium, according to some embodiments of the present invention.

圖3為說明根據本發明之一些實施例的記憶體模組與主機板之間的連接的連接圖。 3 is a connection diagram illustrating the connection between a memory module and a motherboard according to some embodiments of the present invention.

圖4A及圖4B為展示根據本發明之一些實施例的微控制器單元中之若干功能區塊的方塊圖。 4A and 4B are block diagrams showing several functional blocks in a microcontroller unit according to some embodiments of the invention.

圖5為展示根據本發明之一些實施例的用於韌體初始化及更新的方法的流程圖。 5 is a flowchart showing a method for firmware initialization and update according to some embodiments of the present invention.

圖6為根據本發明之一些實施例的處理經更新韌體檔案的示意圖。 6 is a schematic diagram of processing an updated firmware file according to some embodiments of the present invention.

圖7為展示根據本發明之一些實施例的用於韌體初始化及更新的方法的流程圖。 7 is a flowchart showing a method for firmware initialization and update according to some embodiments of the present invention.

圖8為展示根據本發明之一些實施例的用於韌體初始化及更新的方法的流程圖。 8 is a flowchart showing a method for firmware initialization and update according to some embodiments of the present invention.

圖9為根據本發明之一些比較實施例的記憶體模組。 9 is a memory module according to some comparative embodiments of the present invention.

以下揭示內容提供用於實施所提供之主題之不同特徵的許多不同實施例或實例。下文描述組件及配置之特定實例以簡化本發明。當然,此等組件及配置僅為實例且不意欲為限制性的。在本發明中,在以下描述中提及第一特徵形成於第二特徵上方或上可包括第一特徵與第二特徵直接接觸地形成的實施例,且亦可包括額外特徵可在第一特徵與第二特徵之間形成,使得第一特徵與第二特徵可能不直接接觸的實施例。另外,本發明可在各種實例中重複附圖標號及/或字母。此重複係出於簡化及清楚之目的,且本身並不指示所論述之各種實施例及/或組態之間的關係。 The following disclosure provides many different embodiments or examples for implementing different features of the provided subject matter. Specific examples of components and configurations are described below to simplify the present disclosure. Of course, these components and configurations are examples only and are not intended to be limiting. In the present invention, reference in the following description to the formation of the first feature over or on the second feature may include embodiments in which the first feature is formed in direct contact with the second feature, and may also include additional features that may be formed on the first feature and the second feature so that the first feature may not be in direct contact with the second feature. Additionally, the present disclosure may repeat reference numerals and/or letters in various instances. This repetition is for the purpose of simplicity and clarity, and does not in itself indicate a relationship between the various embodiments and/or configurations discussed.

在下文更詳細地論述本發明之實施例。然而,應瞭解,本發明提供可在廣泛多種特定情境中體現之許多適用的概念。所論述特定實施例僅為說明性的且並不限制本發明之範疇。 Embodiments of the invention are discussed in greater detail below. It should be appreciated, however, that the present disclosure provides many applicable concepts that can be embodied in a wide variety of specific contexts. The specific embodiments discussed are illustrative only and do not limit the scope of the invention.

此外,為了易於描述,諸如「在......之下」、「在......下方」、「在......上方」、「上部」、「下部」、「左側」、「右側」及其類似術語之空間相對術語可在本文中用於描述一個元件或特徵與另一(或多個)元件或特徵之如圖式中所說明的關係。除圖式中所描繪之定向以外,空間相對術語意欲涵蓋裝置在使用或操作中之不同定向。設備可以其他方式定向(旋轉90度或處於其他定向),且本文中所使用之空間相對描述詞可同樣相應地進行解譯。應理解,當元件被稱為「連接至」或「耦接至」另一元件時,該元件可直接連接至或耦接至另一元件,或可存在介入元件。 Also, for ease of description, such as "under", "below", "above", "upper", "lower", " The spatially relative terms "left", "right", and similar terms, may be used herein to describe the relationship of one element or feature to another element or feature as illustrated in the figures. In addition to the orientation depicted in the figures, spatially relative terms are intended to encompass different orientations of the device in use or operation. The device may be otherwise oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted accordingly. It will be understood that when an element is referred to as being "connected" or "coupled to" another element, it can be directly connected or coupled to the other element or intervening elements may be present.

闡述本發明之廣泛範疇的數值範圍及參數為近似值,且可儘可能精確地報告特定實例中闡述之數值。然而,一些數值可含有由各別測試量測值中發現之標準差必然引起的某些誤差。此外,如本文中所使 用,術語「約」通常意謂在給定值或範圍之±10%、±5%、±1%或±0.5%內。替代地,一般熟習此項技術者認為,術語「約」意謂在平均值之可接受標準誤差內。除在操作/工作實例中以外,或除非以其他方式明確指定,否則數值範圍、量、值及百分比(諸如,本文中所揭示之材料數量、持續時間、溫度、操作條件、量之比率及其類似者之彼等者)中之所有應理解為在所有情況下由術語「約」修飾。因此,除非有相反指示,否則本發明及所附申請專利範圍中所闡述之數值參數為可變化之近似值。至少,應根據所報導之有效數位之數字且藉由應用一般捨位技術理解各數值參數。範圍可在本文中表現為自一個端點至另一端點或在兩個端點之間。除非另外指定,否則本文中所揭示之所有範圍包括端點。術語「大體上共面」可指沿著同一平面處於數微米(μm)內(諸如,沿著同一平面處於10μm內、5μm內、1μm內或0.5μm內)之兩個表面。在稱數值或特性「大體上」相同時,該術語可指該等值處於該等值之平均值的±10%、±5%、±1%或±0.5%內。 The numerical ranges and parameters setting forth the broad scope of the invention are approximations, and the numerical values set forth in the specific examples are reported as precisely as possible. Some numerical values, however, may contain certain errors necessarily resulting from the standard deviation found in their respective testing measurements. In addition, as used herein In use, the term "about" generally means within ±10%, ±5%, ±1%, or ±0.5% of a given value or range. Alternatively, as is generally understood by those skilled in the art, the term "about" means within an acceptable standard error of the mean. Except in operating/working examples, or unless expressly specified otherwise, numerical ranges, amounts, values, and percentages (such as amounts of materials, durations, temperatures, operating conditions, ratios of amounts, and the like disclosed herein) All of the like) should be understood to be modified in all instances by the term "about". Accordingly, unless indicated to the contrary, the numerical parameters set forth in this disclosure and the appended claims are approximations that may vary. At a minimum, each numerical parameter should be understood in light of the number of reported significant digits and by applying ordinary rounding techniques. A range can be expressed herein as from one endpoint to the other or between the two endpoints. All ranges disclosed herein are inclusive of the endpoints unless otherwise specified. The term "substantially coplanar" can refer to two surfaces that lie within a few micrometers (μm) along the same plane, such as within 10 μm, 5 μm, 1 μm, or 0.5 μm along the same plane. When values or properties are said to be "substantially" the same, the term can mean that the values are within ±10%, ±5%, ±1%, or ±0.5% of the mean of the values.

一些組件可整合至動態隨機存取記憶體(Dynamic Random Access Memory,DRAM)模組中以提供額外功能(例如,視覺效果、音訊效果、功率管理等)。微控制器單元(Microcontroller Unit,MCU)亦併入至DRAM模組中以控制此等組件。 Some components can be integrated into Dynamic Random Access Memory (DRAM) modules to provide additional functions (eg, visual effects, audio effects, power management, etc.). A Microcontroller Unit (MCU) is also incorporated into the DRAM module to control these components.

參看圖1,其為根據本發明之一些實施例的包括經更新韌體提供端11及經更新韌體接收端13的韌體更新環境之方塊圖。經更新韌體接收端13包括通信模組131、中央處理單元(Central Processing Unit,CPU)132及包括MCU 135之記憶體模組133。通信模組131、CPU 133及記憶體模組133安置於主機板139上,且由匯流排130電性耦接。在此韌體 更新環境中,在經更新韌體提供端11與經更新韌體接收端13之間建立網路連接10以用於傳輸相關資料。將在下文中進一步描述該等元件之間的交互作用。 Referring to FIG. 1 , which is a block diagram of a firmware update environment including an updated firmware provider 11 and an updated firmware receiver 13 according to some embodiments of the present invention. The updated firmware receiving end 13 includes a communication module 131 , a central processing unit (CPU) 132 and a memory module 133 including an MCU 135 . The communication module 131 , the CPU 133 and the memory module 133 are arranged on the motherboard 139 and are electrically coupled by the bus bar 130 . firmware here In the update environment, a network connection 10 is established between the updated firmware provider 11 and the updated firmware receiver 13 for transmitting related data. The interaction between these elements will be further described below.

在一些實施例中,當經更新韌體110經開發且分配就緒時,經更新韌體提供端11可將經更新韌體110經由網路連接10傳輸至經更新韌體接收端13。另一方面,經更新韌體接收端13之通信模組131接收經更新韌體110。接著,在經更新韌體接收端13接收經更新韌體110之後,經更新韌體接收端13之CPU 132可預處理更新韌體110,且將更新韌體110轉送至記憶體模組133之MCU 135。因此,MCU 135可藉由經更新韌體110更新MCU 135之韌體。 In some embodiments, when the updated firmware 110 is developed and ready for distribution, the updated firmware provider 11 may transmit the updated firmware 110 to the updated firmware receiver 13 via the network connection 10 . On the other hand, the communication module 131 of the updated firmware receiving end 13 receives the updated firmware 110 . Then, after the updated firmware 110 is received by the updated firmware receiver 13 , the CPU 132 of the updated firmware receiver 13 can preprocess the updated firmware 110 and forward the updated firmware 110 to the memory module 133 MCU135. Therefore, the MCU 135 can update the firmware of the MCU 135 through the updated firmware 110 .

應特別瞭解,在一些實施例中,通信模組可為網路資料傳輸器及網路資料接收器之組合,或用於傳輸網路資料及接收網路資料之電路之組合。然而,此類描述不意欲限制本發明之硬體實現實施例。 It should be particularly understood that, in some embodiments, the communication module may be a combination of a network data transmitter and a network data receiver, or a combination of circuits for transmitting network data and receiving network data. However, such descriptions are not intended to limit hardware-implemented embodiments of the present invention.

參看圖2,其為根據本發明之一些實施例的包括經更新韌體提供端21、經更新韌體裝置23、使用者終端25及電腦可讀媒體27的韌體更新環境之方塊圖。經更新韌體裝置23包括介面231、CPU 232及包括MCU 235之記憶體模組233。介面231、CPU 233及記憶體模組233安置於主機板239上,且由匯流排230電性耦接。將在下文中進一步描述該等元件之間的交互作用。 2, which is a block diagram of a firmware update environment including an updated firmware provider 21, an updated firmware device 23, a user terminal 25, and a computer-readable medium 27 according to some embodiments of the present invention. The updated firmware device 23 includes an interface 231 , a CPU 232 and a memory module 233 including an MCU 235 . The interface 231 , the CPU 233 and the memory module 233 are disposed on the motherboard 239 and are electrically coupled by the bus bar 230 . The interaction between these elements will be further described below.

在一些實施例中,當經更新韌體210經開發且分配就緒時,經更新韌體210可首先記錄於電腦可讀媒體27中。隨後,經更新韌體提供端21將具有經更新韌體210之電腦可讀媒體27提供至使用者終端25。在使用者終端25獲得具有經更新韌體210之電腦可讀媒體27之後,經更新 韌體裝置23之介面231可用於自電腦可讀媒體27擷取經更新韌體210。接著,在經更新韌體裝置23擷取經更新韌體210之後,經更新韌體裝置23之CPU 232可預處理更新韌體210,並將更新韌體210轉送至記憶體模組233之MCU 235。因此,MCU 235可藉由經更新韌體210更新MCU 235之韌體。 In some embodiments, the updated firmware 210 may first be recorded on the computer-readable medium 27 when the updated firmware 210 is developed and ready for distribution. Then, the updated firmware provider 21 provides the computer-readable medium 27 with the updated firmware 210 to the user terminal 25 . After the user terminal 25 obtains the computer-readable medium 27 with the updated firmware 210, the updated The interface 231 of the firmware device 23 can be used to retrieve the updated firmware 210 from the computer-readable medium 27 . Next, after the updated firmware device 23 retrieves the updated firmware 210 , the CPU 232 of the updated firmware device 23 can preprocess the updated firmware 210 and forward the updated firmware 210 to the MCU 235 of the memory module 233 . Therefore, the MCU 235 can update the firmware of the MCU 235 through the updated firmware 210 .

應特別瞭解,在一些實施例中,電腦可讀媒體可實施為非暫時性電子產品,例如唯讀記憶體(Read-Only Memory,ROM)、快閃記憶體、軟碟、硬碟、光碟(Compact Disc,CD)、數位光學光碟(Digital Versatile Disc,DVD)、藍光光碟(Blueray Disc,BD)或任何其他具有相同功能之儲存媒體。介面可為I/O埠或用於接收電腦可讀媒體之資料讀取設備。然而,此類描述不意欲限制本發明之硬體實現實施例。 It should be particularly understood that, in some embodiments, the computer-readable medium may be implemented as a non-transitory electronic product, such as read-only memory (ROM), flash memory, floppy disk, hard disk, optical disk ( Compact Disc, CD), Digital Versatile Disc (DVD), Blu-ray Disc (Blueray Disc, BD) or any other storage media with the same function. The interface can be an I/O port or a data reading device for receiving computer-readable media. However, such descriptions are not intended to limit hardware-implemented embodiments of the present invention.

參看圖3,其為說明根據本發明之一些實施例的主機板339上之記憶體模組333與CPU 332之間的連接之連接圖。記憶體模組333包括具有介面337之模組板334、安置於模組板334上之MCU 335及安置於模組板334上之複數個揮發性記憶體組件U1至U8。記憶體模組333經由介面337附接至主機板339,且MCU 335經由介面337與主機板339上之CPU 332交換資料。將在下文中進一步描述該等元件之間的交互作用。 3, which is a connection diagram illustrating the connection between the memory module 333 on the motherboard 339 and the CPU 332 according to some embodiments of the present invention. The memory module 333 includes a module board 334 having an interface 337 , an MCU 335 disposed on the module board 334 , and a plurality of volatile memory components U1 to U8 disposed on the module board 334 . The memory module 333 is attached to the motherboard 339 via the interface 337 , and the MCU 335 exchanges data with the CPU 332 on the motherboard 339 via the interface 337 . The interaction between these elements will be further described below.

在一些實施例中,當MCU 335進入開機載入程式模式時,MCU 335可進入更新過程。因此,MCU 335自CPU 332接收經更新韌體檔案310之複數個資料塊及複數個檢查和。複數個資料塊中之每一者與複數個檢查和之指定檢查和配對。接著,MCU 335檢查每一資料塊是否對應於指定檢查和。當每一資料塊對應於指定檢查和時,資料塊經驗證且作為資料塊之集合的經更新韌體檔案310因此經驗證。因此,MCU 335可藉 由經更新韌體檔案310更新並進入應用程式模式。另一方面,當有一個資料塊未對應於指定檢查和時,資料塊之傳輸可能不完整或資料塊在傳輸期間偶然更改或損壞。因此,MCU 335可保持在開機載入程式模式中且重新檢查每一資料塊是否對應於指定的資料塊。 In some embodiments, when the MCU 335 enters the boot loader mode, the MCU 335 may enter the update process. Therefore, the MCU 335 receives the plurality of data blocks and the plurality of checksums of the updated firmware file 310 from the CPU 332 . Each of the plurality of data blocks is paired with a designated checksum of the plurality of checksums. Next, the MCU 335 checks whether each data block corresponds to the specified checksum. When each data block corresponds to a specified checksum, the data block is verified and the updated firmware file 310, which is a collection of data blocks, is thus verified. Therefore, MCU 335 can borrow Update from the updated firmware file 310 and enter application mode. On the other hand, when there is a data block that does not correspond to the specified checksum, the transmission of the data block may be incomplete or the data block may be accidentally altered or corrupted during transmission. Therefore, the MCU 335 can remain in the boot loader mode and recheck whether each data block corresponds to the specified data block.

在一些實施例中,MCU 335可經由介面337及系統管理匯流排(System Management Bus,SMBus)或積體電路間(Inter-Integrated Circuit,IIC)匯流排330與主機板339上之CPU 332通信。在一些實施例中,記憶體模組333包括串列存在偵測(Serial Presence Detect,SPD)單元336,且SMBus或IIC匯流排330可用於SPD單元336與CPU 332通信。在一些實施例中,MCU 335共用通信通道,例如SPD單元336與CPU 332之間的SMBus或IIC匯流排330。由於SMBus或CII匯流排330將多個裝置或模組連接至主機板339,因此前述多個裝置或模組可經由SMBus或CII匯流排330同時發送或接收資料。然而,SMBus或CII匯流排330一次僅可允許一個裝置或模組將資料發送或接收至主機板339/自主機板339發送或接收資料,因此,故障或不完整資料傳輸可必然在SMBus或CII匯流排330與主機板339上之CPU 332之間發生。為了減少此傳輸困難,尤其在使用SMBus或CII匯流排330作為通信通道時,資料傳輸之精確性可藉由一次傳輸一對資料塊及指定檢查和來提高,如將於本發明之圖5至圖8中所論述。 In some embodiments, the MCU 335 can communicate with the CPU 332 on the motherboard 339 via the interface 337 and a System Management Bus (SMBus) or Inter-Integrated Circuit (IIC) bus 330 . In some embodiments, the memory module 333 includes a Serial Presence Detect (SPD) unit 336 , and an SMBus or IIC bus 330 can be used for the SPD unit 336 to communicate with the CPU 332 . In some embodiments, the MCUs 335 share a communication channel, such as an SMBus or IIC bus 330 between the SPD unit 336 and the CPU 332 . Since the SMBus or CII bus 330 connects multiple devices or modules to the motherboard 339 , the aforementioned multiple devices or modules can simultaneously send or receive data via the SMBus or CII bus 330 . However, the SMBus or CII bus 330 can only allow one device or module to send or receive data to/from the motherboard 339 at a time, so a faulty or incomplete data transfer may necessarily occur on the SMBus or CII Occurs between bus 330 and CPU 332 on motherboard 339 . In order to reduce this transmission difficulty, especially when using SMBus or CII bus 330 as a communication channel, the accuracy of data transmission can be improved by transmitting a pair of data blocks at a time and specifying a checksum, as shown in Figures 5 to 5 of the present invention. discussed in FIG. 8 .

應特別瞭解,在一些實施例中,揮發性記憶體組件U1至U8可包括DRAM之記憶體單元。介面337可為與周邊組件互連(Peripheral Component Interconnect,PCI)或周邊組件高速互連(Peripheral Component Interconnect Express,PCI-E、PCIe)相容之介面。然而,此 類描述不意欲限制本發明之硬體實現實施例。 It should be particularly appreciated that, in some embodiments, the volatile memory elements U1-U8 may comprise memory cells of DRAM. The interface 337 may be an interface compatible with Peripheral Component Interconnect (PCI) or Peripheral Component Interconnect Express (PCI-E, PCIe). However, this The class descriptions are not intended to limit hardware-implemented embodiments of the present invention.

參看圖4A,其為展示根據本發明之一些實施例的MCU 435中的功能區塊之方塊圖。MCU 435包括處理單元435P及記憶體單元435M。記憶體單元435M可包括開機載入程式區段4354。開機載入程式區段4354儲存電腦程式碼PG。將在下文中進一步描述該等元件之間的交互作用。 4A, which is a block diagram showing functional blocks in MCU 435 according to some embodiments of the present invention. The MCU 435 includes a processing unit 435P and a memory unit 435M. Memory unit 435M may include bootloader section 4354. The boot loader section 4354 stores the computer code PG. The interaction between these elements will be further described below.

在一些實施例中,當電腦程式碼PG由處理單元435P執行時,使得MCU 435根據複數個資料塊411及與該等資料塊相關聯的複數個檢查和412執行第一檢查機制PG1,以在韌體更新期間產生複數個第一檢查結果。換言之,當MCU 435處於開機載入程式模式下時,MCU 435根據資料塊411及檢查和412執行第一檢查機制PG1以產生第一檢查結果,且檢查第一檢查結果對於更新韌體而言是否全部正確。 In some embodiments, the computer code PG, when executed by the processing unit 435P, causes the MCU 435 to execute the first check mechanism PG1 according to the plurality of data blocks 411 and the plurality of checksums 412 associated with the data blocks to A plurality of first check results are generated during firmware update. In other words, when the MCU 435 is in the boot loader mode, the MCU 435 executes the first check mechanism PG1 according to the data block 411 and the checksum 412 to generate a first check result, and checks whether the first check result is useful for updating the firmware all right.

參看圖4B,其為展示根據本發明之一些實施例的MCU 435中的詳細功能區塊之方塊圖。記憶體單元435P可進一步包括應用程式區段4350及資料區段4352。應用程式區段4350儲存應用程式資料4350a。資料區段4352儲存應用程式資料4350a之資訊4352a及應用程式檢查和4352b。將在下文中進一步描述該等元件之間的交互作用。 4B, which is a block diagram showing detailed functional blocks in MCU 435 according to some embodiments of the present invention. Memory unit 435P may further include application section 4350 and data section 4352. Application section 4350 stores application data 4350a. Data section 4352 stores information 4352a and application checksum 4352b of application data 4350a. The interaction between these elements will be further described below.

在一些實施例中,應用程式資料4350a可包括MCU 435之應用程式韌體。應用程式資料4350a之資訊4352a可包括應用程式韌體之版本、應用程式韌體之大小及應用程式韌體之記憶體位址。應用程式檢查和4352b可為基於應用程式資料4350a而產生的檢查和資料。 In some embodiments, the application data 4350a may include the application firmware of the MCU 435. The information 4352a of the application data 4350a may include the version of the application firmware, the size of the application firmware, and the memory address of the application firmware. Application checksum 4352b may be the checksum data generated based on application data 4350a.

應注意,在一些實施例中,應用程式檢查和4352b之產生可藉由將應用程式資料4350a輸入檢查和函數來實施。詳言之,檢查和函 數可與散列函數、指紋、隨機化函數或密碼散列函數有關。因此,在將應用程式資料4350a輸入檢查和函數中時,對應於應用程式資料4350a之應用程式檢查和4352b導出為檢查和函數之輸出。因此,歸因於應用程式資料4350a與應用程式檢查和4352b之間的相關性,應用程式檢查和4352b可用於驗證應用程式資料4350a是否尚未偶然更改或損壞。 It should be noted that, in some embodiments, the generation of application checksum 4352b may be performed by entering application data 4350a into the checksum function. In detail, check and letter The number can be related to a hash function, a fingerprint, a randomization function, or a cryptographic hash function. Thus, when the application data 4350a is input into the checksum function, the application checksum 4352b corresponding to the application data 4350a is exported as the output of the checksum function. Thus, due to the correlation between application data 4350a and application checksum 4352b, application checksum 4352b can be used to verify that application data 4350a has not been accidentally altered or corrupted.

開機載入程式區段4354儲存用於MCU 435之電腦程式碼PG以在不同階段執行不同檢查機制。在一些實施例中,當MCU 435經激活時MCU 435處於初始化階段,且電腦程式碼PG由處理單元435P執行以用於根據應用程式資料4350a及應用程式檢查和4352執行第二檢查機制PG2,以產生第二檢查結果。特定言之,由於應用程式檢查和4352b為應用程式資料4350a之檢查和資料,因此處理單元435可檢查應用程式檢查和4352b是否對應於應用程式資料4350a,並產生第二檢查結果。 The boot loader section 4354 stores computer code PG for the MCU 435 to perform different checking mechanisms at different stages. In some embodiments, the MCU 435 is in the initialization phase when the MCU 435 is activated, and the computer code PG is executed by the processing unit 435P for executing the second check mechanism PG2 according to the application data 4350a and the application checksum 4352, to A second check result is generated. Specifically, since the application checksum 4352b is the checksum data of the application data 4350a, the processing unit 435 can check whether the application checksum 4352b corresponds to the application data 4350a, and generate a second check result.

在一些實施例中,當第二檢查結果正確時,亦即,當應用程式檢查和4352b對應於應用程式資料4350a時,處理單元435P控制MCU 435進入應用程式模式。因此,對應於應用程式資料4350a之應用程式檢查和4352b可指示應用程式資料4350a可能尚未偶然更改或損壞。因此,MCU 435可進入應用程式模式。在一些實施例中,當第二檢查結果不正確時,亦即,當應用程式檢查和4352b未對應於應用程式資料4350a時,處理單元435P控制MCU 435進入開機載入程式模式。因此,未能對應於應用程式資料4350a之應用程式檢查和4352b可指示應用程式資料4350a可能已偶然更改或損壞。因此,MCU 435可進入開機載入程式模式以更新應用程式資料4350a。 In some embodiments, when the second check result is correct, that is, when the application checksum 4352b corresponds to the application data 4350a, the processing unit 435P controls the MCU 435 to enter the application mode. Thus, application checksum 4352b corresponding to application data 4350a may indicate that application data 4350a may not have been accidentally altered or corrupted. Therefore, the MCU 435 can enter the application mode. In some embodiments, when the second check result is incorrect, that is, when the application checksum 4352b does not correspond to the application data 4350a, the processing unit 435P controls the MCU 435 to enter the boot loader mode. Thus, failure to correspond to application checksum 4352b of application data 4350a may indicate that application data 4350a may have been accidentally altered or corrupted. Therefore, the MCU 435 can enter the boot loader mode to update the application data 4350a.

在一些實施例中,當正經更新時,MCU 435處於更新階 段,且電腦程式碼PG由處理單元435P執行以根據資料塊411及指定給該等資料塊411之檢查和412執行第一檢查機制PG1,以產生第一檢查結果。特定言之,當MCU 435處於更新階段時,處理單元435P首先接收資料塊411及檢查和412。由於一個檢查和412指定給一個資料塊411,因此處理單元435P可檢查檢查和412是否分別對應於資料塊411,並產生第一檢查結果。 In some embodiments, the MCU 435 is in the update stage when it is being updated segment, and the computer code PG is executed by the processing unit 435P to execute the first check mechanism PG1 according to the data blocks 411 and the checksums 412 assigned to the data blocks 411 to generate a first check result. Specifically, when the MCU 435 is in the update phase, the processing unit 435P first receives the data block 411 and the checksum 412 . Since one checksum 412 is assigned to one data block 411, the processing unit 435P can check whether the checksum 412 corresponds to the data block 411, respectively, and generate a first check result.

在一些實施例中,當資料塊411及檢查和412之第一檢查結果正確時,亦即,當檢查和412分別對應於資料塊411時,處理單元435P控制MCU 435自開機載入程式模式進入應用程式模式。因此,對應於資料塊411之檢查和412可指示,用於更新MCU 435之資料塊411之傳輸已完成且所接收之資料塊411經驗證。因此,MCU 435可經更新且接著進入應用程式模式。 In some embodiments, when the first check result of the data block 411 and the checksum 412 is correct, that is, when the checksum 412 corresponds to the data block 411 respectively, the processing unit 435P controls the MCU 435 to enter from the boot loader mode application mode. Thus, the checksum 412 corresponding to the data block 411 may indicate that the transmission of the data block 411 used to update the MCU 435 has been completed and the received data block 411 has been verified. Thus, the MCU 435 can be updated and then enter application mode.

在一些實施例中,當第一檢查結果中之一者不正確時,亦即,當資料塊411之一個資料塊411a未對應於檢查和412中指定給資料塊411a的一個檢查和412a時,處理單元435P控制MCU 435保持在開機載入程式模式。因此,未能對應於指定檢查和412a之一個資料塊411a可指示,用於更新MCU 435之資料塊411a的傳輸中之一者不完整或資料塊411a可在傳輸期間偶然更改或損壞。因此,MCU 435可保持在開機載入程式模式。此外,MCU 435可重新擷取資料塊411a及檢查和412a以用於重新產生對應檢查結果,且基於前述操作再次檢查對應檢查結果之正確性。 In some embodiments, when one of the first check results is incorrect, that is, when a data block 411a of the data blocks 411 does not correspond to a checksum 412a in the checksum 412 assigned to the data block 411a, The processing unit 435P controls the MCU 435 to remain in the boot loader mode. Thus, failure to correspond to a data block 411a of the specified checksum 412a may indicate that one of the transmissions for updating the data block 411a of the MCU 435 is incomplete or that the data block 411a may be accidentally altered or corrupted during the transmission. Therefore, the MCU 435 can remain in the boot loader mode. In addition, the MCU 435 may re-fetch the data block 411a and the checksum 412a for regenerating the corresponding check result, and recheck the correctness of the corresponding check result based on the aforementioned operations.

本發明之一些實施例包括一種用於韌體初始化及更新之方法,且其流程圖展示於圖5中。一些實施例之方法用於MCU(例如,前述 實施例之MCU)中,且MCU經由通道(例如,前述實施例之SMBus或IIC匯流排)與外部CPU(例如,前述實施例之主機板之CPU)通信。方法之詳細操作如下。 Some embodiments of the present invention include a method for firmware initialization and update, and a flowchart of which is shown in FIG. 5 . The methods of some embodiments are used in MCUs (eg, the aforementioned The MCU of the embodiment), and the MCU communicates with an external CPU (eg, the CPU of the motherboard of the foregoing embodiment) through a channel (eg, the SMBus or the IIC bus of the foregoing embodiment). The detailed operation of the method is as follows.

MCU執行操作S501以根據儲存於MCU之應用程式區段中之應用程式資料及儲存於MCU之資料區段中之應用程式檢查和執行檢查機制以產生檢查結果。在此實施例中,應用程式檢查和應對應於應用程式資料。MCU執行操作S502以檢查該檢查結果是否正確。換言之,在操作S502中,MCU檢查應用程式檢查和是否對應於應用程式資料。 The MCU performs operation S501 to check and execute a check mechanism according to the application data stored in the application section of the MCU and the application program stored in the data section of the MCU to generate a check result. In this embodiment, the application checksum should correspond to the application data. The MCU performs operation S502 to check whether the check result is correct. In other words, in operation S502, the MCU checks whether the application checksum corresponds to the application data.

在一些實施例中,當檢查結果正確時(亦即,當該對應用程式檢查和及應用程式資料對應時),MCU執行操作S503以進入應用程式模式。在一些實施例中,當檢查結果不正確時(亦即,當該對應用程式檢查和及應用程式資料不對應時),MCU執行操作S504以進入開機載入程式模式。MCU執行操作S505以基於前述實施例執行韌體更新。 In some embodiments, when the check result is correct (ie, when the pair of application checksums correspond to application data), the MCU performs operation S503 to enter the application mode. In some embodiments, when the check result is incorrect (ie, when the pair of application checksums and application data do not correspond), the MCU performs operation S504 to enter the boot loader mode. The MCU performs operation S505 to perform firmware update based on the foregoing embodiment.

本發明之一些實施例包括一種用於韌體初始化及更新之方法,且其流程圖展示於圖7中。一些實施例之方法用於MCU(例如,前述實施例之MCU)中,且MCU經由通道(例如,前述實施例之SMBus及IIC匯流排)與外部CPU(例如,前述實施例之主機板之CPU)通信。方法之詳細操作如下。 Some embodiments of the present invention include a method for firmware initialization and update, and a flowchart of which is shown in FIG. 7 . The methods of some embodiments are used in an MCU (eg, the MCU of the aforementioned embodiments), and the MCU communicates with an external CPU (eg, the CPU of the motherboard of the aforementioned embodiments) via channels (eg, the SMBus and IIC bus of the aforementioned embodiments) ) communication. The detailed operation of the method is as follows.

在藉由經更新韌體檔案更新MCU之前,更新韌體檔案可由外部CPU處理以導出資料塊及檢查和對,如圖6中所示。隨後,MCU執行操作S701以進入開機載入程式模式。MCU執行操作S702以經由通道接收經更新韌體檔案之一對資料塊i及檢查和i。在一些實施例中,經更新韌體檔案包括N個數目之資料塊及與N個數目之資料塊相關聯的N個數目之檢 查和,且檢查和i指定給資料塊i,其中i等於1至N。MCU執行操作S703以對該對資料塊i及檢查和i執行檢查機制,以產生檢查結果i。MCU執行操作S704以判定檢查結果i是否正確。換言之,在操作S704中,MCU檢查檢查和i是否對應於資料塊i。 Before updating the MCU with the updated firmware file, the updated firmware file can be processed by the external CPU to derive data blocks and checksum pairs, as shown in FIG. 6 . Subsequently, the MCU performs operation S701 to enter the boot loader mode. The MCU performs operation S702 to receive a pair of data block i and a checksum i of one of the updated firmware files through the channel. In some embodiments, the updated firmware file includes N number of data blocks and N number of checks associated with the N number of data blocks Checksum, and checksum i is assigned to block i, where i equals 1 to N. The MCU performs operation S703 to perform a check mechanism on the pair of data blocks i and checksum i to generate a check result i. The MCU performs operation S704 to determine whether the check result i is correct. In other words, in operation S704, the MCU checks whether the checksum i corresponds to the data block i.

在一些實施例中,當檢查結果i正確時(亦即,當該對資料塊i及檢查和i對應時),MCU執行操作S705以判定資料塊i是否為最末資料塊。若資料塊i不為最末資料塊,則MCU執行操作S706以將值1添加至i,且對MCU執行操作S702以接收下一對資料塊及指定檢查和並執行後續操作。若資料塊i經判定為最末資料塊,則MCU執行操作S707以藉由經更新韌體檔案更新MCU之韌體,該經更新韌體檔案可為該等對資料塊及指定檢查和之集合。MCU執行操作S708以在MCU之韌體更新之後進入應用程式模式。 In some embodiments, when the check result i is correct (ie, when the pair of data block i and the check sum i correspond), the MCU performs operation S705 to determine whether the data block i is the last data block. If the data block i is not the last data block, the MCU performs operation S706 to add a value of 1 to i, and performs operation S702 on the MCU to receive the next pair of data blocks and the specified checksum and perform subsequent operations. If the data block i is determined to be the last data block, the MCU performs operation S707 to update the firmware of the MCU with the updated firmware file, which may be a set of the paired data blocks and the specified checksum . The MCU performs operation S708 to enter the application mode after the firmware of the MCU is updated.

在一些實施例中,當檢查結果i在操作S704中經判定為不正確時(亦即,當該對資料塊i及檢查和i不對應時),直接對MCU執行操作S702以再次接收該對資料塊i及檢查和i並執行後續操作。 In some embodiments, when the check result i is determined to be incorrect in operation S704 (that is, when the pair of data block i and checksum i do not correspond), operation S702 is directly performed on the MCU to receive the pair again Block i and check sum i and perform subsequent operations.

在一些實施例中,可指示MCU在更新韌體之前進入開機載入程式模式。詳言之,當外部CPU經由主機板之通信模組自經更新韌體提供端擷取經更新韌體檔案時,外部CPU可指示MCU進入開機載入程式模式並準備更新韌體。 In some embodiments, the MCU may be instructed to enter boot loader mode before updating the firmware. Specifically, when the external CPU retrieves the updated firmware file from the updated firmware provider via the communication module of the motherboard, the external CPU can instruct the MCU to enter the boot loader mode and prepare to update the firmware.

在一些實施例中,當檢查結果i在操作S704中經判定為不正確時,視情況MCU執行操作S709(由虛線表示)以通知外部CPU重新發送經更新韌體檔案之資料塊i及檢查和i。 In some embodiments, when the check result i is determined to be incorrect in operation S704, the MCU optionally performs operation S709 (represented by a dotted line) to notify the external CPU to resend the data block i of the updated firmware file and the checksum i.

本發明之一些實施例包括一種用於韌體初始化及更新之方 法,且其流程圖展示於圖8中。一些實施例之方法用於MCU(例如,前述實施例之MCU)中,且MCU經由通道(例如,前述實施例之SMBus及IIC匯流排)與外部CPU(例如,前述實施例之主機板之CPU)通信。方法之詳細操作如下。 Some embodiments of the present invention include a method for firmware initialization and update method, and its flowchart is shown in FIG. 8 . The methods of some embodiments are used in an MCU (eg, the MCU of the aforementioned embodiments), and the MCU communicates with an external CPU (eg, the CPU of the motherboard of the aforementioned embodiments) via channels (eg, the SMBus and IIC bus of the aforementioned embodiments) ) communication. The detailed operation of the method is as follows.

類似地,在藉由經更新韌體檔案更新MCU之前,更新韌體檔案可由外部CPU處理以導出資料塊及檢查和對,如圖8中所示。隨後,MCU執行操作S801以進入開機載入程式模式。MCU執行操作S802以經由通道接收經更新韌體檔案之一對資料塊i及檢查和i。在一些實施例中,經更新韌體檔案包括N個數目之資料塊及與N個數目之資料塊相關聯的N個數目之檢查和,且檢查和i指定給資料塊i,其中i等於1至N。MCU執行操作S803以對該對資料塊i及檢查和i執行檢查機制,以產生檢查結果i。MCU執行操作S804以判定檢查結果i是否正確。換言之,在操作S804中,MCU檢查檢查和i是否對應於資料塊i。 Similarly, before updating the MCU with the updated firmware file, the updated firmware file can be processed by the external CPU to derive data blocks and checksum pairs, as shown in FIG. 8 . Subsequently, the MCU performs operation S801 to enter the boot loader mode. The MCU performs operation S802 to receive a pair of data block i and a checksum i of one of the updated firmware files through the channel. In some embodiments, the updated firmware file includes N number of data blocks and N number of checksums associated with the N number of data blocks, and the checksum i is assigned to data block i, where i equals 1 to N. The MCU performs operation S803 to perform a check mechanism on the pair of data blocks i and checksum i to generate a check result i. The MCU performs operation S804 to determine whether the check result i is correct. In other words, in operation S804, the MCU checks whether the checksum i corresponds to the data block i.

在一些實施例中,當檢查結果i正確時(亦即,當該對資料塊i及檢查和i對應時),MCU執行操作S805以判定資料塊i是否為最末資料塊。若資料塊i不為最末資料塊,則MCU執行操作S806以將值1添加至i,且對MCU執行操作S802以接收下一對資料塊及指定檢查和並執行後續操作。 In some embodiments, when the check result i is correct (ie, when the pair of data block i and the check sum i correspond), the MCU performs operation S805 to determine whether the data block i is the last data block. If the data block i is not the last data block, the MCU performs operation S806 to add a value of 1 to i, and performs operation S802 for the MCU to receive the next pair of data blocks and the specified checksum and perform subsequent operations.

在一些實施例中,若資料塊i為最末資料塊,MCU執行操作S807以對經更新韌體檔案執行總檢查機制,以產生總檢查結果。MCU執行S808以判定總檢查結果是否正確。換言之,在操作S808中,MCU檢查總檢查和是否對應於經更新韌體檔案。 In some embodiments, if the data block i is the last data block, the MCU performs operation S807 to perform a general check mechanism on the updated firmware file to generate a general check result. The MCU executes S808 to determine whether the total check result is correct. In other words, in operation S808, the MCU checks whether the total checksum corresponds to the updated firmware file.

在一些實施例中,當總檢查結果正確時(亦即,當該對經更 新韌體檔案及總檢查和對應時),MCU執行操作S809以藉由經更新韌體檔案更新MCU之韌體,該經更新韌體檔案為該等對資料塊及指定檢查和之集合。MCU執行操作S810以在MCU之韌體更新之後進入應用程式模式。 In some embodiments, when the total check result is correct (that is, when the pair is updated When the new firmware file and the total checksum are corresponding), the MCU executes operation S809 to update the firmware of the MCU by the updated firmware file, which is a set of the paired data blocks and the specified checksum. The MCU performs operation S810 to enter the application mode after the firmware of the MCU is updated.

在一些實施例中,當總檢查結果不正確時(亦即,當經更新韌體檔案及總檢查和不對應時),MCU執行操作S811以將i值重設為1,且對MCU執行操作S802以接收第一對資料塊及指定檢查和並執行後續操作。 In some embodiments, when the total check result is incorrect (that is, when the updated firmware file and the total checksum do not correspond), the MCU performs operation S811 to reset the i value to 1, and performs operations on the MCU S802 to receive the first pair of data blocks and the specified checksum and perform subsequent operations.

在一些實施例中,當檢查結果i在操作S804中經判定為不正確時(亦即,當該對資料塊i及檢查和i不對應時),直接對MCU執行操作S802以再次接收該對資料塊i及指定檢查和i並執行後續操作。 In some embodiments, when the check result i is determined to be incorrect in operation S804 (that is, when the pair of data block i and checksum i do not correspond), operation S802 is directly performed on the MCU to receive the pair again Block i and specify checksum i and perform subsequent operations.

參看圖9,其為展示記憶體模組之比較實施例。記憶體模組包括MCU 903、插座、跳線器或用於外部連接之連接器901,以及一些記憶體U1、U2、U3、U4、U5、U6、U7及U8。 Referring to FIG. 9, a comparative example of a memory module is shown. The memory modules include MCU 903, sockets, jumpers or connectors 901 for external connection, and some memories U1, U2, U3, U4, U5, U6, U7 and U8.

大體而言,若記憶體模組歸因於MCU 903中發現之任何物理或硬體損害而出故障,則將舊MCU替換為另一MCU(例如,圖9中未展示之新的或良好MCU)可為解決此問題的解決方案中之一者。 In general, if a memory module fails due to any physical or hardware damage found in MCU 903, the old MCU is replaced with another MCU (eg, a new or good MCU not shown in Figure 9). ) can be one of the solutions to this problem.

即使記憶體模組歸因於軟體或韌體問題而出故障,具有經更新或相對較新版本之軟體或韌體的另一MCU亦可用於替換MCU 903。然而,插座、跳線器或連接器901可為解決前述問題提供一種選項。舉例而言,連接器901可接收信號或命令以更新實施於MCU 903中之軟體或韌體。在更新之前,記憶體模組駐存之電子裝置(例如,個人電腦、膝上型電腦、行動電話或其類似者)必須關閉或斷電以取出或拔出記憶體模組。隨後,記憶體模組必須發送至服務提供端以現場更新。關閉電子裝置及運 送記憶體模組可對使用者造成不便。此外,記憶體模組(例如,連接器901與MCU 903之間的電連接之電路佈局)上佔據相對較大空間或面積的連接器901可能會不利地影響記憶體模組之小型化。 Another MCU with an updated or relatively new version of software or firmware can be used to replace MCU 903 even if the memory module fails due to software or firmware issues. However, receptacles, jumpers or connectors 901 may provide an option for addressing the aforementioned problems. For example, connector 901 may receive signals or commands to update software or firmware implemented in MCU 903 . Before updating, the electronic device (eg, personal computer, laptop, mobile phone, or the like) in which the memory module resides must be turned off or powered off to remove or unplug the memory module. Subsequently, the memory modules must be sent to the service provider for on-site updates. Turn off electronic devices and Sending the memory module may cause inconvenience to the user. In addition, the connector 901 occupying a relatively large space or area on the memory module (eg, the circuit layout of the electrical connection between the connector 901 and the MCU 903 ) may adversely affect the miniaturization of the memory module.

10:網路連接 10: Internet connection

11:更新韌體提供端 11: Update the firmware provider

110:經更新韌體 110:Updated firmware

130:匯流排 130: Busbar

131:通信模組 131: Communication module

132:中央處理單元 132: Central Processing Unit

133:記憶體模組 133: Memory module

135:MCU 135:MCU

139:主機板 139: Motherboard

Claims (16)

一種用於一記憶體模組之微控制器單元(MCU),其包含:一處理單元;及一記憶體單元,其中該記憶體單元經組態以包含:一應用程式區段,經組態以儲存應用程式資料;及一開機載入程式區段,經組態以儲存一電腦程式碼,其中該電腦程式碼在由該處理單元執行時,使該MCU:自一外部中央處理單元(CPU)接收複數個資料塊及複數個檢查和;根據該複數個資料塊及與該等資料塊相關聯的該複數個檢查和執行一第一檢查機制,以在一韌體更新階段產生複數個第一檢查結果;及當該複數個第一檢查結果正確時,藉由使用儲存於該應用程式區段中之該應用程式資料而自一開機載入程式模式進入一應用程式模式;其中該外部CPU與該記憶體模組安置於同一主機板,且該MCU經由該記憶體模組之一模組板之一介面,自該外部CPU接收該複數個資料塊及該複數個檢查和。 A microcontroller unit (MCU) for a memory module, comprising: a processing unit; and a memory unit, wherein the memory unit is configured to include: an application section configured to store application data; and a boot loader section configured to store a computer code that, when executed by the processing unit, causes the MCU to: from an external central processing unit (CPU) ) receives a plurality of data blocks and a plurality of checksums; performs a first check mechanism according to the plurality of data blocks and the plurality of checksums associated with the data blocks to generate a plurality of first checksums in a firmware update stage a check result; and when the plurality of first check results are correct, entering an application mode from a boot loader mode by using the application data stored in the application section; wherein the external CPU The MCU is disposed on the same motherboard as the memory module, and the MCU receives the plurality of data blocks and the plurality of checksums from the external CPU through an interface of a module board of the memory module. 如請求項1之MCU,其中該記憶體單元進一步經組態以包括:一資料區段,經組態以儲存一應用程式檢查和及與該應用程式資料相關聯的資訊; 其中當該電腦程式碼由該處理單元執行時,進一步使該MCU:根據該應用程式區段中之該應用程式資料及該資料區段中之該應用程式檢查和執行一第二檢查機制,以在一初始化階段產生一第二檢查結果。 The MCU of claim 1, wherein the memory unit is further configured to include: a data section configured to store an application checksum and information associated with the application data; When the computer code is executed by the processing unit, the MCU is further made to: check and execute a second check mechanism according to the application data in the application section and the application in the data section, so as to A second check result is generated in an initialization phase. 如請求項2之MCU,其中該資料區段中之該應用程式資料之該資訊包含該應用程式資料在該應用程式區段中的一大小或一位址。 The MCU of claim 2, wherein the information of the application data in the data section includes a size or an address of the application data in the application section. 如請求項2之MCU,其中根據該應用程式區段中之該應用程式資料及該資料區段中之該應用程式檢查和執行該第二檢查機制以在該初始化階段產生該第二檢查結果進一步包含:當該第二檢查結果正確時,進入一應用程式模式;以及當該第二檢查結果不正確時,進入一開機載入程式模式。 The MCU of claim 2, wherein the second check mechanism is checked and executed according to the application data in the application section and the application in the data section to generate the second check result in the initialization phase further It includes: entering an application program mode when the second check result is correct; and entering a boot loader mode when the second check result is incorrect. 如請求項1之MCU,其中進一步使該MCU執行:當該複數個第一檢查結果中之一者不正確時,保持在該開機載入程式模式。 The MCU of claim 1, wherein the MCU is further caused to execute: when one of the plurality of first check results is incorrect, remain in the boot loader mode. 一種記憶體模組,其包含:一模組板,具有一介面;複數個揮發性記憶體組件,安置於該模組板上且經由該介面電性連接至一外部中央處理單元(CPU);及一微控制器單元(MCU),安置於該模組板上,經由該介面與該外部 CPU交換資料,其中該外部CPU與該記憶體模組安置於同一主機板,且該MCU經組態以:在一開機載入程式模式下自該外部CPU接收複數個資料塊及複數個檢查和,該複數個資料塊中之每一者與來自該複數個檢查和之一指定檢查和配對,其中該複數個資料塊及該複數個檢查和由該外部CPU自一經更新韌體檔案中擷取;檢查該複數個資料塊中之每一者是否對應於該指定檢查和;及當該複數個資料塊中之每一者對應於該指定檢查和時,藉由使用儲存於一應用程式區段中之應用程式資料而自該開機載入程式模式進入一應用程式模式。 A memory module, comprising: a module board with an interface; a plurality of volatile memory components arranged on the module board and electrically connected to an external central processing unit (CPU) through the interface; and a microcontroller unit (MCU) arranged on the module board to communicate with the external via the interface CPUs exchange data, wherein the external CPU and the memory module are located on the same motherboard, and the MCU is configured to: receive blocks of data and checksums from the external CPU in a bootloader mode , each of the plurality of data blocks is paired with a specified checksum from the plurality of checksums, wherein the plurality of data blocks and the plurality of checksums are retrieved by the external CPU from an updated firmware file ; check whether each of the plurality of data blocks corresponds to the specified checksum; and when each of the plurality of data blocks corresponds to the specified checksum, store in an application section by using to enter an application mode from the boot loader mode. 如請求項6之記憶體模組,其中該MCU經組態以經由一系統管理匯流排(SMBus)或一積體電路間匯流排(IIC)與該外部CPU通信。 The memory module of claim 6, wherein the MCU is configured to communicate with the external CPU via a system management bus (SMBus) or an inter-integrated circuit bus (IIC). 如請求項7之記憶體模組,進一步包含經由該SMBus或該IIC與該外部CPU通信的一串列存在偵測(SPD)單元。 The memory module of claim 7, further comprising a serial presence detection (SPD) unit in communication with the external CPU via the SMBus or the IIC. 一種用於更新一記憶體模組之微控制器單元(MCU)之一韌體的方法,該MCU經由該記憶體模組之一模組板之一介面與一外部中央處理單元(CPU)以通信方式耦接,該方法包含:藉由該外部CPU接收一經更新韌體檔案;藉由該外部CPU執行該經更新韌體檔案以獲取複數個資料塊及與該複數個資料塊相關聯的複數個檢查和; 藉由該MCU經由該記憶體模組之該模組板之該介面,自該外部CPU接收該複數個資料塊中之一第一資料塊及該複數個檢查和中指定給該第一資料塊的一第一檢查和,其中該外部CPU與該記憶體模組安置於同一主機板;藉由該MCU根據該第一資料塊及該第一檢查和執行一檢查機制,以產生一第一檢查結果;藉由該MCU根據該經更新韌體檔案及一韌體檢查和執行一總檢查機制,以產生一總檢查結果;當該總檢查結果指示該經更新韌體檔案對應於該韌體檢查和時,藉由該MCU經由該經更新韌體檔案更新該MCU之該韌體;及藉由該MCU在更新該韌體之後利用儲存於一應用程式區段中之應用程式資料而進入一應用程式模式。 A method for updating a firmware of a microcontroller unit (MCU) of a memory module through an interface of a module board of the memory module and an external central processing unit (CPU) to The method includes: receiving an updated firmware file by the external CPU; executing the updated firmware file by the external CPU to obtain a plurality of data blocks and a plurality of data blocks associated with the plurality of data blocks a checksum; Receiving, by the MCU through the interface of the module board of the memory module, a first data block of the plurality of data blocks and the plurality of checksums assigned to the first data block from the external CPU a first checksum, wherein the external CPU and the memory module are arranged on the same motherboard; the MCU executes a check mechanism according to the first data block and the first checksum to generate a first check result; by the MCU according to the updated firmware file and a firmware check and executing a general check mechanism to generate a general check result; when the general check result indicates that the updated firmware file corresponds to the firmware check When and, update the firmware of the MCU through the updated firmware file by the MCU; and enter an application by the MCU using application data stored in an application section after updating the firmware program mode. 如請求項9之方法,其進一步包含:藉由該MCU根據來自該外部CPU之一指令進入一開機載入程式模式;其中藉由該MCU在該開機載入程式模式下接收該第一資料塊及該第一檢查和。 The method of claim 9, further comprising: entering, by the MCU, a boot loader mode according to an instruction from the external CPU; wherein the first data block is received by the MCU in the boot loader mode and the first checksum. 如請求項9之方法,其進一步包含:當該第一檢查結果指示該第一資料塊對應於該第一檢查和時,藉由該MCU接收該複數個資料塊中之一第二資料塊及該複數個檢查和中指定給該第二資料塊之一第二檢查和;以及 根據該第二資料塊及該第二檢查和執行該檢查機制,以產生一第二檢查結果。 The method of claim 9, further comprising: when the first check result indicates that the first data block corresponds to the first checksum, receiving, by the MCU, a second data block of the plurality of data blocks and a second checksum of the plurality of checksums assigned to one of the second data blocks; and The checking mechanism is executed according to the second data block and the second checksum to generate a second check result. 如請求項9之方法,其進一步包含:當該第一檢查結果指示該第一資料塊未對應於該第一檢查和時,藉由該MCU接收該複數個資料塊中之該第一資料塊及該複數個檢查和中之該第一檢查和;以及藉由該MCU根據該第一資料塊及該第一檢查和執行該檢查機制,以重新產生該第一檢查結果。 The method of claim 9, further comprising: receiving, by the MCU, the first data block of the plurality of data blocks when the first check result indicates that the first data block does not correspond to the first checksum and the first checksum among the plurality of checksums; and the MCU executes the check mechanism according to the first data block and the first checksum to regenerate the first check result. 如請求項12之方法,其中當該第一檢查結果指示該第一資料塊未對應於該第一檢查和時接收該第一資料塊及該第一檢查和進一步包含:當該第一檢查結果指示該第一資料塊未對應於該第一檢查和時,藉由該MCU通知該外部CPU重新發送該第一資料塊及指定給該第一資料塊之該第一檢查和;以及藉由該MCU接收該第一資料塊及該第一檢查和。 The method of claim 12, wherein receiving the first data block and the first checksum when the first check result indicates that the first data block does not correspond to the first checksum further comprises: when the first check result when indicating that the first data block does not correspond to the first checksum, by the MCU notifying the external CPU to resend the first data block and the first checksum assigned to the first data block; and by the The MCU receives the first data block and the first checksum. 如請求項9之方法,其進一步包含:藉由該MCU接收該複數個資料塊中之一最末資料塊及該複數個檢查和中指定給該最末資料塊的一最末檢查和;以及根據該最末資料塊及該最末檢查和執行該檢查機制,以產生一最末檢查結果;當該最末檢查結果指示該最末資料塊對應於該最末檢查和時,藉由 該MCU根據該經更新韌體檔案及該韌體檢查和執行該總檢查機制,以產生該總檢查結果。 The method of claim 9, further comprising: receiving, by the MCU, a final data block of the plurality of data blocks and a final checksum of the plurality of checksums assigned to the final data block; and The check mechanism is executed according to the last data block and the last checksum to generate a last check result; when the last check result indicates that the last data block corresponds to the last checksum, by The MCU checks and executes the general check mechanism according to the updated firmware file and the firmware to generate the general check result. 如請求項9之方法,其中該通道包含一系統管理匯流排(SMBus)或一積體電路間匯流排(IIC)。 The method of claim 9, wherein the channel comprises a system management bus (SMBus) or an inter-integrated circuit bus (IIC). 一種用於初始化如請求項2之微控制器單元(MCU)之方法,該MCU經由該記憶體模組之該模組板之該介面與一外部中央處理單元(CPU)以通信方式耦接,該方法包含:藉由該MCU根據該應用程式區段中之該應用程式資料及該資料區段中之該應用程式檢查和執行該第二檢查機制,以產生該第二檢查結果;當該第二檢查結果正確時,藉由該MCU進入一應用程式模式;當該第二檢查結果不正確時,藉由該MCU進入一開機載入程式模式;以及當該MCU處於該開機載入程式模式時,執行如請求項9之方法。A method for initializing a microcontroller unit (MCU) as claimed in claim 2, the MCU being communicatively coupled with an external central processing unit (CPU) via the interface of the module board of the memory module, The method includes: by the MCU checking and executing the second checking mechanism according to the application data in the application section and the application in the data section to generate the second check result; when the first check When the second check result is correct, the MCU enters an application mode; when the second check result is incorrect, the MCU enters a boot loader mode; and when the MCU is in the boot loader mode , execute the method as in claim 9.
TW108111648A 2019-04-02 2019-04-02 Microcontroller, memory module, and method for updating firmware of the microcontroller TWI768198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108111648A TWI768198B (en) 2019-04-02 2019-04-02 Microcontroller, memory module, and method for updating firmware of the microcontroller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108111648A TWI768198B (en) 2019-04-02 2019-04-02 Microcontroller, memory module, and method for updating firmware of the microcontroller

Publications (2)

Publication Number Publication Date
TW202038091A TW202038091A (en) 2020-10-16
TWI768198B true TWI768198B (en) 2022-06-21

Family

ID=74091292

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108111648A TWI768198B (en) 2019-04-02 2019-04-02 Microcontroller, memory module, and method for updating firmware of the microcontroller

Country Status (1)

Country Link
TW (1) TWI768198B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138267A1 (en) * 2003-12-23 2005-06-23 Bains Kuljit S. Integral memory buffer and serial presence detect capability for fully-buffered memory modules
TWI251170B (en) * 2001-10-12 2006-03-11 Phoenix Tech Ltd Apparatus and method for updating firmware
US20080086652A1 (en) * 2006-10-10 2008-04-10 Ken Krieger Updating a power supply microcontroller
US20120117365A1 (en) * 2010-11-08 2012-05-10 Delta Electronics (Thailand) Public Co., Ltd. Firmware update method and system for micro-controller unit in power supply unit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI251170B (en) * 2001-10-12 2006-03-11 Phoenix Tech Ltd Apparatus and method for updating firmware
US20050138267A1 (en) * 2003-12-23 2005-06-23 Bains Kuljit S. Integral memory buffer and serial presence detect capability for fully-buffered memory modules
US20080086652A1 (en) * 2006-10-10 2008-04-10 Ken Krieger Updating a power supply microcontroller
TW200838084A (en) * 2006-10-10 2008-09-16 Exaflop Llc Updating a power supply microcontroller
US20120117365A1 (en) * 2010-11-08 2012-05-10 Delta Electronics (Thailand) Public Co., Ltd. Firmware update method and system for micro-controller unit in power supply unit

Also Published As

Publication number Publication date
TW202038091A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
JP6244042B2 (en) Method, apparatus, and computer program product for transitioning to USB Type-C accessory device docking mode
US8943302B2 (en) Method of flashing bios using service processor and computer system using the same
KR20130043662A (en) Detection of cable connections for electronic devices
US20100035461A1 (en) System and Method for Detecting Module Presence in an Information Handling System
TWI608357B (en) Sharing bus port by multiple bus hosts and a sharing method
US20170286097A1 (en) Method to prevent operating system digital product key activation failures
DE102017121465A1 (en) DATA PROTOCOL FOR MANAGING PERIPHERAL DEVICES
TW201621657A (en) Electronic device
US10860512B2 (en) Processor interconnect link training system
US8438374B2 (en) Computer system and control method of the same
JP2019175424A (en) Method and system for checking error of cable
TW202002684A (en) Network system and authenticating method
CN113656339A (en) NVME hot plug processing method, BMC, device, equipment and medium
TWI768198B (en) Microcontroller, memory module, and method for updating firmware of the microcontroller
US7597592B2 (en) Automatic configuration of an interface to a host or client
US20210011806A1 (en) Memory device failure recovery system
US11036665B2 (en) Electronic system capable of detecting number of hot plug insertion and extraction cycles
CN116539992A (en) Storage device in-place stable state detection device, method, logic module and medium
KR20230161375A (en) Systems and methods for expandable memory error handling
US20080019357A1 (en) Apparatus and Method for Determining Device Presence and Type
CN111766797A (en) Microcontroller, memory module and method for updating firmware of microcontroller
US9940289B2 (en) Preventing access to misplugged devices by a service processor
TWI735869B (en) Storage control device and control method thereof
US10489334B2 (en) Server system and method for detecting transmission mode of server system
US20170270021A1 (en) Repair of failed firmware through an unmodified dual-role communication port