
29 Jan
2004
29 Jan
'04
5:56 p.m.
Hello,
attached is a patch against 1.0.2 (checked out 2004-01-14) that fixes a bug in MPC5200 PSC Baud rate calculation. The patch modifies cpu/mpc5xxx/serial.c.
The problem was that not the proper rounding was applied which resulted in slightly off Baud rates. The formula to calculate the Baud rate is:
Divider = (f_IPBI / 32) / Baudrate
Hence, the formula using integer should be:
Divider = (((f_IPBI + 16) / 32) + Baudrate/2) / Baudrate
Regards Mark Jonas