10 Replies Latest reply on Oct 20, 2015 3:35 AM by keerthi.gowda

    HELP in handling UART Rx interrupt and One wire component

    prashant.deshmukh

      Hi,

         

      In one of my project while programing Psoc4 device , I am facing issue with the UART Rx interrupt.

         

      In UART component I have set the size of the UART Rx and Tx buffer to 64. hence i will have to access only the internal Rx interupt (I have selected the Rx FIFO level =7 in the check box selection).

         

      A sample code snippet which wasnt even working is mentioned below . Please let me know where am i wrong

         

      void UartIntHandler(void);

         

      int main()
      {
          /* Place your initialization/startup code here (e.g. MyInst_Start()) */

         

          SER_Init();     // Intialize Seial port// Start the SCB UART
          SER_Start();    // Enabling the UART //
           SER_SetCustomInterruptHandler(&UartIntHandler);

         

      }

         

      void UartIntHandler(void)
      {
          char UART_DATA;
          
          SER_UartPutChar('S');
          
          if ((SER_GetRxInterruptSourceMasked() & SER_INTR_RX_FIFO_LEVEL) != 0)
          {
              UART_DATA =SER_UartGetChar();
              SER_UartPutChar(UART_DATA);
              
               SER_ClearRxInterruptSource(SER_INTR_RX_FIFO_LEVEL);

         

       
          }

         

       Also I would like to have an code example of one wire component