Constant LPCOMP wakeup from Hibernate

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

cross mob
euggersh
Level 5
Level 5
5 sign-ins First solution authored 50 replies posted

I have a project where I need to wake up from Hibernate if the device is connected to USB.  I have VBUS routed to a pin feeding a Low Power Comparator component with internal Vref.  This is a similar setup to example CE218129 - PSoC 6 MCU Wake up from Hibernate using a Low-Power Comparator.

pastedImage_1.png

In my code, I start the comparator and set the appropriate LPCOMP as a wakeup source:

LPCompVBUS_Start();

Cy_SysPm_SetHibernateWakeupSource((LPCompVBUS_CHANNEL == CY_LPCOMP_CHANNEL_0) ? CY_SYSPM_LPCOMP0_HIGH : CY_SYSPM_LPCOMP1_HIGH);

I've confirmed by reading the LPCOMP_STATUS register that the output value of the comparator correctly follows the state of the connection to USB.  However, when I call Cy_SysPm_Hibernate(), the system does go into Hibernate but always immediately wakes up regardless of the comparator output

How can I figure out what's going on here?

Thanks.

0 Likes
1 Solution

Eugene,

If you want to use the LPComp to wakeup the chip from hibernate, please use the dedicated pin to connect to the component(P6.2 plus, P5.6 negative).

Because in hibernate, if you use the DSI to route the signal, it will disconnect in hibernate mode.

View solution in original post

5 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

For further support, please offer us your test project.

0 Likes

What do you mean you guess?  I included my parameters right in my original post.  Can I get some support that doesn't involve guessing?

MichaelF_56​, is there somebody who can provide support for us on this issue?

0 Likes

I did make a mistake. The parameters you are using are correct.

In your original post, you said:

"However, when I call Cy_SysPm_Hibernate(), the system does go into Hibernate but always immediately wakes up regardless of the comparator output."

Questions:

Whether you try to test the function use the dedicated pin P6.2 or Pin5.6 ?

Which is the version of PDL you used (PDL 3.0.4 or PDL 3.1.0 or others)?

Could you share your test code here?

How do you decide the chip wake up from the hibernate instead of wake up all the time?

When you said the chip wake up immediately, how did you test it?

Do you use the CY kit board or your custom board?

Did you use other resource which can wakeup the chip from Hibernate?

0 Likes
  • P6.2 and P5.6 are being used for other purposes on our board
  • PDL 3.1.0
  • I can't share proprietary code in a public forum
  • I can see the chip go into Hibernate mode because it disconnects from the debugger, but it then starts up again and my blinking LED blinks.
  • By seeing it go into Hibernate mode and then seeing the LED blink after that.
  • Custom board
  • No.  Only the bit for LPCOMP1 is set
0 Likes

Eugene,

If you want to use the LPComp to wakeup the chip from hibernate, please use the dedicated pin to connect to the component(P6.2 plus, P5.6 negative).

Because in hibernate, if you use the DSI to route the signal, it will disconnect in hibernate mode.