Motorola MSC8101 ADS User's Guide Page 223

  • Download
  • Add to my manuals
  • Print
  • Page
    / 346
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 222
Operating the SPI as a Master
Serial Peripheral Interface (SPI) 11-5
then the SPI parameter table would begin at IMM + 0x3800. The RxBDs reside in the
dual-port RAM, starting at the address in RBASE. The TxBDs also reside in the dual-port
RAM, starting at the address in TBASE. For example, if one RxBD is followed by one
TxBD, RBASE contains 0x0000, and TBASE contains 0x0008, then the RxBD is
located at IMM + 0x0000 and the TxBD is located at IMM + 0x0008. The data
buffers can reside in the internal dual-port RAM. However, if the data buffers are large,
they can reside in external memory. The receive buffer starts at the location to which
RxBD.bd_addr points, and the transmit buffer starts at location to which
TxBD.bd_addr points. RxBD.bd_addr and TxBD.bd_addr are the address fields in the
receive and transmit buffer descriptors.
Figure 11-2. SPI BD and Buffer Memory Structure
11.4 Operating the SPI as a Master
The state diagram in Figure 11-3 shows how the SPI transmits and receives characters as
a master. The SPI is enabled by setting SPMODE[7]:EN=1.
1. Once the SPI is enabled, the start of data transfer is enabled by setting
SPCOM[STR]=1.
2. TxBD[R] is set to indicate that the buffer is ready for transmission. As a master,
the SPI generates clock pulses on
SPICLK for each character and simultaneously
IMM + 0x89FC
IMM + 0x0000
Dual-Port RAM
SPI Parameters
RxBDs
External Memory or
Rx Buffer
Tx Buffer
SPI_BASE
SPI RxBD Table
SPI TxBD Table
RBASE
TBASE
RFCR
TFCR
MRBLR
SPI
Parameter Table
RxBD.bd_cstat
RxBD.bd_length
RxBD.bd_addr
TxBD.bd_cstat
TxBD.bd_length
TxBD.bd_addr
TxBDs
Dual-Port RAM
Page view 222
1 2 ... 218 219 220 221 222 223 224 225 226 227 228 ... 345 346

Comments to this Manuals

No comments