CY5677 DeepSleep after Windows Reboot

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

cross mob
Anonymous
Not applicable

When I have pluged in my CY5677 at Windows reboot, it falls into a DeepSleep mode and is irresponsive. No reply on the com port. "Unsupported device" in CySmart tool.

   

The only way I have found to get out of this state is to plug out/in the dongle.

   

When I do debugging in this state, the program continues in the CySysPmDeepSleep(void) routine after this line:

   
/* Sleep and wait for interrupt */  CY_PM_WFI;
   

I can discover trough state LED, that first, when I power up the windows machine, the dongle is in a ready/working state and then while startup comes into this state.

   

Any idea, how I can wake up the dongle from that state?

   

(I am using the official CY5677 firmware, BLE_4_2_Dongle_CySmart_256k.cydsn)

0 Likes
5 Replies
Anonymous
Not applicable

By any-chance, did you change the original firmware of the dongle? Also, which is the project you are testing on the Peer device (e.g. - -042 BLE Kit)?

0 Likes
Anonymous
Not applicable

On the peer I have CySmart 1.2 as well as a self written software.

   

Happens with original firmware. I also have a modified firmware for debug purposes with the led.

   

I think the issue is, that the serial driver/communication breaks, if windows goes into hypernate state while the serial connection is open.

0 Likes
Anonymous
Not applicable

It turns out that by default Windows does not reboot but hybernate when you tell it to reboot. The dongle is not properly handling the suspend/hybernate/resume cycle in Windows 7.

   

In:

   
* Project Name      : BLE_Dongle_CySmart  * File Name         : main.c * Version           : 1.2 * Software Used     : PSoC Creator 3.3 SP1 * Compiler          : ARM GCC 4.9.3, ARM MDK Generic * Related Hardware  : CY5670 CySmart USB Dongle  ...  CY_ISR(Suspend_Cmd_ISR) {     /* Toggle USB suspend state - this interrupt occurs for both suspend and resume commands */     dongleSuspend = !dongleSuspend;     Pin_SuspendIndicator_ClearInterrupt(); }  The toggle function will make the dongle to fall into deep sleep while he should wake up while ResumeSuspend.
   

This issue you will experience, when you hybernate your pc while CySmart 1.2 is running:

   

   

Pic1: CySmart Hanging after hybernate state, dongle is still "visible"

   

   

Pic 2: CySmart Error after hyperbnate / attempt to reconnect

   

   

Pic 3: After CySmart restart, dongle is no longer recognized

   

   

   

0 Likes
Anonymous
Not applicable

One solution is to ignore dongleSuspend in main():

   

 

   
        /* Check If suspend command has occurred */         // never suspend         //if(dongleSuspend)         if(false) 
   

The disadvantage of this is:

   
        
  1. You have to do a firmware update on the dongles
  2.     
  3. The USB suspend is no longer handled
  4.    
0 Likes
Anonymous
Not applicable

The 2nd issue is that the serial infrastructure/driver seems not to handle the suspend/hibernate properly at all, even with modified firmware.

   

My software is surviving the suspend/resume only, when it closes the serial connection on suspend and reopens/reinitializes the dongle on resume.

   

Otherwise the COM port is still there after a suspend/resume, but the software gets no more reply from the dongle.

0 Likes