- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Solved! Go to Solution.
- Tags:
- psoc® 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For further support, please offer us your test project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.