Intel IXP400 Frozen Dessert Maker User Manual


 
Intel
®
IXP400 Software
Access-Layer Components: Synchronous Serial Port (IxSspAcc) API
Programmer’s Guide IXP400 Software Version 2.0 April 2005
Document Number: 252539, Revision: 007 277
19.4 IxSspAcc API Usage Models
19.4.1 Initialization and General Data Model
This description assumes a single client model where there is a single application-level program
configuring the SSP interface and initiating I/O operations.
The client must first define the initial configuration of the SSP port by storing a number of values
in the IxSspInitVars structure. The values include the frame format, input clock source, clock
frequency, threshhold values for the FIFOs, pointers to callback functions for various data
scenarios, and other configuration items. After the structure is defined,
ixSspAccInit() may be
called to enable the port.
Once the port is enabled, the client will use one of the data models described later in this chapter
(either Interrupt or Polling mode) to determine how and when data I/O operations need to occur. A
handler (or callback) is registered for transmit and receive operations. These handlers will use the
ixSspAccFIFODataSubmit() and ixSspAccFIFODataReceive() functions for transmitting and
receiving data.
After the SSP port has been initialized as described above, the SSP port may be re-configured.
Most of the port configuration options may be modified via available functions in the API. For
example, the frame format may be changed from SPI to Microwire.
The API also provides functions to disable the SSP port, check for port activity, maintains statistics
for transmitted frames, received frames and overruns, and has other debugging type functions.
19.4.2 Interrupt Mode
The sequence flow for a client application using this component in interrupt mode is described
below. Refer to Figure 93.
1. Initialize the SSP interface with interrupts enabled.
2. For receive operations:
a. Interrupt is triggered due to hitting or below of threshold.
b. If due to Rx FIFO, Rx FIFO handler/callback is called.
c. Rx FIFO handler/callback extracts data from the Rx FIFO.
d. (handler/callback processes the extracted data)
e. Rx FIFO handler/callback returns.
f. Interrupt is cleared.
3. For transmit operations:
a. Interrupt is triggered due to hitting or exceeding of threshold.
b. If due to Tx FIFO, Tx FIFO handler/callback is called.
c. Tx FIFO handler/callback inserts data into the Tx FIFO.
d. Tx FIFO handler/callback returns.
e. Interrupt is cleared.