Motorola MPC860 PowerQUICC User Manual page 682

Table of Contents

Advertisement

Part V. The Communications Processor Module
Table 23-13 describes UART SCCS Þelds.
Bits
Name
0Ð6
Ñ
Reserved, should be cleared.
7
ID
Idle status. Set when RXD has been a logic one for at least a full character time.
0 The line is not idle.
1 The line is idle.
23.21 SCC UART Programming Example
The following initialization sequence is for the 9,600 baud, 8 data bits, no parity, and stop
bit of an SCC in UART mode assuming a 25-MHz system frequency. BRG1 and SCC2 are
used. The controller is conÞgured with RTS2, CTS2, and CD2 active; CTS2 acts as an
automatic ßow-control signal.
1. ConÞgure port A to enable TXD2 and RXD2. Set PAPAR[12,13] and clear
PADIR[12,13] and PAODR[12,13].
2. ConÞgure port C to enable RTS2, CTS2, and CD2. Set PCPAR[14] andPCSO[8,9]
and clear PCPAR[8,9] and PCDIR[8,9,14].
3. ConÞgure BRG1. Write BRGC1 with 0x010144. The DIV16 bit is not used and the
divider is 162 (decimal). The resulting BRG1 clock is 16´ the preferred bit rate.
4. Connect BRG1 to SCC2 using the serial interface. Clear SICR[R2CS,T2CS].
5. Initialize the SDMA conÞguration register (SDCR = 0x0001 for normal operation).
6. Connect the SCC2 to the NMSI. Clear SICR[SC2].
7. Write RBASE and TBASE in the SCC2 parameter RAM to point to the RxBD and
TxBD tables in dual-port RAM. Assuming one RxBD at the start of dual-port RAM
followed by one TxBD, write RBASE with 0x0000 and TBASE with 0x0008.
8. Write 0x0041 to CPCR to execute the
This command updates RBPTR and TBPTR of the serial channel with the new
values of RBASE and TBASE.
9. Write RFCR with 0x10 and TFCR with 0x10 for normal operation.
10. Write MRBLR with the maximum number of bytes per Rx buffer. For this case,
assume 16 bytes, so MRBLR = 0x0010.
11. Write MAX_IDL with 0x0000 in the parameter RAM to disable the maximum idle
functionality for this example.
12. Set BRKCR to 0x0001 so
13. Clear PAREC, FRMEC, NOSEC, and BRKEC in parameter RAM.
14. Clear UADDR1 and UADDR2. They are not used.
15. Clear TOSEQ. It is not used.
23-22
Table 23-13. UART SCCS Field Descriptions
STOP TRANSMIT
MPC860 PowerQUICC UserÕs Manual
Description
INIT RX AND TX PARAMS
commands send only one break character.
command for SCC2.
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents