English
Language : 

BC68F0031 Datasheet, PDF (92/148 Pages) Holtek Semiconductor Inc – I/O RF Transparent Transmission Flash MCU
BC68F0031
I/O RF Transparent Transmission Flash MCU
Slave Mode:
• Step 1
Select the SPI Slave mode using the SPIM2~SPIM0 bits in the SPIC0 control register.
• Step 2
Setup the CSEN bit and setup the MLS bit to choose if the data is MSB or LSB shifted first, this
setting must be the same with the Master device.
• Step 3
Setup the SPIEN bit in the SPIC0 control register to enable the SPI interface.
• Step 4
For write operations: write the data to the SPID register, which will actually place the data into
the TXRX buffer. Then wait for the master clock SCK and SCS signal. After this, go to step 5.
For read operations: the data transferred in on the SDI line will be stored in the TXRX buffer
until all the data has been received at which point it will be latched into the SPID register.
• Step 5
Check the WCOL bit if set high then a collision error has occurred so return to step 4. If equal to
zero then go to the following step.
• Step 6
Check the TRF bit or wait for a SPI serial bus interrupt.
• Step 7
Read data from the SPID register.
• Step 8
Clear TRF.
• Step 9
Go to step 4.
Error Detection
The WCOL bit in the SPIC1 register is provided to indicate errors during data transfer. The bit is
set by the SPI serial Interface but must be cleared by the application program. This bit indicates a
data collision has occurred which happens if a write to the SPID register takes place during a data
transfer operation and will prevent the write operation from continuing.
Rev. 1.01
92
April 11, 2017