C8051F340/1/2/3/4/5/6/7

20. Enhanced Serial Peripheral Interface (SPI0)

The Enhanced Serial Peripheral Interface (SPI0) provides access to a flexible, full-duplex synchronous serial bus. SPI0 can operate as a master or slave device in both 3-wire or 4-wire modes, and supports mul- tiple masters and slaves on a single SPI bus. The slave-select (NSS) signal can be configured as an input to select SPI0 in slave mode, or to disable Master Mode operation in a multi-master environment, avoiding contention on the SPI bus when more than one master attempts simultaneous data transfers. NSS can also be configured as a chip-select output in master mode, or disabled for 3-wire operation. Additional gen- eral purpose port I/O pins can be used to select multiple slave devices in master mode.

SPI0CKR

SCR7SCR6SCR5SCR4SCR3SCR2SCR1SCR0

Clock Divide

SYSCLK

Logic

SFR Bus

SPI0CFG

SPIBSY MSTEN CKPHA CKPOL SLVSEL NSSIN SRMT RXBMT

SPI0CN

SPIFWCOLMODFRXOVRNNSSMD1NSSMD0TXBMTSPIEN

SPI CONTROL LOGIC

SPI IRQ

Data Path

Pin Interface

Control

Control

Tx Data

SPI0DAT

Transmit Data Buffer

MOSI

C

SCK R O

 

 

 

Shift Register

Rx Data

 

 

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pin

Control

Logic

S

S MISO B

A

Port I/O

 

 

 

Receive Data Buffer

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Write

 

 

Read

 

 

 

 

SPI0DAT

SPI0DAT

 

 

 

 

 

 

R

NSS

SFR Bus

Figure 20.1. SPI Block Diagram

Rev. 0.5

229

Page 229
Image 229
Silicon Laboratories C8051F344, C8051F347, C8051F346, C8051F341 Enhanced Serial Peripheral Interface SPI0, SPI Block Diagram