LPC4330 UARTbaudrate

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

LPC4330 UARTbaudrate

472 次查看
tomsaluzzo
Contributor III

Page 1134 of the User Manual gives the equation for the UARTbaudrate. Section 40.6.3 on page 1123 of the User Manual states that :”… the baud rate clock, which must be 16x the desired baud rate”. Does this mean that the UARTbaudrate equation on page 1134 must generate a baud rate that is 16x the desired baud rate?

The following UARTbaudrate equation is copied from page 1134 of the User Manual:

 UARTbaudrate = PCLK / (16*(256*DLM+DLL)*(1+DivAddVal/MulVal)).

 

Is the above equation correct or should the equation be (note added parentheses around (DLM + DLL)):

 UARTbaudrate = PCLK / (16*(256*(DLM+DLL))*(1+DivAddVal/MulVal))?

标签 (1)
0 项奖励
1 回复

308 次查看
mikesimmonds
Contributor III

The equation is correct as is (and wrong with your change). DLM and DLL are 8 bit quantities, so to get the 16 bit

divisor: 256 * (most significant byte) + (least significant byte) [Computer Science 101 Duh]

The factor of 16 is built in to the equation (the 16 in the divisor part) so go for 9600, 19200 etc. as one might expect.

Cheers, Mike.

0 项奖励