CYONS1001x
Document Number: 001-06398 Rev. *J
Page 10 of 24
SPI Interface
SPI Interface Configuration
The main interface to the CYONS1001x sensor is a 4-pin SPI
interface. The sensor is an SPI slave, and the external controller
is the master. If the sensor is the only slave device, the controller
can hold the NCS pin low at all times.
The sensor SPI bus is configured as follows:
■ Bit order is MSB first
■ The SPI bus clock input (SCK) must be between 500 kHz and
2 MHz
■ CPOL = 0, the clock idle state is low
■ CPHA = 0, data is registered as input on the leading edge of
SCK and output on the trailing edge of the SCK
The sensor can process SPI commands when the MOTION pin
is asserted by the sensor. The sensor cannot process SPI
commands in nap, sleep, or hibernate mode.
SPI Interface Commands
Table 9 shows the format of the commands the external
controller can issue to the sensor. Except for the change
resolution and read resolution commands, the commands are
identical for all for all CYONS1001x sensors.
The commands are described in the following sections. Timing
diagrams for the commands are shown on page 13.
Read Tracking Data Command
The read tracking data command reads four bytes of x/y axis
location information in a single long transaction. To reduce the
overhead of this frequent command, no address byte is required,
only a command byte.
Tracking data is reported as relative movement since the last
tracking data read. The tracking data is reported in two’s
complement format. Each time tracking data is read, the internal
accumulators for both the x-axis and the y-axis are reset to zero.
Soft Reset Command
The soft reset command forces the sensor into a soft reset. The
reset takes the same amount of time as a power on reset of the
sensor chip, so the external controller must wait approximately
100 ms before the sensor can respond to further commands.
Test Write Command
The test write command writes a data byte to sensor memory,
where it is read back by the test read command. These
commands enable the developer to test the SPI interface
between the sensor and external controller.
Test Read Command
The test read command reads the test write data byte from
sensor memory. If a test write command has not been issued
before the test read command, the value returned is undefined.
Read Firmware ID Command
The read firmware ID command enables the controller to read a
sensor firmware ID byte, allowing the system to maintain version
control of firmware updates. The command is implemented as a
read to the firmware ID address of the sensor. The byte returned
by the sensor is a unique identifier of the firmware. Other than
that, it is not structured.
Table 9. SPI Command Formats
SPI Command
Request from Master
Response from
Slave
tSPI DELAY_1
(min)
tSPI DELAY_2
(min)
Command byte
Address byte
Data byte
Read tracking
data
0x80
None
None
<x_cnt_high_byte>
<x_cnt_low_byte>
<y_cnt_high_byte>
<y_ cnt_low_byte>
400 µs
20 µs
Soft reset
0x02
0xE0
0x01
No response
400 µs
20 µs
Change
resolution
0x02
0x1A
<data_byte>
No response
400 µs
20 µs
Read resolution
0x82
0x1A
None
<data_byte>
400 µs
100 µs
Test write
0x02
0x1C
0xXX
No response
400 µs
20 µs
Test read
0x82
0x1C
None
<data_byte>
400 µs
100 µs
Read firmware ID
0x82
0xFF
None
<data_byte>
400 µs
100 µs
Read product ID
0x82
0xFE
None
0x0F:CYONS1001
0x0A:CYONS1001L
0x05:CYONS1001T
0x0B:CYONS1001G
0x0C:CYONS1001U
All others reserved
400 µs
100 µs
Read signal level
0x82
0x5B
None
<data_byte>
400 µs
100 µs
[+] Feedback