- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The documentation says that waking up a hibernating CPU will reset it from the beginning. But I have observed several times that code that follows the call to CySysPmHibernate()
, for example turn on a LED, is actually reached.
Can the CySysPmHibernate()
function fail to put the CPU into hibernate?
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The CySysPmHibernate API always forces the CPU to go into hibernate and the wakeup is through GPIO Interrupt. The wakeup actually results in a reset.
Can you please debug your code to see if it is going somewhere else?
Regards,
- Madhu Sudhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The CySysPmHibernate API always forces the CPU to go into hibernate and the wakeup is through GPIO Interrupt. The wakeup actually results in a reset.
Can you please debug your code to see if it is going somewhere else?
Regards,
- Madhu Sudhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The blue LED is lid for 10 s before restarting program. It does not happen often, and I don't know what triggering it (maybe debugging):
// hibernate
CySysPmHibernate();
// (the program actually slips through here)
// blue LED on for 10 s
Pin_LED_blue_Write( 0xff );
CyDelay( 10 * 1000 );
// prevent hang at end of 'void Start_c(void)'
CySoftwareReset();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An oldy, but goody. I see this happening too.
CySysPmHibernate();
DBG_PRINTF("Blew through hibernate\n");
while((UART_SpiUartGetTxBufferSize() + UART_GET_TX_FIFO_SR_VALID) != 0);
CySoftwareReset();