2 Replies Latest reply on Jun 27, 2016 9:40 AM by user_476342941

    Psoc5lp sleep issues

    user_476342941

      I'm having issues with sleep mode and wake from PICU.  This is what is supposed to happen:  I press a button on the device which rotates a part, takes some measurements and when the part returns to the start position the device enters sleep until the button is pressed again, where it repeats the above. 

         

      Before I enter CyPmSleep() I sleep all my components, and disable (and clear) their interrupts, then save the clock, enter sleep and restore the clock. 

         

      What I'm noticing is that even after the interrupts have been disabled and cleared the device appears to wake from sleep to service an interrupt.  I tried not starting that particular interrupt, but then I would just wake and service a different interrupt.

         

      Another strange thing is that if I press the button to wake from sleep, nothing appears to happen on the board unless I manually single step the code through the "wake" process in cyPm.c

         

      The sleep and wake code can be found in oakUtilities.c, minimal package attached.