ST10R272L - ASYNCHRONOUS/SYNCHRONOUS SERIAL INTERFACE
237/320
While the task of the receive interrupt handler is clear, 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 (S0TIR), 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 data at least until
the time the last bit of the previous frame is being 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 not possible at all.
Using the transmit buffer interrupt (S0TBIR) to reload transmit data allows the time to
transmit a complete frame for the service routine, as S0TBUF may be reloaded while the
previous data is still being transmitted.
As shown in the figure below, S0TBIR is an early trigger for the reload routine, and S0TIR
indicates the completed transmission. Therefore,a software-using handshake should rely on
S0TIR at the end of a data block to make sure that all data has really been transmitted.
Figure 96 ASC0 interrupt generation
Idle
Idle
Star
t
S
tar
t
S
tar
t
Stop
Sto
p
Sto
p
S0TBIR
S0TBIR
S0TBIR
S0TIR
S0TIR
S0TIR
S0RIR
S0RIR
S0RIR
Idle
Idle
S0TBIR
S0TBIR
S0TBIR
S0TIR
S0TIR
S0TIR
S0RIR
S0RIR
S0RIR
Asynchronous Mode
Synchronous Mode