7 Replies Latest reply on Jul 3, 2018 10:29 PM by psyu

    CYBLE-224116 Deep Sleep consuming 1.3mA @ 3.3V

    user_460425683

      Hi,

       

      I am working with the CYBLE-224116 extended range PSoC4/BLE module.  The module works great, however I am having a problem getting it to sleep the way the other PSoC4 devices do. 

       

      With my other PSoC4 devices such as the CYBLE-014008, when I put the device into deep sleep, the power consumption follows the specification of 1.3uA. 

       

      With this new CYBLE-224116 module, I am seeing a current draw of about 1.3mA @ 3.3V.  The only components I have attached to this module is a red and blue LED on pins P1[0] and P0[1] and a 1uF capacitor on VREF to ground.   I will attach the project to this thread as well so you can see that as well.  Below is my main.c which I am using to evaluate the module's low power.  Any thoughts would be greatly appreciated. 

       

      Thanks.

       

      - Chris

       

      #include "project.h"

       

      #define CYREG_SRSS_TST_DDFT_CTRL 0x40030008

       

      int main(void)

      {

          // Variables

          uint8   intrStatus;

         

          // Enable interrupts

          CyGlobalIntEnable;

       

       

          // Turn on the red LED for startup

          LED_RED_Write(1);

          LED_BLUE_Write(0);

         

          // Startup code

          CyDelay(500);

         

          // Disable the PA/LNA

          CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLESS_RF_CONFIG), 0x0331);

          CY_SET_XTND_REG32((void CYFAR *)(CYREG_SRSS_TST_DDFT_CTRL), 0x80000302);   

          CSD_Write(0);

          CPS_Write(0);

         

          // Turn off the LEDs

          LED_RED_Write(0);

          LED_BLUE_Write(0);

       

       

          for(;;)

          {

              // Turn on the blue LED for 500 ms

              LED_BLUE_Write(1);

              CyDelay(500);

              LED_BLUE_Write(0);

             

              // Sleep the processor       

              intrStatus = CyEnterCriticalSection();

              CySysPmDeepSleep();

              CyExitCriticalSection(intrStatus);                 

          }

      }

        • 1. Re: CYBLE-224116 Deep Sleep consuming 1.3mA @ 3.3V
          bob.marlowe

          You need to disable debugging for the project to reduce current consumption. In "System" view change "Debug Select" to "GPIO".

           

          Bob

          • 2. Re: CYBLE-224116 Deep Sleep consuming 1.3mA @ 3.3V
            e.pratt_1639216

            Things that draw current while in deep-sleep mode:

            Pin outputs (depending on configuration)

            BLE peripheral

            Clocks (if running)

            WDT (almost unnoticeable from what I've seen empirically)

            ADC and other peripherals that may not have been put into "Sleep" mode for deep sleep.

            Debug selection (as bob.marlowe stated)

            1 of 1 people found this helpful
            • 3. Re: CYBLE-224116 Deep Sleep consuming 1.3mA @ 3.3V
              psyu

              Hello Chris,
                         
                                Before entering into the deep sleep mode please follow the below steps.
              1. You have to disable debugging for the project in order to reduce current consumption. In Design Wide Resources go to "system" view and change "Debug Select" to GPIO.
              2. In your program before entering into deep sleep mode you need to change the pins to high impedance mode through APIs as shown.
                    
                                LED_BLUE_SetDriveMode(Pin_DM_DIG_HIZ);
                                LED_RED_SetDriveMode(Pin_DM_DIG_HIZ);
                                CSD_SetDriveMode(Pin_DM_DIG_HIZ);
                                CPS_SetDriveMode(Pin_DM_DIG_HIZ);

              3. Before entering into deep sleep mode you need to stop ECO(External Crystal Oscillator) by using API CySysClkEcoStop().

               

              Capture1.PNG

               

               

               

              Thanks,

              PSYU.

              • 4. Re: CYBLE-224116 Deep Sleep consuming 1.3mA @ 3.3V
                user_460425683

                Thanks.  I will give these suggestions a try.

                • 5. Re: CYBLE-224116 Deep Sleep consuming 1.3mA @ 3.3V
                  user_460425683

                  Hi,

                   

                  No luck so far.  But there are some improvements.  I am now seeing a current draw of about 600uA.  Still a far cry from the documented sub-2uA, but certainly much better...

                   

                  I have tried setting the Debug Select to "GPIO" which has not resolved the issue. 

                   

                   

                  I have the build mode set to release in case that has any effect:

                   

                   

                  I am now setting the LED drive modes to:

                   

                       LED_BLUE_SetDriveMode(Pin_DM_DIG_HIZ);

                       LED_RED_SetDriveMode(Pin_DM_DIG_HIZ);

                   

                  I am setting the drive mode on the CPD and CPS pins to High-Z as well now.  I am not sure if this is contrary to what is required however.

                   

                       CSD_SetDriveMode(CSD_DM_DIG_HIZ);

                       CPS_SetDriveMode(CPS_DM_DIG_HIZ);

                   

                  I am disabling the ECO clock now before sleep.

                   

                       CySysClkEcoStop();

                   

                  Being that the LEDs are the only components on the board, I decided to remove it.  Oddly that has brought the power consumption to an acceptable 4uA.   I have never had an LED cause an issue like this before and it is the same circuit and components I use with other Cypress chips:

                   

                  GPIO ---- 330 Ohm resistor ---- Red LED ----- GND

                   

                  Any thoughts on that one?  I figured the High-Z mode would have resolved that issue.

                   

                  - Chris

                  • 6. Re: CYBLE-224116 Deep Sleep consuming 1.3mA @ 3.3V
                    user_460425683

                    Interestingly, it seems that when I place the LED drive pins into High-Z mode is when I see the higher current consumption.  If I leave them in Strong mode, the consumption is around 4uA.

                     

                    Operating them in Strong mode results in 4uA current draw when the LEDs are off. (GOOD)

                    Operating them in Pull up/down results in 4uA current draw when the LEDs are off. (GOOD)

                    Operating them in Open-Drain drives high results in > 300 uA in current draw when the LEDs are off. (BAD)

                    Operating them in Digital High-Z results in > 300 uA in current draw when the LEDs are off. (BAD)

                    Operating them in Analog High-Z results in 4uA current draw when the LEDs are off (GOOD)

                     

                    Any thoughts as to why this would be the case?

                     

                    Thanks.

                     

                    - Chris

                    • 7. Re: CYBLE-224116 Deep Sleep consuming 1.3mA @ 3.3V
                      psyu

                      Hello Chris,

                                        In case of Digital High-Z mode the pin has buffer which will be the cause for leakage current. Configuring all unused GPIOs to Analog HI-Z unless there is a specific reason to use a different drive mode will be the good practice.

                                        For more details of GPIO pins please refer PSoC® 4 and PSoC Analog Coprocessor – Using GPIO Pins.

                       

                      Thanks,

                      PSYU.