1328769 23858twf.doc/n 九、發明說明: 【發明所屬之技術領域】 本發明是關於一種記憶裝置,且特別是關於一種記憶 裝置與其防護方法。 【先前技術】 隨著記憶卡的曰益普及並且逐漸有取代傳統磁片及光 碟(Compact disc,CD)的趨勢。尤其是如數位相機、數位攝 衫機、MP3播放機、個人數位助理(personaj Digital Assistant,PDA)、行動電話等可攜式裝置,均是使用記憶 卡來當作儲存資料的裝置。目前,市面的記憶卡種類包括 安全數位(Secure Digital,SD)記憶卡、緊密快閃(c〇mpact1328769 23858twf.doc/n IX. Description of the Invention: [Technical Field] The present invention relates to a memory device, and more particularly to a memory device and a method of protecting the same. [Prior Art] With the popularity of memory cards and the trend of replacing traditional magnetic disks and compact discs (CDs). In particular, portable devices such as digital cameras, digital camcorders, MP3 players, personal digital assistants (PDAs), and mobile phones use a memory card as a means of storing data. Currently, the types of memory cards on the market include Secure Digital (SD) memory cards and compact flash (c〇mpact).
Flash,CF) 5己憶卡與多媒體卡(Multimedia Card MMC)... 等。 ’ 然而,一般記憶卡必須要透過特定裝置或人機介面來 執行鎖^祕制讀寫與密碼保護的魏,並且再利用特定 的裝^或人機介面來解除功能的限制狀態。目前,記憶卡 的防讀寫功能’通常是利用—不帶電性的開關,並且使用 Ϊ備的端子機構去债測位於記憶卡上的開· 視門否開放$憶卡的讀寫功能。假如使用設備無 視開關的位置,則記憶卡的防讀寫功能形同虛設。 全數位記憶卡、緊密快閃記憶卡或多$ 找卡的鎖定功能’賴透過電腦或手持裝置 疋指令’並輸人密碼來進行加密與解密,假如手邊^ 5 1328769 23858twf.doc/n 有電腦或手持裝置,便盔法執杆 【發明内容】 更…法執仃战卡的鎖定功能。 本發明提供-種記憶裝置與其防護 路工作電雜,自_定減裝置 ^可在取得電 料保護的便利性。 与功成,以達成資 本發明提供-種記憶裝置,此記憶 元、記憶體控制單元、切換開關與控制電^置包括記憶單 單元用以讀寫記憶單元且内建防護單元 ^己憶體控制 控制電路嫩切換開關與 痛測切換開關之位置,若此切換開·於^控^路 上述之防護單元以禁止記憶體控制單元讀取或寫入/致, 元。 ”、。己憶早 本發明提供-種行動裝置’此行動裝置適用於 裝置,而此記憶裝置處於防讀寫狀態。此行動裝置勺n愿 憶裝置介面與解碼單元,而此解碼單元具有—^ =括5己 當上述之記憶裝置耦接至記憶裝置介面時,則解碼j碼二 ,輸出啟_碼至記憶裝置,以解除記憶裝置之防=狀 本發明提供一種記憶裝置之防護方法,此記 有切換開關,而此切換開_以鎖定記憶裝置的讀寫功 倉b。上述記憶裝置之防護方法包括下列步驟··當接 作電壓時’檢查雛裝置衫處於防讀寫絲:若情= 置處於防讀寫狀態,則要錢人啟動密碼,简除 6 1328769 23858twf.doc/n 置的防5胃寫狀悲。若記憶裝置處於正常狀態,則檢查切換 開關是否位於鎖定端。若切換開關位於鎖定端,則致能記 憶裝置中之防護單元以禁止讀取或寫入記憶裝置。 本發明在記憶裝置中增設一控制電路,可根據切換開 關來執行記憶體控制單元的鎖定或寫入保護功能,以達成 快速鎖定記憶裝置的讀寫功能。當鎖定記憶裝置的讀寫功 能後,將切換開關再切換至正常端時,記憶裝置並不會立 • 即解除鎖定的功能,必須透過一啟動密碼進行解除,蕻 彳有效地魏記«置賴的仙。 城 為讓本發明之上述和其他目的、特徵和優點能更明顯 易懂,下文特舉本發明之較佳實施例,並配合所附圖式‘,、 作詳細說明如下。 【實施方式】 簋_一實施例 圖1繪示為本發明實施例之記憶裝置之示意圖。請參 考圖1 ’此記憶裝置100包括記憶單元lio、記憶體控制單 元120、切換開關130與控制電路140。記,丨咅體 具有鎖定端131與正常端132,可由使用者進行切換。控 制電路140耦接於切換開關13〇與記億體控制單元12q: 間,並根據切換開關13〇的位置(位於鎖定端131或正常 132)來決定是否致能防護單元121以禁止記憶體控制 單元120讀取或寫入記憶單元11〇。 記憶體控制單元120負責讀寫記憶單元u〇的内部資 7 23858tw£d〇c/n 料’並且内建—防護單 控制單元12()的^^ 121防護早凡121可使記憶體 入記情單元】1f) \或以魏失能續止外界讀取或寫 控制虽切換開關130切換至鎖定端131時, 連接電子裝w接收到工作電壓(例如將記憶裝置100 此時,纪^晉二動電話)時,自動致能防護單元121。 而無法進;裝ί進行讀取前便會被鎖定, 端132 Η! — 動作。若切換開關130切換至正常 處於致能狀⑵是否 啟動密碼,以解===則=: 則允=控制單元12。讀寫記憶單元二 會在接收到所;應的動作’而控制電路_也 13°" 變切換開關的位置時,記情 _換吕之,當使用者改 會在記憶裝置刚接_工作工120與控制電路140 是否鎖找錄置100。關於: ,、自彳了動作,並決定 =内5口如記憶裝置1〇。内建之微械:ΐ :接介面丄= _,記憶;;置(如手 平兀120進行功能擴充)實 23858twf.doc/n 現,以達成上述之功效,故在此不加累述。 在本實施例中,上述之記憶裝置100可以為安全數位 記憶卡、緊密快閃記憶卡或是多媒體卡。在一般記憶卡(例 如安全數位記憶卡或緊密快閃記憶卡)規格中,其記憶體 控制單元120會有内建的鎖定指令(LOCK command)或 是防寫的指令’通常由韌體所組成。這些鎖定或防寫的韌 體即為本實施所述之防護單元121,而在本發明另一實施 例中,防護單元121也可以由設計者自行設計所需的防護 才曰令或以硬體電路來實現,在本發明中並不受限於記憶裝 置100規格所内建的防護指令。 換吕之,上述提及之防護單元121可包括鎖定功能與 防寫功能。控制電路140可根據一預設值來選擇執行鎖定 功能或防寫功能。此預設值可由使用者視需求先行設定, 以選擇對記憶裝置100進行資料保護的形式。若致能防護 單兀121的鎖定功能,則禁止記憶體控制單元12〇讀寫記 憶單兀110 ;若致能防護單元121的防寫功能,則只禁止 記憶體控制單元120寫入記憶單元no。 虽記憶裝置1〇〇被鎖定時,記憶體控制單元12〇會要 求使用者輸人啟動密碼(例如〇_)以解除鎖定狀離曰 讀寫狀態)。啟動密碼可預先設定,並儲存於 = 或是利用記憶單元110的特定區塊來進行儲存。°° 上述實施例中,記憶裝置1〇〇是以記 ,然而’本發明實施例之記憶裝置 卡,亦可為可搞帶式硬碟或應(㈣體)播放器及個= 1328769 23858twf.doc/n 數位助理之内建非揮發性記憶體裝置。 弟二實施例 經由上述第一實施例,可歸納一種記憶裝置100之防 濩方法,其防護方法說明如下。圖2繪示為本發明實施例 之5己憶裝置防護方法之流程圖。請同時參考圖1與圖2, • 在步驟S210中,首先,當記憶裝置100接收到工作電壓 時’記憶體控制單元120會先行偵測防護單元121是否致 φ 能,以檢查記憶裝置100是否處於防讀寫狀態。若防護單 元121致能,表示記憶裝置1〇〇處於防讀寫狀態,則進行 步驟S220 °若防護單元121未致能,表示記憶裝置100處 於正常狀態,則進行步驟S230。 在步驟S220中’即記憶裝置1〇〇處於防讀寫狀態, 此時記憶裝置1〇〇會要求輸入一啟動密碼,以解除記憶體 控制單元120中的防護單元121的功效,使記憶裝置1〇〇 恢復正常讀寫資料的狀態。在步驟S23〇中,即記憶裝置 1〇〇目前處於正常狀態,此時由控制電路140偵測切換開 ^ 1 130是否位於鎖定端。若切換開關1;3(M立於鎖定端 131 ’則進行步驟S24〇(3若控制電路14〇偵測切換開關 位於正常端132,則進行步驟S25〇。 ^在步驟S240中’即切換開關130位於鎖定端13卜此 時控制電路140會致能記憶體控制單元12〇中的防護單元 121,以禁止讀取或寫入記憶裝置1〇〇,並對記憶裝置1〇〇 的内-p資料進行保護。防護單元121 —旦致能,記憶裝置 1〇0隨即進入防讀寫狀態。接下來,步驟S220要求輸入啟 1328769 % 23858twf.doc/n 動密碼,以解除記憶裝置1〇〇的防钱 中,即切換開關13CH立於正常端^•、狀態。在步驟S250 處於正常絲,社壯料 ’=記憶裝置觸 第三f施例 G裝置UK)的内部資料。 從另一個觀點來看,本發明提— 於上述之記憶裝置則,如圖3所,行動裝置,適用Flash, CF) 5 Recall Cards and Multimedia Cards (Multimedia Card MMC)...etc. ’ However, in general, the memory card must perform the lock-and-write and password-protected Wei through a specific device or human-machine interface, and then use a specific device or human-machine interface to release the restricted state of the function. At present, the anti-reading function of the memory card is usually a use-uncharged switch, and the terminal mechanism of the backup is used to measure the open/view door on the memory card to open the read/write function of the memory card. If the device is used regardless of the position of the switch, the anti-reading function of the memory card is ineffective. Full-digit memory card, compact flash memory card or more than $ to find the lock function of the card 'Live through the computer or handheld device 疋 command' and enter the password to encrypt and decrypt, if at hand ^ 5 1328769 23858twf.doc / n have a computer Or handheld device, the helmet method is sticking [invention content] More... The lock function of the law enforcement card. The invention provides a memory device and a protective circuit working electrical hybrid, and the self-determining device can obtain the convenience of the electric material protection. And the realization of the capital to provide a memory device, the memory element, the memory control unit, the switch and the control device include a memory unit for reading and writing the memory unit and the built-in protection unit The position of the control circuit tender switch and the pain test switch is controlled. If the switch is turned on, the above protection unit is prohibited from reading or writing the memory control unit. The mobile device is suitable for the device, and the memory device is in an anti-reading state. The mobile device is eager to recall the device interface and the decoding unit, and the decoding unit has - ^ = includes 5 when the above memory device is coupled to the memory device interface, then decoding j code 2, outputting the code_code to the memory device to release the memory device. The present invention provides a method for protecting the memory device. The switch has a switch, and the switch is opened to lock the read/write workbench b of the memory device. The protection method of the above memory device includes the following steps: · When the voltage is applied, the check device is in the anti-reading wire: If you are in the anti-read-write state, you need to start the password. If you want the memory device to be in a normal state, check if the switch is at the locked end. If the switch is located at the lock end, the protection unit in the memory device is enabled to prohibit reading or writing to the memory device. The invention adds a control circuit in the memory device, which can be based on the switch Perform the lock or write protection function of the memory control unit to achieve the function of reading and writing the memory device quickly. When the read/write function of the memory device is locked, the memory switch will not stand when the switch is switched to the normal end. • The function of unlocking must be released by a startup password, and it is effective to keep track of the “reliable fairy.” The above and other objects, features and advantages of the present invention are more apparent and easy to understand. The preferred embodiment of the present invention is described in detail below with reference to the accompanying drawings. [Embodiment] FIG. 1 is a schematic diagram of a memory device according to an embodiment of the present invention. The memory device 100 includes a memory unit lio, a memory control unit 120, a switch 130 and a control circuit 140. The body has a locking end 131 and a normal end 132, which can be switched by a user. The control circuit 140 is coupled to The switch 13 is connected to the unit control unit 12q: and depends on the position of the switch 13 (located at the lock end 131 or the normal 132) to determine whether the protection unit 121 is enabled. The memory unit 11 is read or written by the memory inhibiting control unit 120. The memory control unit 120 is responsible for reading and writing the internal memory of the memory unit u 7 7 23858 TW 〇 / c / n material and built-in protection list control unit 12 () ^ ^ 121 protection early 121 can make the memory into the quotation unit] 1f) \ or with Wei disabled to continue the external reading or writing control, although the switch 130 is switched to the locking end 131, connect the electronic device w When the operating voltage is received (for example, the memory device 100 is in this case, the mobile phone is enabled), the protection unit 121 is automatically enabled. It cannot be entered; the device is locked before being read, and the terminal 132 is Η! Action: If the switch 130 is switched to the normal state (2) to activate the password, the solution === then =: then = control unit 12. The read/write memory unit 2 will receive the action; and the control circuit _ also 13 °" change the position of the switch, the _ _ change the Lu, when the user changes the memory device just connected _ work Whether the worker 120 and the control circuit 140 locks the search 100. About: , Self-defeating action, and decided = 5 internal ports such as memory device 1〇. Built-in micro-machine: ΐ: interface 丄 = _, memory;; set (such as hand flat 兀 120 for functional expansion) real 23858twf.doc / n Now, in order to achieve the above effects, so do not repeat here. In this embodiment, the memory device 100 may be a secure digital memory card, a compact flash memory card or a multimedia card. In a general memory card (such as a secure digital memory card or a compact flash memory card) specification, its memory control unit 120 has a built-in LOCK command or an anti-write command 'usually composed of firmware. . The locking or anti-writing firmware is the protection unit 121 of the present embodiment. In another embodiment of the present invention, the protection unit 121 can also be designed by the designer to provide the required protection or hardware. The circuit is implemented, and is not limited to the protection instructions built into the specifications of the memory device 100 in the present invention. In other words, the protection unit 121 mentioned above may include a locking function and a writing prevention function. The control circuit 140 can select to perform a lock function or a write prevention function according to a preset value. The preset value can be set by the user as needed to select a form of data protection for the memory device 100. If the locking function of the protection unit 121 is enabled, the memory control unit 12 is prohibited from reading and writing the memory unit 110; if the anti-writing function of the protection unit 121 is enabled, only the memory control unit 120 is prohibited from writing to the memory unit no. . When the memory device 1 is locked, the memory control unit 12 will require the user to enter a startup password (e.g., 〇_) to release the lock-out read/write state). The boot password can be pre-set and stored in = or stored in a specific block of memory unit 110. °° In the above embodiment, the memory device 1 is written, however, the memory device card of the embodiment of the present invention may also be a hard disk or a (four) body player and a = 1328769 23858twf. The doc/n digital assistant has a built-in non-volatile memory device. Second Embodiment According to the first embodiment described above, a method of preventing tampering of the memory device 100 can be summarized, and the protection method thereof is explained as follows. 2 is a flow chart showing a method for protecting a device of the present invention according to an embodiment of the present invention. Referring to FIG. 1 and FIG. 2 at the same time, in step S210, first, when the memory device 100 receives the operating voltage, the memory control unit 120 first detects whether the protection unit 121 causes φ energy to check whether the memory device 100 is It is in read/write prevention state. If the protection unit 121 is enabled, indicating that the memory device 1 is in the read/write prevention state, step S220 is performed. If the protection unit 121 is not enabled, indicating that the memory device 100 is in the normal state, step S230 is performed. In step S220, the memory device 1 is in the read/write prevention state, and the memory device 1〇〇 is required to input a startup password to cancel the function of the protection unit 121 in the memory control unit 120, so that the memory device 1 is enabled. 〇〇Restore the status of normal reading and writing data. In step S23, that is, the memory device 1 is currently in a normal state, at this time, the control circuit 140 detects whether the switching on/off 130 is at the locked end. If the switch 1; 3 (M stands at the lock end 131', then step S24 is performed (3 if the control circuit 14 detects that the switch is at the normal end 132, then step S25 is performed. ^ In step S240, the switch is switched The 130 is located at the locking end 13 and the control circuit 140 activates the guard unit 121 in the memory control unit 12 to prohibit reading or writing to the memory device 1 and to the internal-p of the memory device 1 The data is protected. When the protection unit 121 is enabled, the memory device 1〇0 enters the anti-reading state. Next, step S220 asks to input the 1328769% 23858twf.doc/n dynamic password to unlock the memory device. In the anti-money, that is, the switch 13CH is set at the normal end ^., the state. In step S250, the internal data of the normal wire, the social material '= memory device touches the third f instance G device UK). From another point of view It is to be noted that the present invention provides a memory device as described above, as shown in FIG.
另-實施例之行動裝置之方塊圖/行動^3繪示為本發= 裝置介面310與解碼單元32〇 置300包括記憶 憶褒請鎖定所需的啟動密碼解; 32;ΪΓ^ 31〇 a,, 解碼早το 320自動輸出啟動密喝至記 記憶裝置100之防讀寫狀態。 置 乂解除 咖==實施例之行動裝置300與記憶裝置 綱’不僅增加記歸置_的資·護效果,同時也不會 造成錢者的不便。使聽僅需在行_置獅與記憶裝 置100設定對應的啟動密碼,行動裝置300即可自行解除 記憶裝置100的防讀寫狀態,而別的行動裝置卻需要輸入 啟動密碼才可以讀寫記憶裝置1〇〇。 綜上所述’本發明具有下列優點: (1 ) i S己彳,¾裝置接收到工作電壓時,即可自動鎖定記 憶裝置的讀寫功能,以達成自動鎖定記憶裝置的功效。 (2)當鎖定記憶裝置的讀寫功能後,無論切換開關再 切換至鎖定端或是正常端,此記憶裝置仍然處於防讀寫的 狀態,若欲解除鎖定記憶裝置的讀寫功能,必須透過啟動 11 23858twf.doc/n 抵碼來解除鎖定記憶裝 資料保護的作用。 方式來限制讀寫,可減少使用設備端子的 、顺構毁㈣問題,並可確實贿護資料。 進从機介㈣可執行鎖定功能。 限定本發明發實施例揭露如上,'然其並非用以 饤所屬技術領域具有通常知識者,在不脫 此’當可作些許之更動與满飾,因 準。之保濩视圍备視後附之申請專利範圍所界定者為 【圖式簡單說明】 圖1緣示為本發明實施例之記憶裝 圖2繪示為本發明實施例之記憶裝The block diagram/action of the mobile device of the other embodiment shows that the device interface 310 and the decoding unit 32 are provided with the activation password solution required to lock the memory device; 32; ΪΓ^ 31〇a , decoding early το 320 automatic output to start the secret drink to the memory device 100 anti-read and write status.乂 乂 咖 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Therefore, the mobile device 300 can automatically cancel the anti-reading state of the memory device 100, and the other mobile device needs to input the startup password to read and write the memory. Device 1〇〇. In summary, the present invention has the following advantages: (1) i S 彳, 3⁄4 device can automatically lock the reading and writing function of the memory device when receiving the working voltage, so as to achieve the effect of automatically locking the memory device. (2) After locking the read/write function of the memory device, the memory device is still in the state of anti-reading and writing regardless of whether the switch is switched to the lock end or the normal end. If the read/write function of the memory device is to be unlocked, it must be Start 11 23858twf.doc/n offset to unlock the memory protection data protection. Ways to limit reading and writing can reduce the problem of using device terminals, smashing (four) problems, and can indeed bribe data. Into the slave (4) can perform the lock function. The embodiments of the present invention are disclosed as above, and 'it is not intended to be used by those skilled in the art, and may be modified as appropriate. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a memory device according to an embodiment of the present invention. FIG. 2 is a memory device according to an embodiment of the present invention.
置的讀寫功能,藉此可有效地達成 置之示意圖。 置防護方法之流程 圖3繪示為本發明另一實施例之行動 【主要元件符號說明】. "方塊圖。 100 :記憶裝置 110 記憶單元 120 記憶體控制單元 121 防護單元 122 暫存器 130 切換開關 131 鎖定端 132 正常端 12 1328769 23858twf.doc/n 140 :控制電路 S210〜S250 :本發明實施例之記憶裝置之防護方法的 各步驟 300 :行動裝置 ' 310:記憶裝置介面 • 320 :解碼單元The read and write function is set, so that the schematic diagram can be effectively achieved. Flow of Protection Method FIG. 3 illustrates an action according to another embodiment of the present invention. [Main component symbol description]. 100: memory device 110 memory unit 120 memory control unit 121 guard unit 122 register 130 switch switch 131 lock terminal 132 normal terminal 12 1328769 23858twf.doc / n 140: control circuit S210 ~ S250: memory device of the embodiment of the present invention Step 300 of the protection method: mobile device '310: memory device interface • 320: decoding unit
1313