Atmel AT91M55800A Answering Machine User Manual


 
192
1745D–ATARM–04-Nov-05
AT91M55800A
Figure 20-5. Programmable Delays (DLYBCS, DLYBS and DLYBCT)
20.5 Clock Generation
In master mode the SPI Master Clock is either MCK or MCK/32, as defined by the MCK32 field
of SP_MR. The SPI baud rate clock is generated by dividing the SPI Master Clock by a value
between 4 and 510. The divisor is defined in the SCBR field in each Chip Select Register. The
transfer speed can thus be defined independently for each chip select signal.
CPOL and NCPHA in the Chip Select Registers define the clock/data relationship between
master and slave devices. CPOL defines the inactive value of the SPCK. NCPHA defines
which edge causes data to change and which edge causes data to be captured.
In Slave Mode, the input clock low and high pulse duration must strictly be longer than two
system clock (MCK) periods.
20.6 Peripheral Data Controller
The SPI is closely connected to two Peripheral Data Controller channels. One is dedicated to
the receiver. The other is dedicated to the transmitter.
The PDC channel is programmed using SP_TPR (Transmit Pointer) and SP_TCR (Transmit
Counter) for the transmitter and SP_RPR (Receive Pointer) and SP_RCR (Receive Counter)
for the receiver. The status of the PDC is given in SP_SR by the SPENDTX bit for the trans-
mitter and by the SPENDRX bit for the receiver.
The pointer registers (SP_TPR and SP_RPR) are used to store the address of the transmit or
receive buffers. The counter registers (SP_TCR and SP_RCR) are used to store the size of
these buffers.
The receiver data transfer is triggered by the RDRF bit and the transmitter data transfer is trig-
gered by TDRE. When a transfer is performed, the counter is decremented and the pointer is
incremented. When the counter reaches 0, the status bit is set (SPENDRX for the receiver,
SPENDTX for the transmitter in SP_SR) and can be programmed to generate an interrupt.
While the counter is at zero, the status bit is asserted and transfers are disabled.
Chip Select 1
Chip Select 2
SPCK Output
DLYBCS
DLYBS
DLYBCT
Change peripheral
No change
of peripheral
DLYBCT