EasyManuals Logo
Home>Renesas>Computer Hardware>RL78 Series

Renesas RL78 Series User Manual

Renesas RL78 Series
1879 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1628 background imageLoading...
Page #1628 background image
RL78/F13, F14 CHAPTER 27 SAFETY FUNCTIONS
R01UH0368EJ0210 Rev.2.10 1596
Dec 10, 2015
27.3.4 CPU stack pointer monitor function
The CPU stack pointer monitor is used to detect overflows and underflows of the stack pointer and to generate interrupts
in response.
Caution The CPU stack pointer monitor function is disabled during on-chip debugging.
<Configuration>
This function has the following functions.
SP overflow/underflow detection function
SP overflow/underflow interrupt output function
When the SPM enable bit (SPMEN) is 1, an interrupt signal (INTSPM) is generated if the monitored stack pointer value
is greater than the specified SFR value (SPOFR) or smaller than the specified SFR value (SPUFR).
When the SPM enable bit (SPMEN) is 1, writing to the SPOFR and SPUFR registers is invalid.
<Register setting method>
Figure 27-14 shows the register setting method of this function.
Figure 27-14. Register Setting Flow
[Standard usage]
1. Write the initial value to the SPOFR and SPUFR registers.
2. Set the SPMEN bit in the SPMCTRL register.
<Control register>
Register Name Description Access Size
SPMCTRL SPM control register 8 bits
SPOFR SP overflow address setting register 16 bits
SPUFR SP underflow address setting register 16 bits
Remarks 1. If the overflow or underflow state is retained, another overflow or underflow will not be detected. After an
overflow or underflow was detected, reset the stack pointer to a value within the range of monitoring.
2. If an overflow or underflow interrupt request is received, the value obtained by subtracting 4 from the current
value of the stack pointer is always used for saving the interrupt.
<R>

Table of Contents

Other manuals for Renesas RL78 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas RL78 Series and is the answer not in the manual?

Renesas RL78 Series Specifications

General IconGeneral
BrandRenesas
ModelRL78 Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals