| Electronic Components Datasheet Search |
|
R5F3640MNFB Datasheet(PDF) 131 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
R5F3640MNFB Datasheet(HTML) 131 Page - Renesas Technology Corp |
|
131 / 398 page ![]() REJ09B0392-0064 Rev.0.64 Oct 12, 2007 Page 110 of 373 Under development Preliminary Specification Specification in this preliminary version is subject to change. M16C/64 Group 12. Interrupt 12.5.7 Saving Registers In the interrupt sequence, the FLG register and PC are saved to the stack. At this time, the 4 high-order bits of the PC and the 4 high-order (IPL) and 8 low-order bits in the FLG register, 16 bits in total, are saved to the stack first. Next, the 16 low-order bits of the PC are saved. Figure 12.7 shows the Stack Status Before and After Acceptance of Interrupt Request. The other necessary registers must be saved in a program at the beginning of the interrupt routine. Use the PUSHM instruction, and all registers except SP can be saved with a single instruction. Figure 12.7 Stack Status Before and After Acceptance of Interrupt Request The operation of saving registers carried out in the interrupt sequence is dependent on whether the SP (1), at the time of acceptance of an interrupt request, is even or odd. If the SP (1) is even, the FLG reg- ister and the PC are saved, 16 bits at a time. If odd, they are saved in two steps, 8 bits at a time. Figure 12.8 shows the Operation of Saving Register. NOTE: 1. When any INT instruction in software numbers 32 to 63 has been executed, this is the SP indi- cated by the U flag. Otherwise, it is the ISP. Figure 12.8 Operation of Saving Register Address Content of previous stack Stack [SP] SP value before interrupt request is accepted. m m - 1 m - 2 m - 3 m - 4 Stack status before interrupt request is acknowledged Stack status after interrupt request is acknowledged Content of previous stack m + 1 MSB LSB m m - 1 m - 2 m - 3 m - 4 Address FLGL Content of previous stack Stack FLGH PCH [SP] New SP value Content of previous stack m + 1 MSB LSB PCL PCM PCL : 8 low-order bits of PC PCM : 8 middle-order bits of PC PCH : 4 high-order bits of PC FLGL : 8 low-order bits of FLG FLGH : 4 high-order bits of FLG (2) SP contains odd number [SP] (Odd) [SP] - 1 (Even) [SP] - 2 (Odd) [SP] - 3 (Even) [SP] - 4 (Odd) [SP] - 5 (Even) Address Sequence in which order registers are saved (2) (1) Completed saving registers in four operations. (3) (4) (1) SP contains even number [SP] (Even) [SP] - 1 (Odd) [SP] - 2 (Even) [SP] - 3 (Odd) [SP] - 4 (Even) [SP] - 5 (Odd) NOTE : 1. [SP] denotes the initial value of the SP when interrupt request is acknowledged. After registers are saved, the SP content is [SP] minus 4. Address PCM Stack FLGL PCL Sequence in which order registers are saved (2) Saved simultaneously, all 16 bits (1) Saved simultaneously, all 16 bits Completed saving registers in two operations. PCM Stack FLGL PCL Saved, 8 bits at a time FLGH PCH FLGH PCH PCL : 8 low-order bits of PC PCM : 8 middle-order bits of PC PCH : 4 high-order bits of PC FLGL : 8 low-order bits of FLG FLGH : 4 high-order bits of FLG |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |