cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Contributor II

Hello trying to implement some simple low power on a PRoC CYBLE-012011.

I get hibernate to work correctly, I go into hibernate and wake up on my active interrupt

Stop mode does not function wake up with Active Low on GPIO 2.2, what I am doing wrong on setup.

Here is the sleep code, uart output, schematic and bundle, please see what I have missed?

        DBG_PRINTF("\t\t\t\t Sleep Time is:  %d    \r", sleepTimer);

        if(sleepTimer == FALSE)

        {

            DBG_PRINT_TEXT("Enterng Stop mode \r");

            isr_1_Disable();

            isr_2_Disable();

            SW1_Sleep();

            SW2_Sleep();

            //CySysPmHibernate();

            CySysPmSetWakeupPolarity(CY_PM_STOP_WAKEUP_ACTIVE_LOW);

            CySysPmStop();

            CySysPmUnfreezeIo();

            SW1_Wakeup();

            SW2_Wakeup();

            isr_1_Enable();

            isr_2_Enable();

            sleepTimer = 0xff;

        }

As you can see from my screen shot of UART output, ISR3 is working, and in the design, ISR3 is GP(2.2).

pastedImage_1.png

Here is the schematic

pastedImage_2.png

0 Likes
Reply
1 Solution
Employee

Hi Herb,

  There is one mistake in your code snippet you shared. Since , wake up from stop mode is device reset and you need to put the API  CySysPmUnfreezeIo() at the start of main() function.

I attached a sample project as well for your reference.

-Gyan

View solution in original post

5 Replies
Employee

Hello Herb,

       Please make sure that the state of the WAKEUP pin is opposite to the wakeup polarity set by the API, then only the system will enter into stop mode.

   Please refer the below link for more details on stop mode configuration.

Place PSoC 4 BLE, PRoC BLE, and EZ-BLE Modules in Stop Mode - KBA218957

-Gyan

Contributor II

Gyan, please see the schematic, showing the wakeup pin with a 10K pull up, also the PIN is configured with an internal pull, probably not needed due to the enternal, I will try making the input Hiz Digital and test again.

In the code you see the instructions to set the wakeup low?

This should be working?

0 Likes
Reply
Employee

Hi Herb,

  There is one mistake in your code snippet you shared. Since , wake up from stop mode is device reset and you need to put the API  CySysPmUnfreezeIo() at the start of main() function.

I attached a sample project as well for your reference.

-Gyan

View solution in original post

Contributor II

Sorry Gyan, your advice is usually golden, but this did not work.  The device will wakeup from Hibernate, but not Stop?  Does not respond to the interrupt, never resets to main.

Herb

0 Likes
Reply
Employee

Hi Herb,

    I verified the Stop Mode functionality with the project ,I attached in my previous response. Could you please give a try with that project and see if you face any issue.

-Gyan

0 Likes
Reply