Architecture
1553
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Universal Parallel Port (uPP)
32.2.7 Reset Considerations
32.2.7.1 Software Reset
Software reset clears the uPP internal state machines but does not reset the contents of the uPP
registers. The following procedure performs a software reset on the uPP peripheral.
1. Write the EN bit in the uPP peripheral control register (UPPCR) to 0 (disables the uPP).
2. Poll the DB bit in UPPCR for activity; wait until DMA controller is inactive/idle.
3. Write the SWRST bit UPPCR to 1 (places uPP in software reset).
4. Write the SWRST bit UPPCR to 0 to (brings uPP out of software reset).
32.2.7.2 Hardware Reset
When the processor RESET pin is asserted, the entire processor is reset and is held in the reset state
until the RESET pin is released. As part of a device reset, the uPP state machines are reset, and the uPP
registers are forced to their default states (see
).
32.2.8 Interrupt Support
The uPP peripheral generates eight interrupt events, all tied to internal DMA Channels I and Q. The uPP
peripheral automatically combines all interrupt events into a single chip-level (CPU) interrupt. Individual
events may be enabled using the uPP interrupt enable set register (UPIES) and disabled using the uPP
interrupt enable clear register (UPIEC). Only enabled events generate interrupts and assert bits in the
interrupt enabled status register (UPIER). Disabled events do not generate interrupts but do assert bits in
the interrupt raw status register (UPISR).
An interrupt service routine (ISR) may be assigned to handle uPP CPU-level interrupts using the interrupt
controller module. If uPP events occur in close proximity to one another, a single CPU interrupt (and a
single call to the ISR) may represent multiple interrupt events. Thus, the uPP ISR must meet certain
structural requirements:
•
The ISR must be able to handle multiple events before returning.
•
The ISR must handle any subsequent events that occur after it is called but before it returns.
•
The ISR must write 00h to the uPP end-of-interrupt register (UPEOI) just before it returns. This allows
future uPP events to generate a CPU interrupt.
provides a sample ISR that demonstrates these requirements.
32.2.8.1 End of Line (EOL) Event
This event occurs each time that the DMA channel reaches the end of a line in the data window. Note that
if the associated uPP interface channel is operating in transmit mode, this event may occur before the
line’s final bytes are actually transmitted over the data pins.
For small line size and fast data transfer, it is possible to “miss” EOL events if they occur faster than the
user’s code can handle them. This does not hinder uPP operation; the uPP peripheral continue processing
data uninterrupted until the EOW event or some error condition is encountered.
32.2.8.2 End of Window (EOW) Event
This event occurs when the DMA channel reaches the end of its current data window. Note that if the
associated uPP interface channel is operating in transmit mode, this event may occur shortly before the
window’s final bytes are actually transmitted over the data pins.
When an EOW event occurs, the DMA channel automatically begins the next DMA transfer if one has
been pre-programmed into the channel descriptor registers. If no new transfer is preprogrammed, the
DMA channel becomes idle. For small window size and fast data transfer, code overhead may make it
impossible to maintain a constant flow of data through the uPP interface channel. This problem can be
solved by increasing the DMA window size or decreasing the peripheral clock speed.