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.
 

std_match

Advanced Member level 4
Joined
Jul 9, 2010
Messages
1,187
Helped
444
Reputation
888
Reaction score
409
Trophy points
1,363
Location
Sweden
Activity points
9,163
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top