Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > query regarding UART

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



query regarding UART
Moderator:
ARVI

Post Reply
Follow this topic



query regarding UART

mouni posted on 10 Jun 2011 12:29 AM PST
Member
5 Forum Posts

Hello
Good Afternoon!
I am Mounika. I am doing a project on power line communication using IC CY8CPLC20. I am using an RS232 to interface the board to the PC. When I transfer data it is being transmitted continuosly though I am resetting the buffer using the UART function UART_CmdReset (maybe because RX data buffer is not getting cleared.).
1. How do I clear RX data buffer register once I read it?
2. What is the difference between Rx data register and Rx data buffer register?
3. What exactly does UART_CmdReset function perform?
4. How to use the UART_bReadRxStatus function to monitor the UART_RX_REG_FULL bit of the RX Control register?
I am enclosing the code that I am using. Please do reply as soon as possible. It is urgent!
Thanking you,

Regards,
Mounika




Re: query regarding UART

mouni posted on 10 Jun 2011 12:32 AM PST
Member
5 Forum Posts

the code that I used is enclosed below

-Mounika



Re: query regarding UART

mouni posted on 10 Jun 2011 12:34 AM PST
Member
5 Forum Posts

sorry haven't been able to attach the code, it is as follows

#include <m8c.h>        // part specific constants and macros
#include "PSoCAPI.h"   // PSoC API definitions for all User Modules
#include "PWM8_1.h"
#include "UART_1.h"

void UART_1_Start(BYTE bParitySetting);
void PWM8_1_Start(void);
void UART_1_EnableInt(void);
void UART_1_CmdReset(void);
BYTE status;

void main(void)
{
    // M8C_EnableGInt ; // Uncomment this line to enable Global Interrupts
    PLT_Start();
    UART_1_IntCntl(UART_1_ENABLE_RX_INT);
    UART_1_Start(UART_PARITY_NONE);
    PWM8_1_Start();
   
    PLT_Memory_Array[Modem_Config]=(Modem_FSKBW_3M | Modem_BPS_2400);
    PLT_Memory_Array[TX_Gain]=0x03;
    PLT_Memory_Array[RX_Gain]=0x06;
    PLT_Memory_Array[Local_LA_LSB]=0x01;
    PLT_Memory_Array[PLC_Mode]=TX_Enable;
    PLT_Memory_Array[TX_CommandID]=CMD_SENDMSG;
    PLT_Memory_Array[TX_DA]=0x02;
    PLT_Memory_Array[TX_Message_Length]=0x01;
    PLT_AutoSetBIUThreshold();
   
    UART_1_CmdReset();
   
    while(1)
    {
   
       UART_1_CmdReset();
       status=UART_1_bReadRxStatus();
       status &=0x08;
       if(status==0x08)
       {
     
       PLT_Memory_Array[TX_Data]=UART_1_bReadRxData();
       PLT_SendMsg();
       UART_1_CmdReset();
       PLT_Poll();
           
       }
      
    }
}






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20