LPC2138/01 Fractional Baud Rates Not Working

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

LPC2138/01 Fractional Baud Rates Not Working

Jump to solution
1,358 Views
mikenn
Contributor III

Hello NXP,

I can't seem to get the UART0 fractional baud rate generator to work using LPC2138.  Essentially the data that transmits out UART0 has a baud rate as though U0FDR remains on its default settings.

U0LCR = 0x83;             /* DLAB=1 temporarily to access baud rate divisor latches. */
U0DLM = 0;
U0DLL = 4;                    /* UART0 baud 115200 with 12.288 MHz clock, no PLL, PCLK divides by one. */
U0LCR = 0x03;             /* DLAB=0, eight data bits, one stop bit, no parity. */
U0FDR = 0x32;
 
With these settings it ends up giving me a baud rate of 192000 instead of the desired 115200.  The higher baud rate is what would be provided when the fractional portion is disabled, with all else left the same...
 
The LPC2138 is the /01 variant, which is supposed to accommodate the fractional baud rates.  Any idea what is wrong?
 
MikeN
0 Kudos
Reply
1 Solution
1,322 Views
mikenn
Contributor III

What's up NXP,

It turns out this was a bonafide compiler problem.  IAR IDE v9.10.2 or older has this bug.  They are working on a fix in the next release.

MikeN

View solution in original post

0 Kudos
Reply
1 Reply
1,323 Views
mikenn
Contributor III

What's up NXP,

It turns out this was a bonafide compiler problem.  IAR IDE v9.10.2 or older has this bug.  They are working on a fix in the next release.

MikeN

0 Kudos
Reply