8 SUPPLY VOLTAGE DETECTOR (SVD)
S1C17F13 TeChniCal Manual
Seiko epson Corporation
8-3
(Rev. 1.0)
Clock Supply in DEBUG Mode
8.3.3
The CLK_SVD supply during DEBUG mode should be controlled using the SVDCLK.DBRUN bit.
The CLK_SVD supply to SVD is suspended when the CPU enters DEBUG mode if the SVDCLK.DBRUN bit =
0. After the CPU returns to normal mode, the CLK_SVD supply resumes. Although SVD stops operating when the
CLK_SVD supply is suspended, the registers retain the status before DEBUG mode was entered.
If the SVDCLK.DBRUN bit = 1, the CLK_SVD supply is not suspended and SVD will keep operating in DEBUG
mode.
Operations
8.4
SVD Control
8.4.1
Starting detection
SVD should be initialized and activated with the procedure listed below.
1. Write 0x0096 to the MSCPROT.PROT[15:0] bits. (Remove system protection)
2. Configure the operating clock using the SVDCLK.CLKSRC[1:0] and SVDCLK.CLKDIV[2:0] bits.
3. Set the following SVDCTL register bits:
- SVDCTL.VDSEL bit
(Select detection voltage (V
DD
or EXSVD))
- SVDCTL.SVDSC[1:0] bits
(Set low power supply voltage detection counter)
- SVDCTL.SVDC[4:0] bits
(Set comparison voltage)
- SVDCTL.SVDRE[3:0] bits
(Select reset/interrupt mode)
- SVDCTL.SVDMD[1:0] bits
(Set intermittent operation mode)
4. Set the following bits when using the interrupt:
- Write 1 to the SVDINTF.SVDIF bit.
(Clear interrupt flag)
- Set the SVDINTE.SDVIE bit to 1.
(Enable SVD interrupt)
5. Set the SVDCTL.MODEN bit to 1.
(Enable SVD detection)
6. Write a value other than 0x0096 to the MSCPROT.PROT[15:0] bits. (Set system protection)
Terminating detection
Follow the procedure shown below to stop SVD operation.
1. Write 0x0096 to the MSCPROT.PROT[15:0] bits. (Remove system protection)
2. Write 0 to the SVDCTL.MODEN bit.
(Disable SVD detection)
3. Write a value other than 0x0096 to the MSCPROT.PROT[15:0] bits. (Set system protection)
Reading detection results
The following two detection results can be obtained by reading the SVDINTF.SVDDT bit:
• Power supply voltage (V
DD
or EXSVD)
≥
Comparison voltage when SVDINTF.SVDDT bit = 0
• Power supply voltage (V
DD
or EXSVD) < Comparison voltage when SVDINTF.SVDDT bit = 1
Before reading the SVDINTF.SVDDT bit, wait for at least SVD circuit enable response time after 1 is written
to the SVDCTL.MODEN bit (refer to “Supply Voltage Detector Characteristics, SVD circuit enable response
time t
SVDEN
” in the “Electrical Characteristics” chapter).
After the SVDCTL.SVDC[4:0] bits setting value is altered to change the comparison voltage when the
SVDCTL.MODEN bit = 1, wait for at least SVD circuit response time before reading the SVDINTF.SVDDT
bit (refer to “Supply Voltage Detector Characteristics, SVD circuit response time t
SVD
” in the “Electrical Char-
acteristics” chapter).