Rev. 1.10
80
November 26, 2019
Rev. 1.10
81
November 26, 2019
HT68FB240
USB Low Speed Flash MCU
Bit 0
TRF:
SPI Transmit/Receive Complete flag
0: Data is being transferred
1: SPI data transmission is completed
The TRF bit is the Transmit/Receive Complete flag and is set "1" automatically when
an SPI data transmission is completed, but must set to "0" by the application program.
It can be used to generate an interrupt.
SBSC Register
Bit
7
6
5
4
3
2
1
0
Name
SIM_WCOL
—
I2CDB1 I2CDB0
—
—
—
—
R/W
R/W
—
R/W
R/W
—
—
—
—
POR
0
—
0
0
—
—
—
—
Bit 7
SIM_WCOL:
SIM
WCOL control bit
0: Disable
1: Enable
Bit 6
Unimplemented, read as "0"
Bit 5~4
I2CDB1~I2CDB0:
I
2
C debounce selection bits
Related to I
2
C function, described elsewhere
Bit 3~0
Unimplemented, read as "0"
SPI Communication
After the SPI interface is enabled by setting the SIMEN bit high, then in the Master Mode, when
data is written to the SIMD register, transmission/reception will begin simultaneously. When the
data transfer is complete, the TRF flag will be set automatically, but must be cleared using the
application program. In the Slave Mode, when the clock signal from the master has been received,
any data in the SIMD register will be transmitted and any data on the SDI pin will be shifted into
the SIMD register. The master should output an
SCS
signal to enable the slave device before a
clock signal is provided. The slave data to be transferred should be well prepared at the appropriate
moment relative to the
SCS
signal depending upon the configurations of the CKPOLB bit and CKEG
bit. The accompanying timing diagram shows the relationship between the slave data and
SCS
signal
for various configurations of the CKPOLB and CKEG bits.
The SPI will continue to function even in the IDLE Mode.
SPI Master Mode Timing