Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Returning from Exception
PostPosted: Wed May 06, 2009 3:33 pm 
Offline

Joined: Wed May 06, 2009 2:01 pm
Posts: 2
Hello,

A return from IRQ or SVC is done with the commands:

SUBS PC, R14_irq, #4

and

MOVS PC, R14_svc

But I am puzzled by the way the processor know to return to usermode. Whats the magic that makes the processor change state ? .. according to the instruction set manual the commands copy the Link register to the PC - that makes the CPU jump, but not change mode ? - the S is supposed to change the 4 ALU bits.

Sincerely Per Hansen


Top
 Profile  
 
 Post subject: Re: Returning from Exception
PostPosted: Tue Oct 26, 2010 10:22 pm 
Offline

Joined: Mon Oct 25, 2010 5:48 pm
Posts: 3
Hi,

I'm also interested in this - did you ever get a resolution?

Thanks,


Top
 Profile  
 
 Post subject: Re: Returning from Exception
PostPosted: Wed Oct 27, 2010 4:17 pm 
Offline

Joined: Sat Oct 17, 2009 3:13 pm
Posts: 8
The current program status register (CPSR) is also restored (from the appropriate SPSR).

Bes regards

Crossware
http://www.crossware.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 23 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: