LPC54113 UART0 transmission is not working.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC54113 UART0 transmission is not working.

277 Views
PK_1114
Contributor II

Hello I am using UART0 in my code. When I run the code it is not transmitting any data to UART0.

And also I am not using any interrupts for transmission.

Designed the UART0 functionality with PIO0_21(TX) and PIO0_22(RX). I configured the peripheral and also initialized the pins with UART Functionality, but data transferring not done.

Configuration:


  SYSCON -> AHBCLKCTRL[1] |= 1<<11;       
  IOCON->PIO[0][22] = 0x182;             
  IOCON->PIO[0][21] = 0x582;              
  IOCON->PIO[0][20] = 0x182;              
  FLEXCOMM0 ->PSELID = 0X11;         

  //CONFIGUE USART 
  USART0 -> CFG = 0X00;                   
  USART0-> CFG   |= 1<<2;                  
  USART0-> OSR = 12;                  
  USART0 -> BRG = 768;                  
  USART0 -> CFG |= (1<<0)|1<<15;                

 

  //FIFO CONFIGURATION
  USART0->FIFOCFG |= (1<<0) | (1<<1); 
  USART0->FIFOTRIG |= (0<<16)|(1<<1);
  USART0->FIFOINTENSET |= (1<<3);

  NVIC_SetPriority(FLEXCOMM0_IRQn,1);  
  NVIC_EnableIRQ(FLEXCOMM0_IRQn);       

 

Can anyone can hep me this?

Labels (1)
0 Kudos
1 Reply

240 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @PK_1114 

Please refer to UART demo under SDK for lpc54114, download from:

https://mcuxpresso.nxp.com/en/select 

 

BR

Alice

0 Kudos