Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

why a 8051 interrupt following RETI instruction can't be excuted immediately?

Status
Not open for further replies.

Jasper Chow

Junior Member level 3
Joined
Nov 14, 2013
Messages
26
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
218
By the keil's specification of 8051 instruction set,
"...If another interrupt was pending when the RETI instruction is executed, one instruction at the return address is executed before the pending interrupt is processed.''
The atmel 8051 hardware mannual also states, a long jump action triggered by an interrupt can only occur when the the prior instruction is the final cycle of an instruction other than REIT.
I don't understand why cpu needs to do an extra instruction after RETI before starting another interrrupt.
 

It probably makes the logic simpler. To handle a new interrupt directly would be a special case. It is also useful for implementing single-step functionality.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top