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

UART problem

Hi all I am using MCB2300 development kit ,on this kit i have two UART 0 and 1 where i have uart0 as working but my uart 1,2,3 is not responding ...i dont know y ...??. i just copied the uart0 function and used to initialized other uart 1,2,3 but failed to send any data out ...can any one tel me wts the problem...

Parents
  • hi ..

    this is the uart0 initialization part

    void init_UART0 (void) { PINSEL0 |= 0x00000050; U0FDR = 0; U0LCR = 0x83; U0DLL = 78; U0DLM = 0; U0LCR = 0x03; U0FCR = 0x03; U0IER = 0x00000005; VICIntEnable = (1 << 6); VICVectAddr6 = (unsigned long)UART0_IRQHandler; VICVectCntl6 = 15;
    }

    //this is the initialization of uart1

    void init_UART1 (void) { PINSEL0 |= 0x40000000; PINSEL1 |= 0x00000001; U1FDR = 0; U1LCR = 0x83; U1DLL = 78; U1DLM = 0; U1LCR = 0x03; U1FCR = 0x03;
    }

    // THIS IS THE INITIALIZATION OF UART2

    void init_UART2 (void) { PINSEL0 |= 0x00500000; U2FDR = 0; U2LCR = 0x83; U2DLL = 78; U2DLM = 0; U2LCR = 0x03; U2FCR = 0x03;
    }

    // THIS IS THE INITIALIZATION FOR UART3

    void init_UART3 (void) { PINSEL0 |= 0x0000000A; U3FDR = 0; U3LCR = 0x83; U3DLL = 78; U3DLM = 0; U3LCR = 0x03; U3FCR = 0x03;
    }

    so out of this the uart 0 and 1 is working fine throught simulation and i get the data out from my comport and able to see it on the hyperterminal in PC .

    but when i try to initialize the UART2 and 3 i am not able to get any pulse out i checked with the CRO.while similating i dont get the values changed for the UxLCR,UxFCR..nothing changes during the simulation while for the UART 0 and 1 i could c the changes in the table ...during the data sending out it hangs in the loop
    while (!(U3LSR & 0x20));
    U3THR = data;
    like the LCR bit doesnt get set to transmit the data so it hangs in this while loop...

    plz suggest

Reply
  • hi ..

    this is the uart0 initialization part

    void init_UART0 (void) { PINSEL0 |= 0x00000050; U0FDR = 0; U0LCR = 0x83; U0DLL = 78; U0DLM = 0; U0LCR = 0x03; U0FCR = 0x03; U0IER = 0x00000005; VICIntEnable = (1 << 6); VICVectAddr6 = (unsigned long)UART0_IRQHandler; VICVectCntl6 = 15;
    }

    //this is the initialization of uart1

    void init_UART1 (void) { PINSEL0 |= 0x40000000; PINSEL1 |= 0x00000001; U1FDR = 0; U1LCR = 0x83; U1DLL = 78; U1DLM = 0; U1LCR = 0x03; U1FCR = 0x03;
    }

    // THIS IS THE INITIALIZATION OF UART2

    void init_UART2 (void) { PINSEL0 |= 0x00500000; U2FDR = 0; U2LCR = 0x83; U2DLL = 78; U2DLM = 0; U2LCR = 0x03; U2FCR = 0x03;
    }

    // THIS IS THE INITIALIZATION FOR UART3

    void init_UART3 (void) { PINSEL0 |= 0x0000000A; U3FDR = 0; U3LCR = 0x83; U3DLL = 78; U3DLM = 0; U3LCR = 0x03; U3FCR = 0x03;
    }

    so out of this the uart 0 and 1 is working fine throught simulation and i get the data out from my comport and able to see it on the hyperterminal in PC .

    but when i try to initialize the UART2 and 3 i am not able to get any pulse out i checked with the CRO.while similating i dont get the values changed for the UxLCR,UxFCR..nothing changes during the simulation while for the UART 0 and 1 i could c the changes in the table ...during the data sending out it hangs in the loop
    while (!(U3LSR & 0x20));
    U3THR = data;
    like the LCR bit doesnt get set to transmit the data so it hangs in this while loop...

    plz suggest

Children