请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TM4C1294KCPDT 工具/软件:
尊敬的专家:
您能否提供几行将内核寄存器读取到变量的示例? 例如 SP 寄存器。
谢谢、
挂起。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:
尊敬的专家:
您能否提供几行将内核寄存器读取到变量的示例? 例如 SP 寄存器。
谢谢、
挂起。
您好 Hang、
请参阅以下示例。 SP 加载 R0指向的地址处的内容。 R0稍后会加载地址 APP_START_ADDRESS + 4处的值。
;;
;; Load the stack pointer from the application's vector table.
;;
movw r0, #(APP_START_ADDRESS & 0xffff)
movt r0, #(APP_START_ADDRESS >> 16)
ldr sp, [r0]
;;
;; Load the initial PC from the application's vector table and branch to
;; the application's entry point.
;;
ldr r0, [r0, #4]
bx r0