Joined: Fri Mar 04, 2011 9:36 pm Posts: 500
|
demo-int-c-ext中的下面這個function,nmi_handler及warm_handler的流程會不會執行reset_handler的內容?
void __attribute__ ((reset("vectors=7;nmi_func=nmi_handler;warm_func=nmi_handler"))) reset_handler(void) { __cpu_init(); __c_init(); __soc_init(); main(); }
在Programming guide的Page 56介紹了int nmi_func(int *reg_ptr)的函式定義, 它寫 Return Value: 0 means OK to resume the work before NMI happens. -1 means fail and the prologue of reset handler will reset the system. It is also OK to hold the control and never return to the reset handler.
也就是user能自訂是否它要執行reset_handler是否要執行reset_handler的內容。 回0則不需要。回-1則會執行reset_handler。
|
|