User`s manual
RX62N Group, RX621 Group 4. Library Reference
2) R_LPC_Control
Synopsis
Select a low power consumption mode.
Prototype
bool R_LPC_Control(
uint16_t data
// Mode selection
);
Description
Transition to one of the low power modes.
[data]
Control selection. All selections are optional. The default settings are shown in bold.
If multiple selections are required, use "|" to separate each selection.
•
Mode selection
PDL_LPC_MODE_SLEEP or
PDL_LPC_MODE_ALL_MODULE_CLOCK_STOP or
PDL_LPC_MODE_SOFTWARE_STANDBY or
PDL_LPC_MODE_DEEP_SOFTWARE_STANDBY
Select the mode to be entered.
•
All-module clock stop cancellation modification
PDL_LPC_TMR_OFF or
PDL_LPC_TMR_UNIT_0 or
PDL_LPC_TMR_UNIT_1 or
PDL_LPC_TMR_BOTH
Select whether the TMR units can be
used to exit from All-module clock stop
mode.
•
I/O port retention cancellation
PDL_LPC_IO_RELEASE
Cancel the retention of I/O port pin states.
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
LPC
References
R_LPC_Create
Remarks
•
Sleep mode is utilised by some peripheral drivers to turn off the CPU when required.
•
When entering software standby or deep software standby mode, the oscillation stop detection
function is disabled. The detection is re-enabled if software standby mode is interrupted.
•
On exit from deep software standby mode, the MCU is reset.
•
The peripheral Create functions bring modules out of the clock-stop state as required.
The peripheral Destroy functions put modules into the clock-stop state as required.
When All Module Clock-Stop mode is cancelled, the peripherals that were active when that
mode was entered will be re-activated.
Program example
/* RPDL definitions */
#include "r_pdl_lpc.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func( void )
{
/* Enter deep software standby mode */
R_LPC_Control(
PDL_LPC_MODE_DEEP_SOFTWARE_STANDBY
);
/* Clear the I/O port state retention */
R_LPC_Control(
PDL_LPC_IO_RELEASE
);
}
R20UT0084EE0112 Rev.1.12 Page 4-46
July. 16, 2014