Atmel website | ARM Community | AVR freaks | Technical Support
Banner
Welcome to AT91SAM Community Forum
http://www.at91.com/samphpbb/

Returning from Exception
http://www.at91.com/samphpbb/viewtopic.php?f=15&t=13569
Page 1 of 1

Author:  per.h [ Wed May 06, 2009 3:33 pm ]
Post subject:  Returning from Exception

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

Author:  wzinet [ Tue Oct 26, 2010 10:22 pm ]
Post subject:  Re: Returning from Exception

Hi,

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

Thanks,

Author:  Crossware [ Wed Oct 27, 2010 4:17 pm ]
Post subject:  Re: Returning from Exception

The current program status register (CPSR) is also restored (from the appropriate SPSR).

Bes regards

Crossware
http://www.crossware.com

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/