Andes Workshop

It is currently Thu Mar 28, 2024 5:53 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: 關於demo-int-c-ext的nmi_handler及warm_handler
PostPosted: Fri Nov 11, 2011 6:54 pm 
Offline
User avatar

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。


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group