LPC2138/01 Fractional Baud Rates Not Working

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC2138/01 Fractional Baud Rates Not Working

跳至解决方案
1,672 次查看
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 项奖励
回复
1 解答
1,636 次查看
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 项奖励
回复
1 回复
1,637 次查看
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 项奖励
回复