1 Reply Latest reply on Nov 10, 2015 3:29 AM by AnWa_1259496

    Stop Mode


      Has anyone got the Stop Mode to work?


      I am not having any problem with CySysPmHibernate();, but CySysPmStop() seems problematic. The first problem is lack of documentation. There is sparse info in the datasheet and nothing in the register manual, plus non chip-specific info in the TRM.


      As far as I can make out, P2-2 is the pin which wakes from stop mode. But this does not respond if left as GPIO with interrupts enabled. I tried enabling "Chip specific DeepSleep source 0 connection" in HSIOM_PORT_SEL2 and this seems to do something.


      I dont know if this is active low or high or what, but happens is when this is pulled low the code seems to go haywire. It does not do a complete reset (Hibernate does) but acts as if the clocks have been messed up, just doing random stuff. 


      Is there any better information on this mode anywhere? What has to be done prior to entering with CySysPmStop();

        • 1. Re: Stop Mode

          Managed to unravel this in the end. It seems that the port 2.2 can be left as a GPIO pin when used as a wake from stop. The reason for everything going haywire after waking was the CySysPmStop() call contains a locking of the GPIOs. So the system resets and fires up and cant initialize any of the ports as they are locked, so they are as I left them before Stop, which is Hi-Z.


          So a CySysPmUnfreezeIo() needs be present in MAIN at the start of code.