This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2538: How to config to cc2538 enter sleep mode 2 or sleep mode 3

Part Number: CC2538

Hi everyone,

I'm working on CC2538 and I have a problem about Low Power Mode

1. I'm try to run CC2538 enter sleep mode 2 using source code sleepmode.c in cc2538_foundation_firmware_1_0_1_0

2. to measure current, I removed jump P403, P404, P405  and Measure the power consumption on on SmartRF06 EB

3. the result (~6mA) was higher than datasheet (~1.6uA)

Besides, if I call function SysCtrlDeepSleep() then cc2538 enter sleep mode, but  measurement current about 0.5mA

I think, I have not yet put CC2538 enter sleep mode successed.

Could anyone help me with this problem?

Sorry about my English not good.

thanks.

  • Can you take a picture to show me how you measure current consumption on SmartRF06?
  • Please take a look at the following post:

    e2e.ti.com/.../369843

    BR

    Siri
  • Hi YiKai Chen,

    This is a photo and Source code that I used.

    {
        uint32_t ui32Val;
      
        //
        // Set the clocking to run directly from the external crystal/oscillator.
        // (no ext 32k osc, no internal osc)
        //
        SysCtrlClockSet(false, false, SYS_CTRL_SYSDIV_32MHZ);
    
        //
        // Set IO clock to the same as system clock
        //
        SysCtrlIOClockSet(SYS_CTRL_SYSDIV_32MHZ);
       
        //
        // Set up the serial console to use for displaying messages.  This is
        // just for this example program and is not needed for SSI operation.
        //
        InitConsole();
        
        //
        // Display the setup on the console.
        //
        UARTprintf("Sleepmode timer\n");
    
        //
        // Disable UART0 when in deep sleep
        //
        SysCtrlPeripheralDeepSleepDisable(SYS_CTRL_PERIPH_UART0);
        
        //
        // Let system enter powermode 2 when going to deep sleep
        //
        SysCtrlPowerModeSet(SYS_CTRL_PM_2);
    
        //
        // Enable the Sleep Timer wakeup
        //
        GPIOIntWakeupEnable(GPIO_IWE_SM_TIMER); 
    
        //
        // Enable sleep mode interrupt
        //
        IntEnable(INT_SMTIM);
        
        //
        // Set timer to 10000 above current value
        //
        ui32Val = SleepModeTimerCountGet();
        SleepModeTimerCompareSet(ui32Val + 10000);
    
        //
        // Display the timer value on the console.
        //
        UARTprintf("Timer val = %d\n", ui32Val);
        
        //
        // Wait for UART to be flushed
        //
        while(UARTBusy(UART0_BASE))
        {
        }
        //
        // Go to sleep
        //
        SysCtrlDeepSleep();
    
        //
        // Display the timer value on the console.
        //    
        ui32Val = SleepModeTimerCountGet();
        UARTprintf("Timer val = %d (after wakeup)\n", ui32Val);
        
        //
        // Done - enter an infinite loop.
        //
        while(1)
        {
        }
    }

  • I did as post but not run. you can see in my reply to Yikai Chen

  • I see you don’t remove P408. If you remove it and measure again, does it work?
  • Yes, i removed P408 and result not change
  • Do you change anything on original example?
  • I run source code example and not change than original.
    I run source code sleepmode.c in cc2538_foundation_firmware_1_0_1_0
  • If you look at the code the chip enters sleep for a given amount time, then prints the timer value and then goes into an infinite while loop. 

    In other words, the device typically is in deep sleep for only the amount of time the SysCtrlDeepSleep() is active (10000 ticks). You can try a much longer time and/ or add a loop in the code where you use SysCtrlDeepSleep(), light a LED when you are out out sleep, turn off the LED and call SysCtrlDeepSleep() again. Then it's easier to see that you are in the wanted state when you do your current measurement.