mpc823rg Freescale Semiconductor, Inc, mpc823rg Datasheet - Page 904

no-image

mpc823rg

Manufacturer Part Number
mpc823rg
Description
Mpc823 Powerquicc Integrated Communications Processor For Portable Systems
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Communication Processor Module
16.12.7 Handling Interrupts in the SPI
The following sequence must be followed to handle interrupts in the serial peripheral
interface.
9. Write 0xFF to the SPIE register to clear any previous events.
10. Write 0x37 to the SPIM register to enable all possible serial peripheral interface
11. Write 0x00000020 to the CIMR to allow the serial peripheral interface to generate a
12. Write 0x0170 to the SPMODE register to enable normal operation (not loopback),
13. Set the STR bit in the SPCOM register to enable the serial peripheral interface to be
1. Once an interrupt occurs, read the SPIE register to discover the cause of the
2. Process the TX buffer descriptor to reuse it and the RX buffer descriptor to extract the
3. Clear the SPI bit in the CISR.
4. Execute the rfi instruction.
interrupts.
system interrupt. The CICR must also be initialized.
master mode, and 8-bit characters. The SPI baud rate generator speed is ignored
because the serial peripheral interface is in slave mode.
ready once the master begins the transfer.
interrupts. Normally, the SPIE bits must be cleared at this time.
data from it. To transmit another buffer, simply set the R bit of the TX buffer descriptor,
the E bit of the RX buffer descriptor, and the STR bit of the SPCOM register.
Note: If the master transmits 3 bytes and negates the SPISEL pin, the RX buffer
descriptor is closed, but the TX buffer descriptor remains open. If the master
transmits 5 or more bytes, the TX buffer descriptor is closed after the fifth byte.
If the master transmits 16 bytes and negates the SPISEL pin, the RX buffer
descriptor is closed with no errors and no out-of-buffer error occurs. If the master
transmits more than 16 bytes, the RX buffer descriptor is closed (completely full)
and the out-of-buffer error occurs after the 17th byte is received.
Freescale Semiconductor, Inc.
For More Information On This Product,
MPC823 REFERENCE MANUAL
Go to: www.freescale.com
MOTOROLA

Related parts for mpc823rg