- A few details
- There are two kinds of returns:
-
RET
Return from subroutine.
The Program Counter is loaded with the return address (22 bit wide) read from the stack, and the Stack Pointer is incremented by 3.
-
RETI
The same as RET, but in addition sets the general interrupt flag (flag I in the Status Register).
Returns are the slowest instructions in the pAVR implementation of the AVR instruction set. They take 9 clocks.
First 2 clocks are spent while waiting the previous instructions to write the Unified Memory. Next 5 clocks, the Program Counter is read from the Unified Memory. In a future version, this part might take only 4 clocks. Finally, another 2 clocks are spent while bringing the target instruction into the instruction register.
Generated on Thu Mar 3 00:16:27 2005 for Pipelined AVR microcontroller (pAVR) by
1.3.9.1