TW200923652A - Signal-lock MCU circuit and signal-lock method - Google Patents

Signal-lock MCU circuit and signal-lock method Download PDF

Info

Publication number
TW200923652A
TW200923652A TW096144197A TW96144197A TW200923652A TW 200923652 A TW200923652 A TW 200923652A TW 096144197 A TW096144197 A TW 096144197A TW 96144197 A TW96144197 A TW 96144197A TW 200923652 A TW200923652 A TW 200923652A
Authority
TW
Taiwan
Prior art keywords
code
lock
microcontroller
key
input
Prior art date
Application number
TW096144197A
Other languages
Chinese (zh)
Inventor
David Chen
Chun-Ku Lin
Original Assignee
Holtek Semiconductor Inc
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 Holtek Semiconductor Inc filed Critical Holtek Semiconductor Inc
Priority to TW096144197A priority Critical patent/TW200923652A/en
Priority to US12/072,556 priority patent/US20090129598A1/en
Publication of TW200923652A publication Critical patent/TW200923652A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Lock And Its Accessories (AREA)
  • Storage Device Security (AREA)

Abstract

A microprocessor locking circuit with a locking function is provided. The microprocessor locking circuit is used in a microprocessor. The microprocessor includes at least one program code, and the microprocessor locking circuit includes a predetermined key. The microprocessor locking circuit receives an input key and compares the predetermined key with the input key after a reset period starts. If the predetermined key is identical to the input key, the program code is unlocked. If the predetermined key is different from the input key, the program code is locked.

Description

200923652 九、發明說明: 【發明所屬之技術領域】 本發明是指一種具鎖碼功能的微控制器鎖碼電路 及鎖碼方法,特別是指具有比對一預設金鑰及一輸入 金鑰功能的微控制器鎖碼電路及鎖碼方法。 【先前技術】 微控制器(Micro Controller Unit, MCU)目前在電 子產業上的應用非常廣泛,微控制器的主要組成架構 是:中央處理器、記憶體、輸出輸入單元、中斷器、振 盪器以及計時器。 微控制器根據不同的功能可區分為:200923652 IX. Description of the Invention: [Technical Field] The present invention relates to a microcontroller lock code circuit and a lock code method with a lock code function, in particular to having a preset key and an input key Functional microcontroller lock code circuit and lock code method. [Prior Art] Micro Controller Unit (MCU) is widely used in the electronics industry. The main components of a microcontroller are: central processing unit, memory, output input unit, interrupter, oscillator, and Timer. Microcontrollers can be distinguished according to different functions:

1. 唯讀微控制器(Read-only memory MCU, ROM MCU) 2. 單次寫入微控制器(One Time Programming MCU, OTP MCU) 3. 多次寫入微控制器(Multi-Times1. Read-only memory MCU (ROM MCU) 2. One Time Programming MCU (OTP MCU) 3. Multiple writes to the microcontroller (Multi-Times)

Programming MCU, MTP MCU)(又稱 Flash MCU) 請參考第1圖,第1圖為習知OTP MCU的操作 時序圖,其中,OTPMCU包括一燒錄腳(圖中未示), 其中燒錄腳是用以接收一燒錄腳電壓(圖中未示),OTP MCU在利用燒錄器燒錄時,會先將燒錄腳電壓由零伏 特升高到空白測試電壓值(本實施例的空白測試電壓 200923652 值為5V,其他實施例中可以為其他伏特數)進行約 100〜300毫秒(本實施例中為100〜300毫秒,其他實施 例可以為其他秒數)之空白檢測(blank check)以確定 OTP MCU内部的值是否為預設值(default value),若 OTP MCU内部的值為預設值,則表示OTP MCU為空 白而可以進行燒錄。在本實施例中預設值為0,在其 他實施例中,預設值為1、ff·.··等。 在OTP MCU通過空白測試後,燒錄腳電壓由空 白測試電壓值降至0V的低點並保持0V若干毫秒(本 實施例中是1〜4毫秒,其他實施例可以為其他秒數), 之後燒錄腳電壓由0V再提高到燒錄電壓值(本實施例 中,燒錄電壓值為12.5V,但在其他實施例中,燒錄 電壓值可能不同)。在燒錄腳電壓值由空白測試電壓值 開始下降起一直到燒錄腳電壓到達燒錄電壓值的期 間,稱為重置期間(Reset Period)。 OTP MCU在重置期間一開始,便開始將選項 (Option)的資料載入到OTPMCU中。所謂的選項是指 内建有OTP MCU的電子產品所提供給使用者選擇各 種不同功能的選擇項目。例如,在内建有16位元OTP MCU的手機中’使用者可以選擇不同的焦距選項以決 定手機拍照的焦距。 OTP MCU在重置期間後,OTP MCU的燒錄腳電 壓升高到燒錄電壓值(本案為12.5V)後經過約1〜300毫 秒的穩定觀察期(本實施例中為1〜300毫秒,但其他實 施例可以為其他秒數)以確定其穩定與否,之後便開始 200923652 下一階段的步驟。在本OTP MCU的實施例中,穩定 觀察期之後OTPMCU會先送出程式計數器(Program counter, PC)10,接著才進行程式碼(Code)9的讀寫。 請參考第2圖,第2圖為習知MTP MCU的操作 時序圖。當MCU型態由上述的OTP MCU改為MTP MCU時,MTP MCU同樣會有燒錄腳電壓為5V約 100〜300毫秒的空白檢測期、重置期間、12.5V約1〜300 毫秒的穩定觀察期。但是MTP MCU有別於OTP MCU 的是,MTPMCU在穩定觀察期之後,會先送出匹配參 數(Match Pattern)ll,接著會先送出程式計數器 (Program counter, PC)10,接著才進行程式碼(c〇de)9 的讀寫。 上述OTP MCU及MTP MCU都具有鎖定(lock)及 部分鎖定(partial lock)的功能以防止盜拷。雖然如此, 因為習知之鎖碼機制是在載入選項之後才執行,因此 在空白測試之後燒錄腳電壓由5伏特處向下降開始進 行重置時,欲盜拷者可藉由改變鎖定及部分鎖定所在 的位元,使鎖定及部分鎖定無法被執行,而盜拷者便 得以在OTPMCU或MTPMCU將燒錄腳電壓升高進行 程式碼載入時進行程式碼盜拷。 職是之故,申請人鑑於習知技術中所尚未成功之 目標,經過悉心減驗與研究,並一本錢而不捨之精神, 終構思出本案「具鎖碼功能的微控制器鎖螞電路及鎖 碼方法」’以下為本案之簡要說明。 200923652 f發明内容j 本lx月的目的在於提供一種具,石^ ^ ^ ^ 器鎖碼電路及錨踩十4 、 ★ 只’刀犯的Φέ控制 斧錚腳雷#: /以解決目前在空白測試之後 燒錄腳電屋由兩開始降低而進傻 藉由改變鎖定及邻八梢Α 字欲益拷者可 夂月疋及刀鎖定所在的位元 鎖定無法被執行,而使次諸去 口Ρ刀 ^ ^,0 ^ 使益拷者便得以在燒錄腳電壓升 问進订程式碼載入時進行程式石馬盜拷的問題腳h升 根據上述構想,本案係提供 控制器鎖碼電路,用於/、鎖碼功此的微 至少-程^日=u控制器,該微控制器包括 餘二制器鎖碼電路包括-預設金 :入;1T·馬電路於一重置期間開始後接收- 其中:若比對結果為相 =相问 比對結果為不同,則該輕式顿鎖 1碼不被鎖碼;若 控制:想’本案係提供一種具鎖碼功能的微 控制_電路之鎖碼方法,應用 : 微控制器包括至少一程式$ 、#控制器,该 匕括-預设金鑰’該方法包括 ,电峪 間開始後接收—輪人今* . n於-重置期 金餘ί 比對該預設金鑰及該輸人 g疋相同,/、中.若比對結果為相同 碼不被鎖碼;若比賴果為不同,職程nr碼式 拷 本發明較佳的可以避免微控制器的程式碼被盜 200923652 【實施方式】 制51^1=第3圖’第3圖是本案具鎖碼功能的微控 ’ 方塊圖。微控制器1可以是OTPMOJ或 ϋ。圖中,微控彻】包括—微控㈣鎖碼電 私式邏輯器(program logic) 3、一程式記情 及me,)4、一資料記憶庫(data memor^5 對餘制^器(CPU)6。其中,程式邏輯器3是用來 路2進行資料交換;程式記憶庫4 疋用乂對叙式邏輯器3進行資料 是=對程式邏輯器3進行資料交換;及中4央己^哭5 疋用时職料記憶庫4及㈣記 料交換。其中,程式記憶庫4中具有至少二貝 (code)9。 征式碼 制圖’第4圖是本案具鎖碼功能的微控 ^鎖碼電路之結射塊圖。其中,微控制器鎖瑪電 T 2可以是0TP MCU或MTp MCU中的微控制器 路2。微控制器鎖碼電路2又包括—預設金輸7,且】 :金錄7可由下列方式其中之一或其任意組 生· ’生 (!)由使用者輸入而產生,例如由使用者 介面輸入任意數字而產生; 1 (2) 隨機產生; (3) —固定值加上一隨機產生值,例如以固 1111加上隨機產生的四位數字,·及 (4) 一變動值加上一隨機產生值。 200923652 而上述隨機產生值的產生方式以及所謂的隨機產 生,係經由燒錄於燒錄器(如:Handy Writer)的軟體, 於使用者操作燒錄平台時,隨機產生數值。而固定值 的產生方式,係經由燒錄於燒錄器的軟體,於使用者 操作燒錄平台時,抓取固定值所產生。而變動值的產 生方式,亦係經由燒錄於燒錄器的軟體,於使用者操 作燒錄平台時隨機產生。以上,均為透過應用軟體的 方式來產生隨機產生值、固定值以及變動值或是執行 所謂的隨機產生,然本發明之實施方式並不限於此, 本發明亦可藉由在輸出入介面與編碼器之間,設置一 數值產生器(未顯示於圖中),以於使用者在輸出入介 面輸入數字時,產生隨機產生值、固定值以及變動值 或是執行所謂的隨機產生。 微控制器鎖碼電路2用以接收一輸入金鑰8,當 任何人欲讀取程式碼9時,必須輸入輸入金鑰8,當 微控制器鎖碼電路2比對預設金鑰7及輸入金鑰8為 相同時5則程式碼9不被鎖碼而可被t買取。 在本圖中還可以看到微控制器鎖碼電路2還包 括: (1) 編碼器21,用以對預設金鑰7編碼; (2) 解碼器22,用以對輸入金鑰8及預設金鑰7 解碼,但為了安全考量,通常是將預設金鑰 7載入至一預設金鑰備份12,然後再將預設 金鑰備份12加以解碼;及 (3) 鎖碼器23,用以對程式碼9進行鎖碼。 10 200923652 而於編碼器21將預設金鑰7編碼,以及解碼器將輸入 金錄8解碼後,會進行一個比較的動作。該比較的動 作,可藉由一比較電路(未顯示於圖中)來實現,且比較 電路可以被設置於鎖碼器23之内、解碼器22之内,或 是設置於兩者之間。 請參閱第5圖,第5圖是本案具鎖碼功能的單次 寫入微控制器(OTP MCU)之第一實施例的操作時序 圖,其中OTP MCU在重置期間後經過一段穩定期間, 接著會在一輸入輸出介面(圖中未示)上顯示要求使用 者輸入輸入金鑰8的晝面,使用者輸入輸入金錄8並 被接受後,OTP MCU會比對預設金鑰7及輸入金鑰8, 待確定兩者為相同後,燒錄器送出程式計數器10,之 後,程式碼9才可被讀取或被編輯。若OTP MCU比對 預設金鑰7及輸入金鑰8後,兩者為不同,則鎖碼器 23將程式碼9鎖住,使之無法被讀取。 在本實施例中,OTP MCU在重置期間開始後經過 ^ 一段穩定期間,才會要求使用者輸入輸入金鑰8以進 行和預設金錄7的比對,但在其他實施例中,也可以 在重置期間後先要求使用者輸入輸入金錄8以進行和 預設金錄7的比對。 請參閱第6圖,第6圖是本案具鎖碼功能的單次 寫入微控制器之第二實施例的操作時序圖。在第二實 施例中,係先在重置期間後先要求使用者輸入輸入金 鑰8以進行和預設金鑰7的比對,然後在經過一段穩 定期間之後,燒錄器才送出程式計數器10,於此之後, 200923652 程式碼9才可被讀取或被編輯。輸入輸入金鑰8的時 機,可以為自電壓開始提昇後,或是於電壓提至 12. 5V之後。 請參閱第7圖,第7圖是本案具鎖碼功能的多欠 寫入微控制器(MTP MCU)之一實施例的操作時序 圖,其中MTPMCU在重置期間後經過一段穩定期間, 接著會在一輸入輸出介面(圖中未示)上顯示要求使用 者輸入輸入金鑰8的晝面,使用者輸入輸入金鑰8並 被接受之後,MTPMCU會比對預設金鑰7及輸入金鑰 8,待確定兩者為相同後,燒錄器送出至少一匹配參數 11 ’之後’燒錄器送出程式計數器10,最後,程式碼 9才可被讀取或被編輯。若MTPMCU比對預設金鑰7 及輸入金鑰8後兩者為不同,則鎖碼器23將程式碼9 鎖住,使之無法被讀取。 又在本實施例中,MTPMCU在重置期間開始後經 過一段穩定期間,才會要求使用者輸入輸入金鑰8以 進行和預設金鑰7的比對,但在其他實施例中,也可 以在重置期間後先要求使用者輸入輸入金錄8以進行 和預設金鑰7的比對。 請爹閱第8圖,第8圖是本案具鎖碼功能的多次 寫入微控制器(MTPMCU)之另一實施例的操作時序 圖,在此實施例中,係先在重置期間後先要求使用者 輪入輸入金鑰8以進行和預設金鑰7的比對,然後, 在經過一段穩定期間之後,燒錄器才送出至少二匹配 參數11。同理,輸入輸入金鑰8的時機,可以為自電 12 200923652 壓開始提昇後,或是於電壓提昇到12. 5V之後。 請參閱第9圖,並同時參閱第3圖及第4圖,第 9圖是本案具鎖碼功能的微控制器鎖碼電路之鎖碼方 法流程圖。首先,於重置期間開始後接收輸入金鑰8。 接著,將微控制器鎖碼電路之預設金鑰7與輸入金鑰 8進行比對(S1)。然後,判斷比對結果是否相同(S2), 若比對結果相同,則啟動程式邏輯器3(S3)並讀取/編 輯程式碼9(S5);若比對結果不相同,則程式碼9被鎖 碼(S4);或事先設定給予使用者預定次數輸入輸入金 鑰7的機會(回到S1 ),才做鎖碼的動作。 由於本案係將接收輸入金鑰及比對預設金鑰與輸 入金鍮的步驟安排在將選項資料載入(Load Option)之 前,因此當任何使用者在燒錄/讀取程式碼之前,必需 先經過檢查的動作,兩個金鑰相同始能送出程式計數 器及匹配參數,進而才能達到盜拷的目的;但是若兩 個金鑰不相同時,則會由鎖碼器將程式碼鎖住。也就 是說,微控制器被鎖住,只預留一位元(Ι-bit)作為讀取 微控制器狀態之用,同時也只能繼續接收輸入金鑰及 比對預設金鑰與輸入金鑰,以重新燒錄/讀取微控制 器。因此,本發明方法將可以大幅提高盜拷的難度, 以保護程式碼不至於外洩。 本案得由熟悉本技藝之人士任施匠思而為諸般修 飾,然皆不脫如附申請專利範圍所欲保護者。 【圖式簡單說明】 13 200923652 第1圖:習知OTP MCU的操作時序圖。 ^圖:.習知MTPMCU的操作時序圖。 弟3圖.本案具鎖碼功能的微控制器之結構方塊 第4圖: 結構方塊圖。 本案具鎖碼功能的微控卿鎖碼電路之 入微控制器之 入微控制器之 ^第5圖.本案具鎖碼功能的單次寫 第一實施例的操作時序圖。 =6圖.本案具鎖碼功能的單次寫 第二實施例的操作時序圖。 入微控制器之 入微控制器之 器鎖碼電路之 —,,㈣+系丹鎖碼功能的多二) 一實施例的操作時序圖。 第8圖·本案具鎖石馬功能的多二々 —實施例的操作時序圖。 第9目:本案具鎖^力能的微控 鎖碼方法流程圖。 【主要元件符號說明】 1 :微控制器 2:微控制器鎖碼電路 3 :程式邏輯器 4 :程式記憶庫 5:資料記憶庫 6 :中央處理器 200923652 7:預設金鑰 8:輸入金錄 9 :程式碼 10 :程式計數器 11 :匹配參數 12 :預設金鑰備份 21 .編碼 22 :解碼器 鎖碼器 23Programming MCU, MTP MCU) (also referred to as Flash MCU) Please refer to Figure 1, which is the operation timing diagram of the conventional OTP MCU. The OTPMCU includes a burning foot (not shown), in which the foot is burned. It is used to receive a burn-in foot voltage (not shown). When the OTP MCU is programmed with the burner, the voltage of the burn-in foot will be raised from zero volts to the blank test voltage value (the blank of this embodiment). The test voltage 200923652 has a value of 5V, and in other embodiments, other volts may be performed for about 100 to 300 milliseconds (100 to 300 milliseconds in this embodiment, and other embodiments may be other seconds). To determine whether the value inside the OTP MCU is the default value. If the value inside the OTP MCU is a preset value, it means that the OTP MCU is blank and can be burned. In this embodiment, the preset value is 0. In other embodiments, the preset value is 1, ff.., etc. After the OTP MCU passes the blank test, the burn-in pin voltage drops from the blank test voltage value to the low point of 0V and remains 0V for several milliseconds (1 to 4 milliseconds in this embodiment, other embodiments may be other seconds), after The burn-in foot voltage is further increased from 0 V to the burn-in voltage value (in this embodiment, the burn-in voltage value is 12.5 V, but in other embodiments, the burn-in voltage value may be different). The period during which the burn-in voltage value starts to fall from the blank test voltage value until the burn-in voltage reaches the burn-in voltage value is called the Reset Period. At the beginning of the reset period, the OTP MCU starts loading the option data into the OTPMCU. The so-called option refers to the selection of items that the user of the built-in OTP MCU provides for the user to select various functions. For example, in a mobile phone with a built-in 16-bit OTP MCU, the user can select different focal length options to determine the focal length of the phone. After the reset period of the OTP MCU, the OTP MCU's programming pin voltage rises to the programming voltage value (12.5V in this case) and passes through a stable observation period of about 1 to 300 milliseconds (in this embodiment, 1 to 300 milliseconds, However, other embodiments may be other seconds to determine whether it is stable or not, and then the next phase of 200923652 is started. In the embodiment of the OTP MCU, after the stable observation period, the OTPMCU will first send a Program Counter (PC) 10, and then read and write the Code 9. Please refer to Figure 2, which is a timing diagram of the operation of the conventional MTP MCU. When the MCU type is changed from the above OTP MCU to the MTP MCU, the MTP MCU also has a blank detection period with a burning foot voltage of 5V for about 100 to 300 milliseconds, a reset period, and a stable observation of 12.5V for about 1 to 300 milliseconds. period. However, the MTP MCU is different from the OTP MCU. After the stable observation period, the MTPMCU will send the Match Pattern ll first, then the Program Counter (PC) 10 will be sent first, and then the code will be executed. 〇de)9 read and write. Both the above OTP MCUs and MTP MCUs have the functions of lock and partial lock to prevent piracy. However, since the conventional lock code mechanism is executed after the load option, the burn-in foot voltage is reset from 5 volts to the drop after the blank test, and the person who wants to pirate can change the lock and the part. The bit is locked so that the lock and partial lock cannot be executed, and the pirate can perform code piracy when the OTPMCU or MTPMCU raises the programming pin voltage for code loading. As a result of the job, the applicant has conceived the research and the research, and the spirit of perseverance, in the light of the unsuccessful goal of the prior art, and finally conceived the case of the microcontroller with the lock code function. And the lock code method" 'The following is a brief description of the case. 200923652 fInventive content j The purpose of this lx month is to provide a kind of stone ^ ^ ^ ^ device lock code circuit and anchor step ten 4, ★ only 'knife Φ έ control axe 铮 foot mine #: / to solve the current gap After the test, the burning of the electric house is reduced from the beginning of the two, and the stupidity can be executed by changing the lock and the neighboring eight-point Α 欲 拷 拷 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋Scythe ^ ^, 0 ^ to enable the copy of the foot can be raised in the programming foot code when the program code loading is loaded with the problem of the horse thief. According to the above concept, the case provides the controller lock code circuit , for / / lock code function of the micro at least - process ^ day = u controller, the microcontroller includes the remaining two controller lock code circuit includes - preset gold: into; 1T · horse circuit during a reset period Received after starting - where: if the comparison result is phase = the comparison result is different, then the light lock 1 code is not locked; if the control: wants to provide a micro-control with lock function _ circuit lock code method, application: The microcontroller includes at least one program $, # controller, the 匕-preset The key 'this method includes, after the start of the electricity reception, the round-off person*. n--reset period gold balance ί is the same as the preset key and the input g疋, /, medium. If the result is compared If the same code is not locked; if the ratio is different, the service nr code can better avoid the theft of the code of the microcontroller 200923652 [Embodiment] System 51^1=Fig. 3 Figure 3 is a block diagram of the micro-controller with the lock function in this case. The microcontroller 1 can be OTPMOJ or ϋ. In the figure, the micro-control is included - micro-control (four) lock code electrical private logic (program logic) 3, a program record and me,) 4, a data memory (data memor ^ 5 on the remainder of the device ( CPU) 6. Among them, the program logic 3 is used for data exchange of the road 2; the program memory 4 is used for data processing of the Syrian logic 3 = data exchange for the program logic 3; ^Cry 5 疋 职 职 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 ^The junction block diagram of the lock code circuit, wherein the microcontroller lock motor T 2 can be the microcontroller channel 2 in the 0TP MCU or MTp MCU. The microcontroller lock code circuit 2 includes - preset gold input 7 , and : : 金录7 can be generated by one of the following methods or any group of students, 'Life (!) is generated by the user input, for example, input by the user interface to enter any number; 1 (2) randomly generated; 3) - a fixed value plus a randomly generated value, for example, a solid 1111 plus a randomly generated four digit, and (4) a variation plus The value is randomly generated. 200923652 The generation method of the above randomly generated value and the so-called random generation are generated by the software programmed in the burner (such as Handy Writer), and the value is randomly generated when the user operates the programming platform. The method of generating the fixed value is generated by the software programmed in the programmer, and the fixed value is generated when the user operates the burning platform. The change value is also generated by burning in the burner. The software is randomly generated when the user operates the programming platform. The above is a method of generating a randomly generated value, a fixed value, and a variable value by using a software application or performing a so-called random generation, but the embodiment of the present invention is not limited to Therefore, the present invention can also provide a value generator (not shown in the figure) between the input interface and the encoder, so that when the user inputs a number in the input interface, a random generated value and a fixed value are generated. And the variable value or the implementation of the so-called random generation. The microcontroller lock code circuit 2 is used to receive an input key 8, when anyone wants to read the code 9, it must The input key 8 is input. When the microcontroller lock code circuit 2 is the same as the preset key 7 and the input key 8, the program code 9 is not locked and can be bought by t. Seeing that the microcontroller lock code circuit 2 further comprises: (1) an encoder 21 for encoding the preset key 7; (2) a decoder 22 for decoding the input key 8 and the preset key 7 However, for security reasons, the preset key 7 is usually loaded into a preset key backup 12, and then the preset key backup 12 is decoded; and (3) the code locker 23 is used to program Code 9 performs the lock code. 10 200923652 While the encoder 21 encodes the preset key 7, and the decoder decodes the input record 8, a comparison action is performed. The comparison operation can be implemented by a comparison circuit (not shown), and the comparison circuit can be placed within the codec 23, within the decoder 22, or between the two. Please refer to FIG. 5, which is an operation timing diagram of the first embodiment of the single-write microcontroller (OTP MCU) with the lock function in the case, wherein the OTP MCU has passed a stable period after the reset period. Then, an input and output interface (not shown) is displayed on the input side of the input key 8, and after the user inputs the input record 8 and is accepted, the OTP MCU compares the preset key 7 and Enter the key 8. After the two are determined to be the same, the programmer sends the program counter 10, after which the code 9 can be read or edited. If the OTP MCU compares the preset key 7 and the input key 8, the two are different, and the code locker 23 locks the code 9 so that it cannot be read. In this embodiment, the OTP MCU requires the user to input the input key 8 for comparison with the preset gold record 7 after a period of stabilization after the start of the reset period, but in other embodiments, The user may be required to input the input record 8 after the reset period to perform an alignment with the preset record 7. Please refer to FIG. 6. FIG. 6 is a timing chart showing the operation of the second embodiment of the single-write microcontroller with the lock function in the present case. In the second embodiment, the user first inputs the input key 8 to perform the comparison with the preset key 7 after the reset period, and then the programmer sends the program counter after a stable period of time. 10. After this, the 200923652 code 9 can be read or edited. The timing of inputting the input key 8 can be after the self-voltage starts to rise, or after the voltage is raised to 12. 5V. Please refer to FIG. 7. FIG. 7 is an operation timing diagram of an embodiment of a multi-input write microcontroller (MTP MCU) with a lock function in this case, wherein the MTPMCU goes through a stable period after the reset period, and then After an input/output interface (not shown) is displayed, the user is required to input the input key 8. After the user inputs the input key 8 and is accepted, the MTPMCU compares the preset key 7 and the input key. 8. After determining that the two are the same, the programmer sends at least one matching parameter 11 ' after the programmer sends the program counter 10, and finally, the code 9 can be read or edited. If the MTPMCU is different from the preset key 7 and the input key 8, the codec 23 locks the code 9 so that it cannot be read. In this embodiment, the MTPMCU requires the user to input the input key 8 for comparison with the preset key 7 after a period of stabilization after the start of the reset period, but in other embodiments, After the reset period, the user is required to input the input record 8 to perform comparison with the preset key 7. Please refer to FIG. 8. FIG. 8 is an operation timing diagram of another embodiment of the multi-write microcontroller (MTPMCU) with a lock function in this case. In this embodiment, after the reset period The user is first required to enter the input key 8 to perform an alignment with the preset key 7. Then, after a stable period of time, the programmer sends at least two matching parameters 11. Similarly, the timing of inputting the input key 8 can be started after the self-powered 12 200923652 pressure is raised, or after the voltage is raised to 12. 5V. Please refer to Fig. 9 and refer to Fig. 3 and Fig. 4 at the same time. Fig. 9 is a flowchart of the code locking method of the microcontroller lock code circuit with the lock code function. First, the input key 8 is received after the start of the reset period. Next, the preset key 7 of the microcontroller lock code circuit is compared with the input key 8 (S1). Then, it is judged whether the comparison result is the same (S2), if the comparison result is the same, the program logic 3 (S3) is started and the program code 9 is read/edited (S5); if the comparison result is not the same, the code 9 The code is locked (S4); or the user is given the opportunity to input the input key 7 a predetermined number of times (back to S1) before the lock code is activated. Since the case will receive the input key and compare the preset key with the input key before the option data is loaded (Load Option), so before any user is programming/reading the code, it is necessary. After checking the action, the two keys can be sent to the program counter and the matching parameters to achieve the purpose of copying. However, if the two keys are different, the code is locked by the locker. That is to say, the microcontroller is locked, only one bit (Ι-bit) is reserved for reading the state of the microcontroller, and only the input key and the preset key and input can be continuously received. Key to re-burn/read the microcontroller. Therefore, the method of the present invention can greatly improve the difficulty of copying, so as to protect the code from leaking. This case has been modified by people who are familiar with the art, but it is not intended to be protected by the scope of the patent application. [Simple description of the diagram] 13 200923652 Fig. 1: Operation timing diagram of the conventional OTP MCU. ^Figure: The operational timing diagram of the conventional MTPMCU. Brother 3 Figure. The structure of the microcontroller with the lock code function in this case. Figure 4: Block diagram of the structure. In this case, the micro-controlling lock code circuit with the lock code function is input into the microcontroller. Fig. 5 is a single write of the lock code function. The operation timing chart of the first embodiment. =6 picture. Single write of the case with the lock code function The operation timing chart of the second embodiment. Into the microcontroller into the microcontroller lock code circuit -, (4) + more than two functions of the Dan lock code) operation timing diagram of an embodiment. Fig. 8 is a timing diagram of the operation of the embodiment of the present invention. Item 9: Flow chart of the micro-control lock code method with lock force. [Major component symbol description] 1 : Microcontroller 2: Microcontroller lock code circuit 3: Program logic 4: Program memory 5: Data memory 6: Central processor 200923652 7: Default key 8: Input gold Record 9: Code 10: Program Counter 11: Matching Parameter 12: Preset Key Backup 21. Code 22: Decoder Locker 23

Claims (1)

200923652 十、申請專利範圍: 1器,===控Γ;=’用於-_ ”杯- H 碼,且該微控制器鎖碼電 MG括一預故金鑰,該微控制器鎖碼電路於一重置期間門 =妾收:金餘並比對該預設金餘及該輸入金較 f比對結果為㈣,職程式碼不被鎖瑪; 若比對結果為不同,則該程式碼被鎖碼。 2電路如申胸第1項的具鎖碼功能的微控制器鎖碼 一編碼器,用以對該預設金鑰編碼。 電路申,\專利㈣第1獅具鎖碼功能的微控制器鎖碼 4二解碼11 ’用以對該預設錢及該輸人金餘解碼。 電路範㈣1項的具料功能的微控制器鎖碼 —鎖碼器,用以對該程式碼進行鎖碼。 電^= 專㈣圍第1項的具鎖碼功能的微控制器鎖石馬 繞錄4;括:^腳2:該燒錄腳係於燒錄時接收- 空白測試電壓值進行空白檢測之後,該燒錄腳 电褽由該空白測試電壓值降至零伏 卜燒錄電壓,其中,該== 壓的:::=:直到該燒錄腳電麗到達該燒錄電 16 200923652 的微控制器鎖碼 碼電路進行資料 如申請專利範圍第1項的具鎖碼功能 電路,其中該微控制器更包括·· -程式邏輯器,用以對該微控制器鎖 一程式記憶庫 一資料記憶庫 用以對4¾式邏輯II進行冑料交換; 用以對該程式邏輯器進行資料交換; 一中央處理器,用以分別對t 憶庫進行資料交換, ⑽处式⑽庫及該資啦 其令該程式碼是被儲存於該程式記憶庫中。 鎖碼為單次寫入微控制器,該微控制器 St輯該預設金⑽該輸人金料相同後,一燒錄 ^輯/—料舱11,讀m科可被讀取或 雷^申㉔專利關第7項的具鎖㈣能的微控制器鎖碼 ^丄其中該微控㈣鎖碼電路_該預設金鍮及該輸入 2為相同後’先經_—段穩定期間後,該燒錄器送出 V -程式計數H,之後,雜以才可被讀取或被編輯。 蕾申叫專利I巳圍第1項的昊鎖碼功能的微控制器鎖碼 ^路’其中該微控制㈣多次寫人微控制器,該微控㈣ ,竭電路比對該預設金鑰及該輸人金料相同後,一境錄 态=出至少一匹配參數,之後該燒錄器送出至少一程式計 數器後,該程式碼才可被讀取或被編輯。 〇.如申明專利範圍第9項的具鎖碼功能的微控制器鎖碼 17 200923652 1:路 金齡器鎖碼電路比斟該預設金鑰及該輪入 後,先經過經一段穩定期間,之後,該燒_ 哭後^匹配參數,之後該燒錄器送出至少—程式計數 。。後,邊程式碼才可被讀取或被編輯。 m專㈣㈣丨項的具鎖碼功 電路’其巾該預設錢由使用者輸^產生。貞馬 玉路其中该預設金鑰係隨機產生。 ^路如申^專利範㈣丨項的具鎖碼功能的微 ιΛ,申其:直該預設金鑰為-固_ 電路,1中今預1滅、1貞碼功能的微控制器鎖石馬 二ΓΤ_碼電路=== 輸入心=同接收該輸入金矯並比對該預設金錄及該 =於――種具鎖碼功能的微㈣器鎖碼電路之鎖碼方法,應 ㈣卜制@,該微控制器包括至少—程式碼,而該微 工制态鎖碼電路包括一預設金鑰,該方法包括 以, 於—重置期間開始後接收-輸入金鑰;,’驟: 比對該預設金餘及該輸入金餘是否相同,其中·· 若比對結果為相同,則該程式碼不被鎖碼;· Ϊ7 w若㈣絲為不肖,職料碼被鎖喝。 .申請專利範圍第16項的方法,更包括 利用一編碼器,以對該輸入金鑰編碼。驟· 18 200923652 18.如申請專利範圍第16項的方法,更包括下列步驟: 19如由用冑碼器’以對該預設金鑰及該輸入金鑰解碼 19·如申請專利範圍第16 =解碼。 Λ ,以對該程式碼進行鎖碼。 f勺扭料利範圍第16項的方法,該微控制11鎖碼電路 更包括一燒錄腳,1中哕摔 馬電路 ,並於進行燒錄前; 到一办占、目I丨4帝r π錄态將該燒錄腳電壓升高200923652 X. Patent application scope: 1 device, === control; = 'for -_ ” cup-H code, and the microcontroller lock code MG includes a pre-failure key, the microcontroller lock code During the reset period, the gate is closed: the gold balance is compared with the preset gold balance and the input gold is compared with the result of f (4), the service code is not locked; if the comparison result is different, then the The code is locked. 2 Circuit such as the lock code function of the lock code function of the microcontroller, the encoder is used to encode the preset key. Circuit application, patent (4) 1st lion lock The code function of the microcontroller lock code 4 2 decoding 11 ' is used to decode the preset money and the input gold remainder. Circuit model (4) 1 item of the function of the microcontroller lock code - lock code, used to The code is locked. Electric ^= Special (4) Enclosed with the lock code function of the microcontroller lock stone horse winding 4; including: ^ foot 2: the burning foot is received during the burning - blank After the test voltage value is subjected to blank detection, the burned foot power is reduced from the blank test voltage value to a zero-volt burn-in voltage, wherein the == pressure:::=: until the burned foot power The microcontroller lock code circuit that arrives at the programming circuit 16 200923652 performs the data as the lock code function circuit of the first application of the patent scope, wherein the microcontroller further includes a program logic for the micro The controller locks a program memory library to exchange data for the 43⁄4 logic II; to exchange data with the program logic; and a central processing unit for exchanging data with the t memory library, (10) The formula (10) library and the resource enable the code to be stored in the program memory. The lock code is a single write to the microcontroller, and the microcontroller St compiles the preset gold (10) the input gold. After the same material, a burning record / series - nacelle 11, read m section can be read or Lei ^ Shen 24 patent off the seventh item of the lock (four) capable of the microcontroller lock code ^ 丄 where the micro control (four) The lock code circuit _ the preset key 鍮 and the input 2 are the same after the 'first _ _ segment stable period, the programmer sends the V - program count H, after which the miscellaneous can be read or edited. Lei Shen called the patent I to the first item of the 昊 lock code function of the microcontroller lock code ^ road ' Micro-control (4) writing the human controller multiple times, the micro-control (4), after the same circuit is compared with the preset key and the input gold material, the state of the scene = at least one matching parameter, after which the burner After sending at least one program counter, the code can be read or edited. 〇. For example, the lock code function of the microcontroller lock code 17 of the patent scope 9 200923652 1: Lu Jinling lock code circuit Comparing the preset key and the rounding, after a stable period of time, after the burning _ crying ^ matching parameters, then the programmer sends at least the program count. After that, the code can be It is read or edited. m special (four) (four) item of the lock code work circuit 'the towel is the default money generated by the user. Huma Yulu, the default key is randomly generated. ^路如申^专利范(四)丨 The micro-touch with the lock function, Shen: The default key is the solid-lock circuit, the 1石马二ΓΤ_码电路=== Input heart = the same as the input gold correction and the lock code method of the micro-(four) lock code circuit for the preset gold record and the =--the lock code function, Should (4) behave @, the microcontroller includes at least - a code, and the micro-system state-locking circuit includes a preset key, the method comprising: receiving - inputting a key after the start of the reset period; , 'C: Compared with the preset gold balance and the input gold amount is the same, where ·· If the comparison result is the same, the code is not locked; · Ϊ7 w if (4) silk is not Xiao, job code Locked to drink. The method of claim 16 further includes utilizing an encoder to encode the input key. 18. 18 200923652 18. The method of claim 16, further comprising the steps of: 19 as by using a coder to decode the preset key and the input key 19 as claimed in claim 16 = decoding. Λ to lock the code. f spoon twists the range of the method of the 16th item, the micro-control 11 lock code circuit further includes a burning foot, 1 哕 哕 电路 horse circuit, and before the burn-in; to one office, the head I 丨 4 Emperor r π recording increases the voltage of the programming foot 值進行空白檢測之後,該燒錄腳電壓由 電壓值降至零伏特,接著該燒錄腳電壓由 :一燒錄電壓,其中,該燒錄腳電壓由該空白測 以置:直到該燒錄腳 項的方法,更包括下列步驟: 以對該微控制器鎖碼電路進行資 21.如申請專利範圍第16 利用一程式邏輯器, 料交換;After the value is blanked, the voltage of the programming pin is reduced from zero to zero volts, and then the voltage of the programming pin is: a programming voltage, wherein the voltage of the programming pin is set by the blank: until the programming The method of the foot item further includes the following steps: to fund the microcontroller lock code circuit. 21. For example, the patent scope is 16th using a program logic device, material exchange; 利用一程式記憶庫 換; 以對該程式邏輯器進行資料交 利用-資料記憶庫,以對該程式邏輯器進行資料交 換,及 利用一中央處理器’以分別對該程式記憶庫及該資 記憶庫進行資料交換。 、 2 2.如申請專利範圍帛16項的方法,其中於該微控制器鎖 碼電路比對該預設金鑰及該輸入金鑰為相同後,更包括下 列步驟: 利用一燒錄器送出至少一程式計數器;以及 19 200923652 言買取或編輯該程式碼。 •如申叫專利範圍第22項的方法’其中於該微控制器鎖 =¾路比對該預設錢及該輸人金鑰為相同後,與該燒錄 盗送出至少一程式計數器之前,更包括下列步驟: 經過一段穩定期間。 2 4如申請專利範圍帛工6項的方法,其中該微控制器鎖碼 丰比對該預設金餘及該輸入金鑰為相同後,更包括下列 矛J用燒錄為送出至少一匹配參數; ,用該燒錄器送出至少一程式計數器;以及 讀取或編輯該程式碼。 ^如申請專利範圍第2 4項的方法’其中於該微控制器鎖 ::比對該預設金鑰及該輸人讀為相同後,與該燒錄 时送出至少一匹配參數之前,更包括下列步驟: 經過一段穩定期間。 2用申請專利翻第16項的方法,其中該獄金鑰由使 用者輸入而產生。 機產 1申μ專利辄^第16項的方法’其中該預設金輪係隨 申明專利範圍第16項的方法,其中該預設金錄為一 U疋值加上一隨機產生值。 It申請專利範圍第16項的方法,其中該預設金鑰為-變動值加上一隨機產生值。 =如申料利範圍第16項的方法,其巾於該重置期間開 σ後接收该輸入金鑰之步驟更包括下列步驟: 20 200923652 於該重置期間開始後經過一段穩定期間;以及 接收該輸入金鑰。Using a program memory library to exchange data for the program logic - data memory to exchange data with the program logic, and using a central processing unit to separate the program memory and the memory The library exchanges data. 2. The method of claim 16, wherein the microcontroller lock code circuit is the same as the preset key and the input key, and further includes the following steps: sending out by using a burner At least one program counter; and 19 200923652 to buy or edit the code. • The method of claim 22, wherein after the microcontroller lock = 3⁄4 way is the same as the default money and the input key, before the program steals at least one program counter, It also includes the following steps: After a period of stability. 2 4 If the patent application scope is completed, the method is as follows: wherein the microcontroller lock code is equal to the preset gold balance and the input key, and the following spears are used to send at least one match. Parameter;, using the programmer to send at least one program counter; and reading or editing the code. ^ The method of claim 24, wherein the microcontroller lock:: before the preset key and the input are the same, before sending at least one matching parameter to the programming, The following steps are included: After a period of stabilization. 2 In the method of applying for a patent, the method of claim 16, wherein the prison key is generated by the user input. The method of the invention is claimed in the method of claim 16 wherein the preset gold wheel is in accordance with the method of claim 16 of the patent scope, wherein the preset gold is recorded as a U value plus a randomly generated value. It is the method of claim 16, wherein the preset key is a variable value plus a randomly generated value. = The method of claim 16, wherein the step of receiving the input key after the σ is opened during the reset period further comprises the following steps: 20 200923652 a period of stability after the start of the reset period; and receiving The input key. 21twenty one
TW096144197A 2007-11-21 2007-11-21 Signal-lock MCU circuit and signal-lock method TW200923652A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW096144197A TW200923652A (en) 2007-11-21 2007-11-21 Signal-lock MCU circuit and signal-lock method
US12/072,556 US20090129598A1 (en) 2007-11-21 2008-02-26 Microprocessor locking circuit and locking method therefor with locking function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW096144197A TW200923652A (en) 2007-11-21 2007-11-21 Signal-lock MCU circuit and signal-lock method

Publications (1)

Publication Number Publication Date
TW200923652A true TW200923652A (en) 2009-06-01

Family

ID=40641982

Family Applications (1)

Application Number Title Priority Date Filing Date
TW096144197A TW200923652A (en) 2007-11-21 2007-11-21 Signal-lock MCU circuit and signal-lock method

Country Status (2)

Country Link
US (1) US20090129598A1 (en)
TW (1) TW200923652A (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100554112B1 (en) * 1997-05-30 2006-02-20 미크론 테크놀로지,인코포레이티드 256 meg dynamic random access memory
US6980672B2 (en) * 1997-12-26 2005-12-27 Enix Corporation Lock and switch using pressure-type fingerprint sensor
US5898618A (en) * 1998-01-23 1999-04-27 Xilinx, Inc. Enhanced blank check erase verify reference voltage source

Also Published As

Publication number Publication date
US20090129598A1 (en) 2009-05-21

Similar Documents

Publication Publication Date Title
CA2336158C (en) Semiconductor memory card and data reading apparatus
TWI292556B (en) Method and memory medium having machine instructions for securely booting up electronic device by hashing code provided for execution during boot-up of electronic device and electronic device related therewith
TW591630B (en) Data security device of storage medium and data security method
US9058838B2 (en) Multimedia storage systems and methods
EP2011123A2 (en) Semiconductor device identifier generation method and semiconductor device
JP2008504592A (en) Secure data backup and playback
JP2002509624A (en) Secure memory card with program-controlled security access control
TW201248407A (en) Data storage apparatus, coding unit, systems including the same, method of coding and method of reading data
US11106829B2 (en) Chip fingerprint management based upon one-time programmable memory
JP2001035169A5 (en)
TW200422945A (en) System for binding secrets to a computer system having tolerance for hardware changes
CN107688756B (en) Hard disk control method, equipment and readable storage medium storing program for executing
TWI242123B (en) Program development method, program development supporting system, and program installation method
CN112069551A (en) Electronic circuit
TW200923652A (en) Signal-lock MCU circuit and signal-lock method
JPWO2004107182A1 (en) Data restoration method, information processing apparatus, and data restoration program
TWI303038B (en) Computer dada security method, system
TW539998B (en) Computer booting device using smart card interface and the method thereof
JP2005182816A (en) Method for autonomously jointing subsystem for theft prevention to system
WO2006133059A2 (en) Content protection system and method for memory cards in electronic devices
JP5354268B2 (en) Information processing apparatus and security method
CN101452513B (en) Code locking circuit with code locking function for microcontroller and code locking method
CN114201235A (en) Encryption method of electronic equipment
JP4718180B2 (en) Micro circuit card whose performance can be changed after customization
JP2010211406A (en) Removable memory unit