Using the SIM Receiver
MOTOROLA
SmartCard Interface Module (SIM)
25-45
25.7.6 Configuring the SIM Cyclic Redundancy Check Block
Table 25-31 provides the steps to configure the SIM cyclic redundancy check (CRC) block for operation
and the cross references for identifying the specific section for additional reference.
25.8 Using the SIM Receiver
After the SIM has been properly configured (correct baud rate, correct data format, and so on), SIM
receptions are enabled by setting the RCV_EN bit in the ENABLE register (see page 25-26). As bytes are
received, they are placed in the 32-byte deep receive data FIFO. Unread bytes are accessible from this
FIFO at any time. There is no need to disable the receiver to access the FIFO. The FIFO should be read
only when the receive FIFO data flag, RFD, in the RCV_STATUS register (see page 25-29) is set. The
RFD flag, which cannot create an interrupt, is high any time there is at least one unread byte in the receive
FIFO. When the receive FIFO is read when RFD is low, it simply produces the last byte read.
The receive data register full flag, RDRF, in the RCV_STATUS register (see page 25-29) determines when
the receive FIFO has reached a given threshold value. This flag creates an interrupt when the RIM bit in
the INT_MASK register (see page 25-31) is clear. To control at which point RDRF is set, program the
RDT bits in the RCV_THRESHOLD register (see page 25-26). When the number of unread bytes in the
receive FIFO is equal to or greater than the value set by RDT, RDRF is set.
NOTE:
A value of 0x0 in RDT implies that there must be 32 unread bytes in the
receive FIFO to trigger RDRF.
The value in RDT can be changed at any time to alter this threshold level. The comparison between the
number of unread bytes in the FIFO and the value set by RDT is continuously updated so that any change
in either is immediately reflected in the state of RDRF. For instance, when RDT is set to 5, and there are 3
unread bytes in the FIFO, changing RDT to 2 immediately sets RDRF. Likewise, setting RDT back to 5
clears RDRF. Similarly, when there are 5 unread bytes in the receive FIFO and RDT is set to 3, RDRF
remains high until 3 reads are complete, assuming RDT is left as a constant and no new data is received.
The standard flow for receiving bytes from the SmartCard is to set RDT to the appropriate value, wait for
RDRF to cause an interrupt (RIM clear), and then read bytes out of the receive FIFO as long as RFD is
high. In addition to checking RFD between every byte, it is also recommended that software check for the
existence of a set OEF flags as well.
Table 25-31. Configuring the SIM Cyclic Redundancy Check Block
Step
Action
Reference
1.
Enable the CRC block:
a. Use the CRCEN bit in the CNTL register.
b. Use the XMT_EN_LRC_CRC bit to enable the transmission of the
CRC Character after the last character in the Transmit FIFO is sent.
See the T = 1 programming model for more details.
Section 25.6.2, “Control Register,”
on page 25-23
Section 25.10.2.3 on page 25-54
Summary of Contents for DragonBall MC9328MX1
Page 68: ...1 12 MC9328MX1 Reference Manual MOTOROLA Introduction ...
Page 86: ...2 18 MC9328MX1 Reference Manual MOTOROLA Signal Descriptions and Pin Assignments ...
Page 116: ...3 30 MC9328MX1 Reference Manual MOTOROLA Memory Map ...
Page 126: ...4 10 MC9328MX1 Reference Manual MOTOROLA ARM920T Processor ...
Page 160: ...8 8 MC9328MX1 Reference Manual MOTOROLA System Control ...
Page 272: ...13 32 MC9328MX1 Reference Manual MOTOROLA DMA Controller ...
Page 281: ...Programming Model MOTOROLA Watchdog Timer Module 14 9 ...
Page 282: ...14 10 MC9328MX1 Reference Manual MOTOROLA Watchdog Timer Module ...
Page 300: ...15 18 MC9328MX1 Reference Manual MOTOROLA Analog Signal Processor ASP ...
Page 438: ...18 16 MC9328MX1 Reference Manual MOTOROLA Serial Peripheral Interface Modules SPI 1 and SPI 2 ...
Page 478: ...19 40 MC9328MX1 Reference Manual MOTOROLA LCD Controller ...
Page 574: ...21 32 MC9328MX1 Reference Manual MOTOROLA Memory Stick Host Controller MSHC Module ...
Page 598: ...23 16 MC9328MX1 Reference Manual MOTOROLA Real Time Clock RTC ...
Page 670: ...24 72 MC9328MX1 Reference Manual MOTOROLA SDRAM Memory Controller ...
Page 726: ...25 56 MC9328MX1 Reference Manual MOTOROLA SmartCard Interface Module SIM ...
Page 736: ...26 10 MC9328MX1 Reference Manual MOTOROLA General Purpose Timers ...
Page 854: ...29 18 MC9328MX1 Reference Manual MOTOROLA I2C Module ...
Page 900: ...30 46 MC9328MX1 Reference Manual MOTOROLA Synchronous Serial Interface SSI ...
Page 942: ...32 26 MC9328MX1 Reference Manual MOTOROLA GPIO Module and I O Multiplexer IOMUX ...