AnsweredAssumed Answered

Lowering S32K148 Power Consumption using VLPS

Question asked by Stephan de Wit on Nov 29, 2017
Latest reply on Feb 24, 2020 by lei liu


I have a "toy" program that blinks an LED several times before going to sleep. No other peripherals are used. I want to lower the power consumption of the MCU by as much as possible while the MCU sleeps to match the datasheet. I am running on our target hardware that has flash chips and the like lifted to isolate the MCU.


The problem is that I cannot get the current consumption lower then 0.86mA @12V. As well I do not see a change in current consumption between STOP and VLPS modes, which suggests I am not actually running in VLPS.


I have read and followed AN5425 (Power Management for S32K14x) but still cannot get current consumption down to ~60 uA that is mentioned in the datasheet. The code is below.






#define STAT_RUN 0x01
#define STAT_STOP 0x02
#define STAT_VLPS 0x10


#define SMC_STOP 0U
#define SMC_VLPS 2U

void switch2Sleep()
    // Check Power Mode Status Register

    if (runMode != STAT_VLPS)
            // Set the SLEEPDEEP bit to enable deep sleep mode (STOP/VLPS)

            S32_SCB->SCR |= S32_SCB_SCR_SLEEPDEEP(1);


            // Power Mode Control Register


            // Disable system PLL clock
            SCG->SOSCCSR = 0;
            SCG->SPLLCSR = 0;


            // Wait For Interrupt: Cpu is going into deep sleep state


            systemClock_InitMedSpeed(); // configure to RUN mode at 80 MHz


void main(void)
    systemClock_InitMedSpeed(); // configure to RUN mode at 80 MHz


    SMC->PMPROT = 0xA0; // Allow high speed run & Allow Very-Low-Power Modes

    // Ensure disable of fast/slow internal reference clock
    SCG->FIRCCSR = 0;
    SCG->SIRCCSR = 0;


    // Enable Port E4 as output BLUE LED
    PTE->PDDR |= (1 << 4);
    PORTE->PCR[4] = 0x00000100;


    // This bit disables the bias currents and reference voltages for some clock modules in order to further
    // reduce power consumption in VLPS mode.


    // wait several seconds so the LED blinks

    PTE->PSOR |= (1 << 4); /* Blue led off */

    // Disable port E prior to sleeping




    // never actually get here...

    PTE->PCOR |= (1 << 4); /* Blue led on */