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

MCB2300 UART1 troubles

I'm trying to use both UART0 and UART1 to communicate with 2 different devices. Adapting example code, I try to initialize both of them as so.

    PINSEL0 |= 0x00000050;               /* Enable TxD0 and RxD0              */

    PINSEL0 |= 0x40000000;               /* Enable TxD1                       */
    PINSEL1 |= 0x00000001;               /* Enable RxD1                       */

  U0FDR    = 0;                          /* Fractional divider not used       */
  U0LCR    = 0x83;                       /* 8 bits, no Parity, 1 Stop bit     */
  U0DLL    = 13;                         /* 57600 Baud Rate @ 12.0 MHZ PCLK    */
  U0DLM    = 0;                          /* High divisor latch = 0            */
  U0LCR    = 0x03;                       /* DLAB = 0                          */

  U1FDR    = 0;                          /* Fractional divider not used       */
  U1LCR    = 0x83;                       /* 8 bits, no Parity, 1 Stop bit     */
  U1DLL    = 13;                         /* 57600 Baud Rate @ 12.0 MHZ PCLK    */
  U1DLM    = 0;                          /* High divisor latch = 0            */
  U1LCR    = 0x03;                       /* DLAB = 0                          */

My understanding from the user manual was that both UART0 and UART1 default to receiving power so after these initial setups I should be able to read any received characters. To practice this I did a simple example program which transmits from UART0 and tries to read from UART1. (I connected TxD0 to RxD1 on the dev board). I never returned from the sample getkey() function because UART1 never acted as though it received any information.

int getkey (void)  {                     /* Read character from Serial Port   */

  while (!(U1LSR & 0x01));

  return (U1RBR);
}

However, when I connect TxD0 to RxD0 (and change the getkey function accordingly) instead and try to write from UART0 and then read back from UART0, everything works properly. So my functions appear to be working properly but UART1 is dead in the water. Am I missing something? Thanks!

0