I need to set two serial communication baud rates for connecting to two different pieces of equipment on TPU channels 12 and 14. Currently in the code both are set to 9600 baud. Could you please help me understand these settings?
I'm new to the 68332 processor and am working on some old code written by someone else. The code is completely uncommented, fragmented (so it is hard to tell what lines are setting the communications), and the is just filled with hex and binary codes that I think I have interpreted correctly from reading the manuals. So, please help correct me if I'm wrong here with the relevant commands. This is what I think the old code is doing.
* The CFSR0 is set to 10111011 binary, meaning to set TPU channels 12 through 15 to be UART.
* The TPU Channel 12 and 14 Match Rate is set to 218. What does this do?
* The TPU Channel 12 and 14 Data size 8. I assume this is for 8 data bits per serial communication frame.
* The HSQR0 is set to 11111111 binary, meaning TPU channels 12 through 15 are set to no parity.
* The HSRR0 is set to 10111011 binary, meaning TPU channels 12 and 14 are set to transmit and 13, 15 are set to receive.
* The CPR0 is set to 01010101 binary, meaning TPU channels 12 through 15 are set to low priority.
* The SCCR0 is set to 27, which gives a baud rate of 9600. This confuses me since the manual leads me to believe that this would be a 19200 baud rate with a 16.6 MHz clock. (By the way, how is the clock 16.6 MHz when it is connected to a 32 kHz crystal?).
Now, is that interpretation correct? How do I get two different baud rates on channels 12 and 14?