新唐開發(fā)平臺:進階使用者的七大訣竅 (3) 使用 System Viewer 檢查寄存器狀態(tài)
進階使用者的七大訣竅
使用 System Viewer 檢查寄存器狀態(tài)
適用情境
外設(shè)的動作非我預(yù)期,我想觀察寄存器的值是怎么變化的。
我想試著改變寄存器的值來看反應(yīng),一定要重新編譯再刻錄嗎?
除錯技巧
以Keil為例,System Viewer 是在除錯模式下用來觀察寄存器的的工具,非常實用。
實時監(jiān)控寄存器值 (框格變成綠色表示值有更新)。
直接在框格中修改值就可以暫時生效。



1. “Alt + F7” 打開 “Options for Target”并選擇“Target”頁面。
2. 檢查預(yù)設(shè)的SFR檔案與目標芯片是否相同。
若不同,勾選 “Use Custom File”可選擇其他檔案。

3. 進入除錯模式,在工具欄中選擇欲觀察的外設(shè)。有以下三種方式可開啟:Peripherals,圖示或 View。




編輯:zzy 最后修改時間:2021-12-28