Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

MPC8280 Datasheet(PDF) 1301 Page - Freescale Semiconductor, Inc

Part # MPC8280
Description  PowerQUICC??II Family Reference Manual
PDF  1386 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  FREESCALE [Freescale Semiconductor, Inc]
Direct Link  http://www.freescale.com
Logo FREESCALE - Freescale Semiconductor, Inc

MPC8280 Datasheet(HTML) 1301 Page - Freescale Semiconductor, Inc

Back Button MPC8280 Datasheet HTML 1297Page - Freescale Semiconductor, Inc MPC8280 Datasheet HTML 1298Page - Freescale Semiconductor, Inc MPC8280 Datasheet HTML 1299Page - Freescale Semiconductor, Inc MPC8280 Datasheet HTML 1300Page - Freescale Semiconductor, Inc MPC8280 Datasheet HTML 1301Page - Freescale Semiconductor, Inc MPC8280 Datasheet HTML 1302Page - Freescale Semiconductor, Inc MPC8280 Datasheet HTML 1303Page - Freescale Semiconductor, Inc MPC8280 Datasheet HTML 1304Page - Freescale Semiconductor, Inc MPC8280 Datasheet HTML 1305Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 1301 / 1386 page
background image
Serial Peripheral Interface (SPI)
MPC8280 PowerQUICC II Family Reference Manual, Rev. 1
Freescale Semiconductor
39-17
39.9
SPI Slave Programming Example
The following is an example initialization sequence to follow when the SPI is in slave mode. It is very
similar to the SPI master example, except that SPISEL is used instead of a general-purpose I/O signal (as
shown in Figure 39-2).
1. Enable SPIMISO, SPIMOSI, SPICLK, and SPISEL.
2. In address 0x89FC, assign a pointer to the SPI parameter RAM.
3. Assuming one RxBD at the beginning of the dual-port RAM followed by one TxBD, write RBASE
with 0x0000 and TBASE with 0x0008 in the SPI parameter RAM.
4. Write RFCR and TFCR with 0x10 for normal operation.
5. Program MRBLR = 0x0010 for 16 bytes, the maximum number of bytes per buffer.
6. Initialize the RxBD. Assume the Rx 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].
7. Initialize the TxBD. Assume the Tx buffer is at 0x0000_2000 in main memory and contains five
8-bit characters. Write 0xB800 to TxBD[Status and Control], 0x0005 to TxBD[Data Length], and
0x0000_2000 to TxBD[Buffer Pointer].
8. Execute the INIT RX AND TX PARAMETERS command by writing 0x2541_0000 to CPCR.
9. Write 0xFF to SPIE to clear any previous events.
10. Write 0x37 to SPIM to enable all SPI interrupts.
11. Set SPMODE to 0x0170 to enable normal operation (not loopback), slave mode, SPI enabled, and
8-bit characters. BRG speed is ignored in slave mode.
12. Set SPCOM[STR] to enable the SPI to be ready once the master begins the transfer.
NOTE
If the master sends 3 bytes and negates SPISEL, the RxBD is closed but the
TxBD remains open. If the master sends 5 or more bytes, the TxBD is closed
after the fifth byte. If the master sends 16 bytes and negates SPISEL, the
RxBD is closed without triggering an out-of-buffers error. If the master
sends more than 16 bytes, the RxBD is closed (full) and an out-of-buffers
error occurs after the 17th byte is received.
39.10 Handling Interrupts in the SPI
The following sequence should be followed to handle interrupts in the SPI:
1. Once an interrupt occurs, read SPIE to determine the interrupt source. Normally, SPIE bits should
be cleared at this time.
2. Process the TxBD to reuse it and the RxBD to extract the data from it. To transmit another buffer,
simply set TxBD[R], RxBD[E], and SPCOM[STR].
3. Execute an rfi instruction.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com