Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

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
Expert II

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
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

 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
Esteemed Contributor

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

   

thread after 4 months of no response ?

   

 

   

Regards, Dana.

0 Likes