Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Set TCPWM to DeepSleep with CY8CKIT-145-40XX

YoIs_1298666
Level 5
Level 5
250 sign-ins 100 replies posted 100 sign-ins

Hello,

You need the following code to stop TCPWM, enter DeepSleep, then wake up with the wakeup event and restart TCPWM.

    PWM_Sleep();
    CySysPmDeepSleep();

    PWM_Wakeup();

However, if you use CY8CKIT-145-40XX to blink LED4 (P2_0) with PWM and set it to DeepSleep, you can see that the DeepSleep current is large. If you do the following, the Deep Sleep current will be the specified value.

    PWM_Sleep();
    Pin_LED4_SetDriveMode(Pin_LED4_DM_ALG_HIZ);
    CySysPmDeepSleep();

    Pin_LED4_SetDriveMode(Pin_LED4_DM_STRONG);
    PWM_Wakeup();
Alternatively, in the case of LED4 (P2_0), the above cord may not be necessary if a pull-up resistor is connected externally.

[Preparation for operation]

    You need to prepare a tact switch and add it to P0_0 to connect.

YoIs_1298666_0-1616137670218.png

[How to operate this project]

     When you program and press SW1 (RST), LED4 (P2_0) is blinking.

    1. You can push SW2 (P0_7) to stop TCPWM and put it in the Deep Sleep state.

    2.It wakes up by pressing the tact switch (P0_0). And TCPWM will start working.

 

Best regards,

Yocchi

 

0 Likes
1 Reply
Rakshith
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hi Yocchi-san, 

Thank you very much for sharing your findings and project with the community 🙂

Thanks and Regards,
Rakshith M B
0 Likes