User`s manual

RX62N Group, RX621 Group 4. Library Reference
4.2.7. Voltage Detection Circuit
1) R_LVD_Control
Synopsis
Configure the voltage detection circuit.
Prototype
bool R_LVD_Control(
uint8_t data
// Configuration selection
);
Description
Set the voltage detection configuration.
[data]
Set the voltage detection operation.
Detection configuration
PDL_LVD_VDET2_DISABLE_VDET1_DISABLE or
PDL_LVD_VDET2_DISABLE_VDET1_RESET or
PDL_LVD_VDET2_DISABLE_VDET1_INTERRUPT or
PDL_LVD_VDET2_RESET_VDET1_DISABLE or
PDL_LVD_VDET2_INTERRUPT_VDET1_DISABLE or
PDL_LVD_VDET2_INTERRUPT_VDET1_RESET
Select whether the detection of the
supply voltage V
CC
below levels
V
det2
and V
det1
is ignored, causes a
reset or generates an interrupt
request.
Return value
True if the parameter is valid; otherwise false.
Category
Voltage detection circuit
References
R_INTC_CreateExtInterrupt, R_INTC_GetExtInterruptStatus
Remarks
Use R_INTC_CreateExtInterrupt and R_INTC_GetExtInterruptStatus to monitor LVD interrupt
requests.
Program example
/* RPDL definitions */
#include "r_pdl_lvd.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func( void )
{
/* Generate an NMI when Vdet2 is reached; reset if Vdet1 is reached */
R_LVD_Control(
PDL_LVD_VDET2_INTERRUPT_VDET1_RESET
);
}
R20UT0084EE0112 Rev.1.12 Page 4-50
July. 16, 2014