實現(xiàn)MAXQ2000微控制器的JTAG加載主機
對于其他的MAXQ啟動加載程序,MAXQ2000啟動加載程序提供的命令被劃分成從0到15的命令集。每一命令以命令字節(jié)開始,它包括命令集(前四個比特)以及命令專用數(shù)(后四個比特),如表5所示。作為一般規(guī)則,命令集0的命令本質上用于提供信息,所有器件均采用它;其他命令集可選。為確定某一MAXQ器件支持的命令集,請參考器件文檔。命令集0的命令05h (獲得支持的命令)返回一個位掩碼,說明啟動加載程序支持的其他命令集。
MAXQ2000支持以下的啟動加載程序命令集。
- 命令集0—信息和狀態(tài)。該集的命令可用于獲得MAXQ器件的基本信息,包括ROM/啟動加載程序的標識和版本,最近命令的結果(狀態(tài)碼),程序和數(shù)據(jù)存儲器的容量等。該集還包括主機擦除命令,清除器件所有的程序和數(shù)據(jù)存儲器。
- 命令集1—裝入可變長度。該集中的這一命令可用于裝入程序(閃存)或者數(shù)據(jù)(RAM)存儲器。
- 命令集2—卸載可變長度。該集中的這一命令可用于讀取程序或者數(shù)據(jù)存儲器的內容。
- 命令集3—CRC可變長度。該集中的這一命令可用于獲得對某一范圍程序或者數(shù)據(jù)存儲器計算得到的CRC-16值。
- 命令集4—驗證可變長度。該集中的這一命令可用于驗證某一范圍的程序或者數(shù)據(jù)存儲器是否和JTAG主機提供的數(shù)據(jù)匹配。
- 命令集5—裝入和驗證可變長度。該集中的這一命令在一個命令中結合了裝入和驗證命令的功能。
- 命令集6—擦除可變長度。對于MAXQ2000,該命令可用于把數(shù)據(jù)RAM中的某一區(qū)域清零。
- 命令集7—擦除固定長度。對于MAXQ2000,該命令可用于擦除閃存程序存儲器中的每一頁面,而不必利用主機擦除命令將所有閃存一次擦除。
表5. MAXQ加載程序命令集
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 | Code | Family/Command |
0 | 0 | 0 | 0 | x | x | x | x | 0 x h | Family 0—Informational Commands |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 00h | No Operation |
0 | 0 | 0 | 1 | 01h | Exit Loader | ||||
0 | 0 | 1 | 0 | 02h | Master Erase | ||||
0 | 0 | 1 | 1 | 03h | Password Match | ||||
0 | 1 | 0 | 0 | 04h | Get Status | ||||
0 | 1 | 0 | 1 | 05h | Get Supported Commands | ||||
0 | 1 | 1 | 0 | 06h | Get Code Memory Size | ||||
0 | 1 | 1 | 1 | 07h | Get Data Memory Size | ||||
1 | 0 | 0 | 0 | 08h | Get Loader Version | ||||
1 | 0 | 0 | 1 | 09h | Get Utility ROM Version | ||||
1 | 0 | 1 | 0 | 0Ah | Set Word/Byte Access Mode | ||||
1 | 1 | 0 | 1 | 0Dh | Get ID Information | ||||
0 | 0 | 0 | 1 | x | x | x | x | 1 x h | Family 1—Variable-Length Load |
0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 10h | Load Code Variable Length |
0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 11h | Load Data Variable Length |
0 | 0 | 1 | 0 | x | x | x | x | 2 x h | Family 2—Variable-Length Dump |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 20h | Dump Code Variable Length |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 21h | Dump Data Variable Length |
0 | 0 | 1 | 1 | x | x | x | x | 3 x h | Family 3—Variable-Length CRC |
0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 30h | CRC Code Variable Length |
0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 31h | CRC Data Variable Length |
0 | 1 | 0 | 0 | x | x | x | x | 4 x h | Family 4—Variable-Length Verify |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 40h | Verify Code Variable Length |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 41h | Verify Data Variable Length |
0 | 1 | 0 | 1 | x | x | x | x | 5 x h | Family 5—Variable-Length Load and Verify |
0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 50h | Load/Verify Code Variable Length |
0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 51h | Load/Verify Data Variable Length |
0 | 1 | 1 | 0 | x | x | x | x | 6 x h | Family 6—Variable-Length Erase |
0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 60h | Erase Code Variable Length |
0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 61h | Erase Data Variable Length |
0 | 1 | 1 | 1 | x | x | x | x | 7 x h | Family 7—Reserved (for expansion) |
1 | 0 | 0 | 0 | x | x | x | x | 8 x h | Family 8—Reserved (for expansion) |
1 | 0 | 0 | 1 | x | x | x | x | 9 x h | Family 9—Fixed-Length Load |
1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 90h | Load Code Fixed Length |
1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 91h | Load Data Fixed Length |
1 | 0 | 1 | 0 | x | x | x | x | A x h | Family A —Fixed-Length Dump |
1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | A0h | Dump Code Fixed Length |
1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | A1h | Dump Data Fixed Length |
1 | 0 | 1 | 1 | x | x | x | x | B x h | Family B—Fixed-Length CRC |
1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | B0h | CRC Code Fixed Length |
1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | B1h | CRC Data Fixed Length |
1 |
相關推薦技術專區(qū) |
評論