LPC4330 UARTbaudrate

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

LPC4330 UARTbaudrate

650 Views
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))?

Labels (1)
0 Kudos
Reply
1 Reply

486 Views
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 Kudos
Reply