AnsweredAssumed Answered

LPC2136 UART0 and UART1 not working

Question asked by Raul Toribio on Nov 4, 2019
Latest reply on Nov 8, 2019 by Sabina Bruce

Hello everyone,

 

I am configuring my LPC2136 to use both UART0 and UART1. When configuring UART0 it works correctly with interruptions. When configuring UART1 does not work, it does not transmit, it does not receive. below the configuration(Keil):

 

void uart0_init(void) //9600 BAUD pclock 48MHZ
{
PCONP |= 0x00000008;/* PCRTC = 1 */
PINSEL0 |=0x00000005; // Enable RxD0 and TxD0 AND Enable RxD1 and TxD1
//U0FCR=0x07; //enable FIFO
U0LCR=0X83; //8-data bits, 1 Stop bit, Disable Parity and Enable DLAB
U0DLL=0x38; // MULVAL = 0x5 and DIVADDVAL = 14
U0DLM=1;
//U0FDR= 0x00000010; // MULVAL = 1 and DIVADDVAL = 0
U0LCR=0X03; //cleared DLAB
 U0IER= 0x00000001; 
}

 

void UART0_Interrupt_EN(void)
{
// VICIntSelect = 0x00000000;
VICVectAddr6 = (unsigned) UART0Handler;
VICVectCntl6 = 0x00000020 | 6;
VICIntEnable |=(1UL<<6); 
}

 

void uart1_init(void) //9600 BAUD pclock 48MHZ
{
PCONP |= 0x00000010;
PINSEL0 |= 0x00050000; /* Enable RxD1 and TxD1*/
U1FCR = 0x07;
U1LCR=0X83; //8-data bits, 1 Stop bit, Disable Parity and Enable DLAB
U1DLL=0x38; // MULVAL = 0x5 and DIVADDVAL = 14
U1DLM=1;
U1LCR=0X03; //cleared DLAB
U1IER= 0x00000001; 
}

 

void UART1_Interrupt_EN(void)
{
VICVectAddr7 = (unsigned) UART1Handler;
VICVectCntl7 = 0x00000020 | 7;
VICIntEnable |=(1UL<<7);
}

Outcomes