Why does my program fall through CySysPmHibernate()?

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

cross mob
Anonymous
Not applicable

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?

0 Likes
1 Solution
Anonymous
Not applicable

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

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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();

0 Likes
Renate
Level 3
Level 3
25 replies posted 25 sign-ins 10 replies posted

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();

 

0 Likes