lpcware

UART Clock divider

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Muis on Mon Jan 21 09:53:47 MST 2013
My system is running at 12Mhz, and to get 115200 baud I use the following code:

int dlEest = 4;
int mulVal = 8;
int ClockVal = 1;
int divAddVal = 5;

LPC_SYSCON->UARTCLKDIV = ClockVal;

LPC_USART->DLM = dlEest / 256;
LPC_USART->DLL = dlEest % 256;
LPC_USART->FDR = (mulVal<<4)|divAddVal;


And this works perfectly. Now to save power I want to make the clock divider higher. So I change ClockVal tot 4 and calculated that dlEest becomes 1. However UART stops functioning with that. What am Im doing wrong?

Outcomes