30-30
MPC860 PowerQUICC UserÕs Manual
MOTOROLA
Part V. The Communications Processor Module
30.4.12 SMC Transparent NMSI Programming Example
The following example initializes the SMC1 transparent channel over its own set of pins.
The CLK3 pin supplies the transmit and receive clocks; the SMSYN
x
pin is used for
synchronization. The SMC UART example shows baud-rate generator conÞguration.
1. ConÞgure the port B pins to enable SMTXD1, SMRXD1, and SMSYN1. Set
PBPAR[23Ð 25] and clear PBDIR[23Ð 25] and PBODR[23Ð 25].
2. ConÞgure the port A pins to enable CLK3. Set PAPAR[5] and clear PADIR[5]. The
other pin functions are the timers or the TSA. These alternate functions cannot be
used on this pin.
3. Connect CLK3 to SMC1 using the SI. Clear SIMODE[SMC1] and set
SIMODE[SMC1CS] to 0b110.
4. Write RBASE and TBASE in the SMC parameter RAM to point to the RxBD and
TxBD in the dual-port RAM. Assuming one RxBD at the beginning of the dual-port
RAM followed by one TxBD, write RBASE with 0x0000 and TBASE with 0x0008.
5. Program the CPCR to execute the
INIT
RX
AND
TX
PARAMETERS
command. Write
0x0091 to the CPCR.
6. Write 0x0001 to the SDCR to initialize the SDCR.
7. Write RFCR and TFCR with 0x10 for normal operation.
8. Write MRBLR with the maximum bytes per receive buffer. Assuming 16 bytes,
MRBLR = 0x0010.
9. Initialize the RxBD assuming the buffer is at 0x0000_1000 in main memory. Write
0xB000 to RxBD[Status and Control], 0x0000 to RxBD[Data Length] (optional),
and 0x0000_1000 to RxBD[Buffer Pointer].
10. Initialize the TxBD assuming the Tx buffer is at 0x0000_2000 in main memory and
contains Þve 8-bit characters. Write 0xB000 to TxBD[Status and Control], 0x0005
to TxBD[Data Length], and 0x0000_2000 to TxBD[Buffer Pointer].
11. Write 0xFF to SMCE to clear any previous events.
12. Write 0x13 to SMCM to enable all possible SMC interrupts.
13. Write 0x0000_0010 to the CIMR to allow SMC1 to generate a system interrupt. The
CICR should also be initialized.
14. Write 0x3830 to the SMCMR to conÞgure 8-bit characters, unreversed data, and
normal operation (not loopback). The transmitter and receiver are not enabled yet.
15. Write 0x3833 to the SMCMR to enable the SMC transmitter and receiver. This
additional write ensures that TEN and REN are enabled last.
After 5 bytes are sent, the TxBD is closed; after 16 bytes are received the receive butter is
closed. Any data received after 16 bytes causes a busy (out-of-buffers) condition since only
one RxBD is prepared.
Содержание MPC860 PowerQUICC
Страница 3: ...MPC860UM AD 07 98 REV 1 MPC860 PowerQUICC ª UserÕs Manual ...
Страница 36: ...xxxvi MPC860 PowerQUICC UserÕs Manual MOTOROLA CONTENTS Paragraph Number Title Page Number ...
Страница 78: ...I iv MPC860 PowerQUICC UserÕs Manual MOTOROLA Part I Overview ...
Страница 88: ...1 10 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part I Overview ...
Страница 114: ...3 16 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part I Overview ...
Страница 226: ...8 32 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part II PowerPC Microprocessor Module ...
Страница 262: ...9 36 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part II PowerPC Microprocessor Module ...
Страница 274: ...III iv MPC860 PowerQUICC UserÕs Manual MOTOROLA Part III Configuration ...
Страница 320: ...12 12 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part III Configuration ...
Страница 325: ...MOTOROLA Part IV Hardware Interface IV v Part IV Hardware Interface ...
Страница 326: ...IV vi MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 352: ...13 26 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 394: ...14 42 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 426: ...15 32 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 530: ...17 26 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 632: ...21 44 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 660: ...22 28 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 708: ...24 24 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 748: ...27 20 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 846: ...31 20 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 914: ...35 12 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 948: ...36 34 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 998: ...37 48 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part VI Debug and Test ...
Страница 1016: ...A 10 MPC860 PowerQUICC UserÕs Manual MOTOROLA Appendixes ...
Страница 1024: ...B 8 MPC860 PowerQUICC UserÕs Manual MOTOROLA Appendixes ...
Страница 1030: ...C 6 MPC860 PowerQUICC UserÕs Manual MOTOROLA Appendixes ...
Страница 1086: ...Glossary 12 MPC860 PowerQUICC UserÕs Manual MOTOROLA ...
Страница 1106: ......