Hi team,
I have been using RX111 (R5F5111AxFM) in a custom board, its been put to sleep in a regular interval with wake to interrupt using external IrQ and MTU (using the input capture interrupts).All the codes for sleep and other peripherals are generated using smart configuration using e2 studio.I've observed the current to be around 8mA in average during the sleep which too high. The interrupt pins are changed from interrupts to normal GPIOs after waking up from sleep.Is there any commands that we need to send to put it to low speed without loosing the MTU and interrupts.Heres what I do to put it to sleep,
R_Config_S12AD0_Stop(); //Stop A/D conversion(adcon0 bit 6)
R_Config_SCI5_Stop();
R_Systeminit();
IWDT.IWDTCSTPR.BIT.SLCSTP = 1U;
R_Config_LPC_ChangeOperatingPowerControl(LOW_SPEED);
R_Config_LPC_ChangeSleepModeReturnClock(RETURN_MAIN_CLOCK);
R_Config_ICU_IRQ4_Stop();
R_Config_MTU1_Stop();
R_Config_MTU3_Stop();
R_Config_MTU4_Stop();
R_Config_ICU_IRQ4_Start();
R_Config_MTU1_Start();
R_Config_MTU3_Start();
R_Config_MTU4_Start();
R_Config_CMT0_Stop();
IR(MTU1,TGIA1)= 0U;
IR(MTU3,TGIB3)= 0U;
IR(MTU3,TGID3)= 0U;
IR(MTU4,TGIA4)= 0U;
R_Config_LPC_DeepSleep();
// R_Config_LPC_Sleep();
// R_Config_LPC_SoftwareStandby();
R_Config_CMT0_Start();
R_Config_S12AD0_Start(); //Start A/D conversion
R_Config_IWDT_Restart();The MTU settings,The Low power mode settings,Clock settings,
The Irq are connected to swithces which are driven through other GPIO set as output in High,Please suggest changes so that I can get minimum Sleep current.Feel free to ask any other questions for more clarity on question
Hello,You could advise this app note.A good practice to reduce the power consumption is to stop unused clocks or change the division ratio of the used ones. Thank you,Panos
Note the statement from the hardware U/M of the RX111:
In deep sleep mode, the CPU and the DTC, ROM, and RAM clocks stop. Peripheral functions do not stop.
Typically excess current draw would be due to undesired peripheral activity, or undesired switching that occurs on I/O pins. As such, the recommendations would include:
- clocking necessary peripherals with a slow clock
- disabling peripherals not used during the low-power mode
- configuring unused I/O as outputs and driving them low or high depending on which state would use the least amount of current on the corresponding hardware circuit