SPI Programming Manual (G06.24+, H06.03+, J06.03+)

SPI Concepts and Protocol
SPI Programming Manual427506-006
2-18
Buffer Checksum
Buffer Checksum
The SPI buffer contains a checksum that the SPI procedures can use to detect
corruption of the buffer contents.
Figure 2-4. Pointer Manipulation Examples
C
P
N
VST008.vsd
H
T1 T2H
T1 T2 T3 T3H
T1 T2 T3 T3
H
T1 T2 T3 T3H
T1H
C
N
C
N
P
P C
N
T1 T2 T3H
P C
N
T1 T2 T3 T3H
C
N
P
P
C N P
C
N
P
T1 T2 T3 T3H
C N P
C
N
T1 T2 T3 T3H
Legend
Current-Token Pointer
C
P
Last-Put-Token Pointer
N
Next-Token Pointer
This sequence of procedure
calls demonstrates how the SPI
procedures manipulate the
current-token, next-token and
last-put-token pointers.
7
10
2
SSPUT (...,T1...)
3
SSPUT (...,T2...)
4
SSPUT (...,T3...)
5
SSPUT (...,T3...)
1
SSINIT (buffer,...)
6
SSPUT (...,ZSPI-TKN-RESET-BUFFER,...)
SSGET (...,T1,...)
8
SSGET (...,ZSPI-TKN-NEXTTOKEN,...)
SSGET (...,T3,2,...)
9
SSGET (...,T2,...)