English
Language : 

PAW3212DB-TJDT Datasheet, PDF (16/31 Pages) Pixart Imaging Inc. – ULTRA LOW POWER WIRELESS MOUSE SENSOR
PAW3212DB-TJDT
9. 2-wired SPI Serial Interface
To be compatible to PixArt previous generation mouse sensors, the sensor reserves 2-wired SPI interface mode (SCLK, SDIO). All the
transmission protocols are exactly the same as 3-wired SPI except the NCS pin is ignored in 2-wired SPI mode.
Switching to 2-wired SPI Mode
Since the 3-wired SPI is the power-on default setting of the sensor, the host controller has to write sensor registers to switch the sensor from
3-wired SPI mode to 2-wired SPI mode after the sensor power-up sequence. By forcing the NCS pin to low, the host is able to write the
registers below to switch to 2-wired SPI mode. Without writing the registers below, the re-synchronization mechanism will be invalid.
Write address 0x09 = 0x5A;
Write address 0x26 = 0x34;
Write address 0x09 = 0x00;
to disable Write Protect
to switch to 2-wired SPI and disable NCS pin function
to enable Write Protect
Re-synchronization of the SPI
Two possible conditions listed below might cause the 2-wired SPI being out of synchronization and the host controller will not be able to
correctly access the registers of the sensor.
• Wrong system power-up sequence – The host controller begins to toggle the SPI while the sensor has not finished the power-up
sequence.
• Unexpected ESD event – When ESD event happens, the SCLK signal might be destroyed by electric surge and causes the SPI being
out of synchronization.
Since there is no NCS function to reset the SPI bus when SPI communication is being out of synchronization, a special mechanism is
needed to reset the SPI. To recover the correct communication of SPI, the host controller can de-assert the SCLK for at least tRESYNC (1us
min), and then keep SCLK asserted for a certain time interval tWDT (1.7ms, min) as shown in Figure 17. to force the SPI control circuits of the
sensor to reset. This method of re-synchronization is called “watchdog timer timeout”. The re-synchronization will only reset the SPI circuits
of the sensor, and the existing sensor register values will keep unchanged. Be noticed that this re-synchronization is NOT valid when the
sensor is at power down mode. If users perform re-synchronization during power down mode, the SPI will be out of synchronization. To
make sure if the 2-wired SPI interface is back to synchronization, the host controller could read register address 0x00 to check if the value is
0x30. If the value is not correct, please perform re-synchronization again until the correct value (0x30) has been read.
Figure 18. Re-synchronization the SPI Using Watchdog Timer
_____________________________________________________________________________________________________________________________
All rights strictly reserved, any portion in this paper shall not be reproduced, copied or transformed to any other forms without permission.
E-mail: fae_service@pixart.com
PixArt Imaging Confidential
PAW3212DB-TJDT-DS-R1.2-19112014
16