UART malfunctioning after sleep

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

cross mob
Anonymous
Not applicable

 Hello,

   

In my application I am having an UART and it malfunctions, seems data get abuse after the system wakes up from sleep.

   

I am setting the UART to sleep before getting the device to Sleep mode and let it wake up after PSoC gets up from sleep and when UART communication is needed. Can somebody kindly advice on where I am doing wrong?

   

 

   

Thnaks in advance.

   

Anuradha

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

There are some calls for the clocks before and after sleep-mode, did you use them, too?

   

Can you post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file (do NOT use chrome, that still may not work).

   

 

   

Bob
 

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Dear Bob,

   

Thanks for replying.

   

The basic steps am following are as follows.

   

Source file attached for clarity.

   

////////////////////////////////////////////////////////////////////////////

   

/* ========================================
 *
 * Copyright YOUR COMPANY, THE YEAR
 * All Rights Reserved
 * UNPUBLISHED, LICENSED SOFTWARE.
 *
 * CONFIDENTIAL AND PROPRIETARY INFORMATION
 * WHICH IS THE PROPERTY OF your company.
 *
 * ========================================
*/
int main()
{
 /* Place your initialization/startup code here (e.g. MyInst_Start()) */
    int r1;
// Timer1_ISR_Start();
// Timer_1_Start();
   
  
 
 UART_1_Start(); // Initializes and enable UART
 
    CyGlobalIntEnable; // Enable global interrupts.
  
 
    for(;;)
    {
     /* Place your application code here. */
 

   

        UART_1_Sleep();
      
        CyPmSaveClocks();

   

       
   Pin_LED_Write(0);
        CyPmSleep(PM_SLEEP_TIME_CTW_4MS, PM_SLEEP_SRC_CTW);
        CyPmReadStatus(CY_PM_CTW_INT);

   

        Pin_LED_Write(1);

   

        CyPmRestoreClocks();
       
        UART_1_Wakeup();
 
        SendPackets(); // sends data packets on USART

   

  CyDelay(10); // 100 sps needed 10 ms delay
    }
}

   

//////////////////////////////////////////////////////////////////////////////////////////////////////////

   

Thanks.
-Anuradha

0 Likes
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

 Hi Anuradha,

   

 

   

Please let us know if your issues are resolved. If not please attach the complete project. I would like to know what is done inside the function SendPackets().

   

 

   

Cheers,

   

Hima

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

@HIMA, do you think the original poster is still watching this

   

thread after 4 months of no response ?

   

 

   

Regards, Dana.

0 Likes