Andes Workshop

It is currently Tue Mar 19, 2024 7:05 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: 如何產生software interrupt?
PostPosted: Thu Feb 16, 2012 12:29 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
如何產生software interrupt?

You can reference demo-int under Andesight200MCU/demo/startup.
In interrupt.c of demo-int, the following statement can generate an SW interrupt.

Code:
void gen_swi()
{
    unsigned int int_pend;
    int_pend = __nds32__mfsr(NDS32_SR_INT_PEND);
    int_pend |= 0x10000;
    __nds32__mtsr(int_pend, NDS32_SR_INT_PEND);
    __nds32__dsb();
}


Last bumped by cindy on Thu Feb 16, 2012 12:29 pm.


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 1 guest


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