LPC1769 UART1 fails to receive data at higher speeds i.e greater than 2Mbps.

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

LPC1769 UART1 fails to receive data at higher speeds i.e greater than 2Mbps.

541 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vinay singh on Fri Sep 26 05:27:47 MST 2014
Hello,

i am need of urgent help..
I have a lpc1769 controller board interfaced to another device. I am looking at transfers speeds of above 2mbps.
The CTS and RTS are toggled manually.

I can transmit and receive data till 1.2Mbps but failing at higher baudrates.

I am able to transmit data at 2.4Mbps but during reception in the ISR a framing error interrupt is generated at higher baudrates(>2Mbps). I have looked at the signalling and it seems to be same for the working as well as non-working scenarios. Even reception of one byte causes a framing error in interrupt.

The other interfaced device is also generating a correct signals( Start, data, stop, parity bits).
It seems to be a sampling of signal issue at lpc1769 pins.

Can somebody please let me know if anything is wrong in configuration done below.??
Also if anyone has working code please share it....?? Also does LPC1769 support >2mbps transaction over UART???.

Please Help...!!

I have mentioned the code below which i use to configure the LPC1769.

/*
*Function Name     : UART1_Init
*Description       : Initialize the UART1 Peripheral
*Input Parameters  : Clock polarity(0 or 1).
*Input : Clock Phase(0 or 1).
*Input : Clock rate(Maximum data bit rate of one eighth of the peripheral clock rate).
*Output Parameters : STATUS
*
*Note:             :
*/
void UART1_Config(uint8_t Databits, uint8_t Stopbits,uint8_t parity,uint32_t dwClockrate  )
{
uint8_t idx;
UART_CFG_Type UART_CFG;
UART_FIFO_CFG_Type UARTFIFOConfigStruct;


UART_CFG.Baud_rate= dwClockrate;
UART_CFG.Parity= parity;
UART_CFG.Databits= Databits;
UART_CFG.Stopbits= Stopbits;

PINSEL_CFG_Type PinCfg;
PinCfg.Funcnum = 1;
PinCfg.OpenDrain = PINSEL_PINMODE_OPENDRAIN;
PinCfg.Pinmode = PINSEL_PINMODE_TRISTATE;
PinCfg.Portnum = 0;
for (idx = 15; idx <= 16; idx++)
{
PinCfg.Pinnum = idx;
PINSEL_ConfigPin(&PinCfg);
}

// Initialize UART0 peripheral with given to corresponding parameter
UART_Init((LPC_UART_TypeDef *)LPC_UART1,&UART_CFG);

// Initialize FIFO for UART1 peripheral
UART_FIFOConfigStructInit(&UARTFIFOConfigStruct);
UART_FIFOConfig((LPC_UART_TypeDef *)LPC_UART1, &UARTFIFOConfigStruct);

/* Enable UART Rx interrupt */
UART_IntConfig((LPC_UART_TypeDef *)LPC_UART1, UART_INTCFG_RBR, ENABLE);
/* Enable UART line status interrupt */
UART_IntConfig((LPC_UART_TypeDef *)LPC_UART1, UART_INTCFG_RLS, ENABLE);


// Reset ring buf head and tail idx
__BUF_RESET(rb.rx_head);
__BUF_RESET(rb.rx_tail);


UART_TxCmd((LPC_UART_TypeDef *)LPC_UART1,ENABLE);
/* preemption = 1, sub-priority = 1 */
NVIC_SetPriority(UART1_IRQn, ((0x01<<3)|0x01));
NVIC_EnableIRQ(UART1_IRQn);
}
Labels (1)
0 Kudos
0 Replies