English
Language : 

XC161 Datasheet, PDF (178/419 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Asynchronous/Synchronous Serial Interface (ASC)
18.7
Interrupts
Six interrupt sources are provided for serial channel ASC. Line TIR indicates a transmit
interrupt, TBIR indicates a transmit buffer interrupt, RIR indicates a receive interrupt and
EIR indicates an error interrupt of the serial channel. The autobaud detection unit
provides two additional interrupts, the ABSTIR start of autobaud operation interrupt and
the ABDETIR autobaud detected interrupt. The interrupt output lines TBIR, TIR, RIR,
EIR, ABSTIR, and ABDETIR are activated (active state) for two periods of the module
clock fASC.
The cause of an error interrupt request (framing, parity, overrun error) can be identified
by the error status flags FE, PE, and OE. For the two autobaud detection interrupts
register ABSTAT provides status information.
Note: In contrary to the error interrupt request line EIR, the error status flags FE/PE/OE
are not reset automatically but must be cleared by software.
For normal operation (i.e. besides the error interrupt) the ASC provides three interrupt
requests to control data exchange via this serial channel:
• TBIR is activated when data is moved from TBUF to the transmit shift register.
• TIR is activated before the last bit of an asynchronous frame is transmitted, or after
the last bit of a synchronous frame has been transmitted.
• RIR is activated when the received frame is moved to RBUF.
Note: While the receive task is handled by a single interrupt handler, the transmitter is
serviced by two interrupt handlers. This provides advantages for the servicing
software.
For single transfers it is sufficient to use the transmitter interrupt (TIR), which indicates
that the previously loaded data has been transmitted, except for the last bit of an
asynchronous frame. For multiple back-to-back transfers it is necessary to load the
following piece of data at last until the time the last bit of the previous frame has been
transmitted. In Asynchronous Mode this leaves just one bit-time for the handler to
respond to the transmitter interrupt request, in Synchronous Mode it is impossible at all.
Using the transmit buffer interrupt (TBIR) to reload transmit data gives the time to
transmit a complete frame for the service routine, as TBUF may be reloaded while the
previous data is still being transmitted.
The start of autobaud operation interrupt ABSTIR is generated whenever the autobaud
detection unit is enabled (ABEN and ABDETEN and ABSTEN are set), and a start bit
has been detected at RxD. In this case ABSTIR is generated during Autobaud Detection
whenever a start bit is detected.
The autobaud detected interrupt ABDETIR is always generated after recognition of the
second character of the two-byte frame, this means after a successful Autobaud
Detection. If FCDETEN is set the autobaud detected interrupt ABDETIR is also
generated after the recognition of the first character of the two-byte frame.
User’s Manual
ASC_X, V2.0
18-35
V2.2, 2004-01