SPORT Programming Examples
9-74
ADSP-2126x SHARC Processor Hardware Reference
To avoid hanging the processor core—check the buffer’s full/empty status
when the core’s program reads a word from a serial port’s receive buffer or
writes a word to its transmit buffer. This condition can also happen to an
external device, for example a host processor, when it is reading or writing
a serial port buffer. The full/empty status can be read in the
DXS
bits of the
SPCTLx
register. Reading from an empty receive buffer or writing to a full
transmit buffer causes the processor (or external device) to hang, while it
waits for the status to change.
To support debugging buffer transfers, the processor has a Buffer
Hang Disable (
BHD
) bit. When set (= 1), this bit prevents the pro-
cessor core from detecting a buffer-related stall condition,
permitting debugging of this type of stall condition. For more
information, see the
BHD
bit discussion on
.
Multiple interrupts can occur if both SPORTs transmit or receive data in
the same cycle. Any interrupt can be masked in the
IMASK
register; if the
interrupt is later enabled in the
LIRPTL
register, the corresponding inter-
rupt latch bit in the
IRPTL
or
LIRPTL
registers must be cleared in case the
interrupt has occurred in the same time period.
When serial port data packing is enabled (
PACK=1
in the
SPCTLx
Control
registers), the transmit and receive interrupts are generated for 32-bit
packed words, not for each 16-bit word.
SPORT Programming Examples
The third listing,
, transmits a buffer of data from
SPORT1
to
SPORT0
using DMA chaining and the internal loopback feature of the
serial port. In this example,
SPORT5
drives the clock and frame sync, and
the two TCBs for each
SPORT
are set up to ping-pong back and forth to
continually send and receive data.
, transmits a buffer of data from
SPORT5
to
SPORT4
using DMA and the internal loopback feature of the serial port. In
Содержание ADSP-21261 SHARC
Страница 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Страница 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Страница 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Страница 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Страница 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...