Hitachi H8/3048 Hardware Manual page 527

Single-chip microcomputer
Table of Contents

Advertisement

A TXI interrupt is requested when the TEND flag is set to 1 in SSR. An RXI interrupt is requested
when the RDRF flag is set to 1 in SSR. An ERI interrupt is requested when the ORER, PER, or
www.DataSheet4U.com
ERS flag is set to 1 in SSR. These relationships are shown in table 14-8.
Table 14-8 Smart Card Mode Operating States and Interrupt Sources
Operating State
Transmit mode
Normal operation
Error
Receive mode
Normal operation
Error
Data Transfer by DMAC: The DMAC can be used to transmit and receive in smart card mode, as
in normal SCI operations. In transmit mode, when the TEND flag is set to 1 in SSR, the TDRE flag
is set simultaneously, generating a TXI interrupt. If TXI is designated in advance as a DMAC
activation source, the DMAC will be activated by the TXI request and will transfer the next transmit
data. This data transfer by the DMAC automatically clears the TDRE and TEND flags to 0. When an
error occurs, the SCI automatically retransmits the same data, keeping TEND cleared to 0 so that the
DMAC is not activated. The SCI and DMAC will therefore automatically transmit the designated
number of bytes, including retransmission when an error occurs. When an error occurs the ERS flag
is not cleared automatically, so the RIE bit should be set to 1 to enable the error to generate an ERI
request, and the ERI interrupt handler should clear ERS.
When using the DMAC to transmit or receive, first set up and enable the DMAC, then make SCI
settings. DMAC settings are described in section 8, DMA Controller.
In receive operations, when the RDRF flag is set to 1 in SSR, an RXI interrupt is requested. If
RXI is designated in advance as a DMAC activation source, the DMAC will be activated by the
RXI request and will transfer the received data. This data transfer by the DMAC automatically
clears the RDRF flag to 0. When an error occurs, the RDRF flag is not set and an error flag is set
instead. The DMAC is not activated. The ERI interrupt request is directed to the CPU. The ERI
interrupt handler should clear the error flags.
Examples of Operation in GSM Mode
When switching between smart card interface mode and software standby mode, use the following
procedures to maintain the clock duty cycle.
Switching from smart card interface mode to software standby mode
1.
Set the P94 data register (DR) and data direction register (DDR) to the values for the
fixed output state in software standby mode.
Flag
Mask Bit
TEND
TIE
ERS
RIE
RDRF
RIE
PER, ORER
RIE
517
Interrupt
DMAC
Source
Activation
TXI
Available
ERI
Not available
RXI
Available
ERI
Not available

Advertisement

Table of Contents
loading

Table of Contents