HT82M75REW/HT82K75REW
Rev. 1.00
85
June 11, 2010
·
As the RF Transceiver slave SPI timing diagram shows, the SPI data output mode selection SPI_MODE and the
clock polarity selection SPI_CPOL of the master SPI should be correctly set to fit the slave SPI protocol requirement.
To successfully communicate with the RF Transceiver slave SPI, the SPI_MODE and SPI_CPOL of the MCU master
SPI should be set to [1, 1].
¨
SPI_MODE and SPI_CPOL setup in SPIR Register
Bit
Bit 1
Bit 0
Name
SPI_MODE
SPI_CPOL
Setting value
1
1
The relevant timing diagram for the above setting is shown in the preceding SPI Bus Timing diagram in SPI Serial
Interface section.
·
For the MCU master SPI to completely control the slave SPI SEN line, the MCU master SPI uses a general purpose
I/O line via application program instead of the SPI SCS line with hardware mechanism. To achieve this requirement,
the software CSEN enable control bit SPI_CSEN of the Master SPI should be set to 0, then the master SPI SCS line
will lose the SCS line characteristics and be configured as a general purpose I/O line.
¨
SPI_CSEN software CSEN enable control bit in SPIR Register
Bit
Bit 5
Name
SPI_CSEN
Setting value
0
0: the software CSEN function is disabled and the SCS line is configured as an I/O line
·
Finally set the SPI_EN bit to 1 to ensure that the pin-shared function for other three SPI lines known as SCK, SDI and
SDO are surely selected.
¨
SPI_EN software SPI interface lines enable control bit in SPIR Register
Bit
Bit 5
Name
SPI_EN
Setting value
1
1: the pin-shared function of the SPI interface lines is enabled.
After the above setup conditions have been implemented, the MCU can enable the SPI interface by setting the
SBEN bit high. The MCU can then begin communication with the RF Transceiver using the SPI interface. The de-
tailed MCU Master SPI functional description is provided within the SPI Serial Interface section of the MCU
datasheet.
electronic components distributor