Baud Rate for UART1 on Hitex board for LPC1850

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

Baud Rate for UART1 on Hitex board for LPC1850

352 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ramakrishna.boyina on Sun Dec 01 23:09:42 MST 2013
HI All,

I am using Hitex Board for LPC1850 and UART1 for communicating to other controller. I could receive data and send data if UART1is  configured 115200 as baud rate. But if use baud rate as 921600, i couldn't receiving data from  from other controller.

Could anybody tell why UART1 is not working at 921600 baud rate on Hitex board?

my init code for UART1:

  Board_UART_Init(LPC_UART1);

  Chip_UART_Init(LPC_UART1);
  Chip_UART_SetBaud(LPC_UART1, 921600);
  Chip_UART_ConfigData(LPC_UART1, UART_DATABIT_8, UART_PARITY_NONE, UART_STOPBIT_1);


Anything i have missed for configuring UART1 on hitex board.

The other controller is working properly with LPC1857 where i have used USART3 for communicating and configured baud rate as 921600.

thanks & regards,
Ramakrishna.
Labels (1)
0 Kudos
2 Replies

305 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jonper on Thu Dec 05 09:35:34 MST 2013
If you are using LPCOpen v2.02, be aware that the Chip_UART_SetBaud function no longer uses the fractional divider as did v1.03; so with a 204MHz clock, the actual baud rate becomes 980709 which is a greater than 6% error and unlikely to work correctly with other devices.

There is a new Chip_UART_SetBaudFDR function in uart_18xx_43xx.c that does implement the fractional divider register, though it too seems to have some unexpected error rate issues with certain combinations of clock rate and baud requests.

Good luck
0 Kudos

305 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Thu Dec 05 04:31:15 MST 2013
Hello Ramakrishna,

it is for sure not related to the Hitex board hardware. Something is wrong in the software configuration.
I would recommend to step with a debugger through the code until you are sending the first character.
Do it first with the working configuration @115kbaud and then with the failing configuration @921kbaud.

A few ideas:
- Maybe the clock source for the UART is not set to the right value. You need to have a 16-times oversampling, so 921kbaud will not work when you just run on 12MHz.
- If the frequency is to low then the fractional divider cannot generate 921600 with an acceptable frequency. Check the output with an oscilloscope and look for the frequency error.

Hope this helps,
NXP Support Team
0 Kudos