This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC3250 HSUART HELP

Hi I was unable to get data properly through High Speed uart's. as per my program i was able to get only 64 bytes properly after that not getting. Here i am posting the program Please take a look and give me the Directions
Thank You

int main(void)
{
        unsigned char i;
        init_HSUART1();

   while(1)
   {
         //HSUART1_senddata(HSUART1_receivedata());

          HSUART1_senddata('1');
          HSUART1_senddata('2');
          HSUART1_senddata('3');
          HSUART1_senddata('4');
          HSUART1_senddata('5');

   }
}

void init_HSUART1 (void)
 {


  HSU1_RATE     =192;// baud rate 115200 for 13MHz CLK

  HSU1_CTRL= 0x00001C00;
}


/****************************************************************************************
**      DESCRIPTION     :       This function waits until its receives a character from the terminal.
**
**      RETURN          :       Character received from the terminal
*****************************************************************************************/
unsigned char HSUART1_receivedata(void)
{
        unsigned char gch;

        while((HSU1_RX&0x0100)==0x0100);            //cheak for data availability
                gch = HSU1_RX;                                          // Storing data into temp variable 'gch'
                return(gch);                                            // Return the data
}

/************************************************************************************
**      DESCRIPTION     :       This function transmits the given character to the terminal.    *
**                                                                                                                                                                      *
**      RETURN          :       None                                                                                                                    *
************************************************************************************/
void HSUART1_senddata(unsigned char pch)
{
        HSU1_TX=pch;
//      while((HSU1_IIR&0x01)==0x01);

                        // Transmiting data into buffer

/*      if((HSU1_LEVEL&0xFF00)==0x0400)
        {
        while((HSU1_LEVEL&0xFF00)==0x0000);

        }
        else{}
                   */
        return ;


        /*if((HSU1_IIR&0x01)==0x01)
        {
         HSU1_IIR|=0x01;        // Clear or ACK the interrupt
        HSU1_TX=pch;            // Transmiting data into buffer
        }
    return;     */
}


Parents
  • Hi

    Thanks for earlier support. I'm facing one more issue on GPDMA. I was unable to generate interrupt on DMA.
    1.I configured DMA Channel 0 for UART2 for 4 bytes trigger. But unable to get.

    2.What that channel linked list register will do?

    I have studied the data sheet. But unable to get these things.

    Please help me

    Here i'm attaching the GPDMA configuration what i did.

    GPDMA_SOFT_BREQ |=0x00000100;           // HSUART 2 TX  Selected
            GPDMA_CH0_SRC    =HSU2_RX;      // Selecting Source address
            GPDMA_CH0_DEST   =(unsigned long)&Rx_Buffer_485[0];
            GPDMA_CH0_LLI    =0x00000000;
            GPDMA_CH0_CTRL   = 0x88009001;          // Terminal count interrupt and
                                                    //transfer size 4byts(8bits wide)
            GPDMA_CH0_CFG    |=0x00001008;          // Peripheral to memory trnasaction
            GPDMA_CONFIG     |=0x00000001;          // Enable DMA Controller
    
    

    Thanks
    Eswar

Reply
  • Hi

    Thanks for earlier support. I'm facing one more issue on GPDMA. I was unable to generate interrupt on DMA.
    1.I configured DMA Channel 0 for UART2 for 4 bytes trigger. But unable to get.

    2.What that channel linked list register will do?

    I have studied the data sheet. But unable to get these things.

    Please help me

    Here i'm attaching the GPDMA configuration what i did.

    GPDMA_SOFT_BREQ |=0x00000100;           // HSUART 2 TX  Selected
            GPDMA_CH0_SRC    =HSU2_RX;      // Selecting Source address
            GPDMA_CH0_DEST   =(unsigned long)&Rx_Buffer_485[0];
            GPDMA_CH0_LLI    =0x00000000;
            GPDMA_CH0_CTRL   = 0x88009001;          // Terminal count interrupt and
                                                    //transfer size 4byts(8bits wide)
            GPDMA_CH0_CFG    |=0x00001008;          // Peripheral to memory trnasaction
            GPDMA_CONFIG     |=0x00000001;          // Enable DMA Controller
    
    

    Thanks
    Eswar

Children
No data