MC68HC708XL36 FREESCALE [Freescale Semiconductor, Inc], MC68HC708XL36 Datasheet - Page 217

no-image

MC68HC708XL36

Manufacturer Part Number
MC68HC708XL36
Description
HCMOS Microcontroller Unit
Manufacturer
FREESCALE [Freescale Semiconductor, Inc]
Datasheet
17-spi_c
MOTOROLA
In this case, an overflow can easily be missed. Since no more SPRF
interrupts can be generated until this OVRF is serviced, it is not obvious
that bytes are being lost as more transmissions are completed. To
prevent this, either enable the OVRF interrupt or do another read of the
SPSCR following the read of the SPDR. This ensures that the OVRF
was not set before the SPRF was cleared and that future transmissions
can set the SPRF bit.
avoid this second SPSCR read, enable the OVRF to the CPU by setting
the ERRIE bit.
SPSCR
OVRF
READ
READ
SPDR
SPRF
Freescale Semiconductor, Inc.
For More Information On This Product,
1
2
3
4
BYTE 1
BYTE 1 SETS SPRF BIT.
CPU READS SPSCR WITH SPRF BIT SET
AND OVRF BIT CLEAR.
CPU READS BYTE 1 IN SPDR,
CLEARING SPRF BIT.
BYTE 2 SETS SPRF BIT.
1
Figure 10. Missed Read of Overflow Condition
2
Go to: www.freescale.com
3
Figure 11
SPI
BYTE 2
4
illustrates this process. Generally, to
BYTE 3
5
5
6
7
8
6
CPU READS SPSCR WITH SPRF BIT SET
AND OVRF BIT CLEAR.
BYTE 3 SETS OVRF BIT. BYTE 3 IS LOST.
CPU READS BYTE 2 IN SPDR, CLEARING SPRF BIT,
BUT NOT OVRF BIT.
BYTE 4 FAILS TO SET SPRF BIT BECAUSE
OVRF BIT IS NOT CLEARED. BYTE 4 IS LOST.
7
BYTE 4
8
MC68HC708XL36
Error Conditions
217
SPI

Related parts for MC68HC708XL36