3 checksum, 4 serial time out, 3 checksum 6.1.4 serial time out – Cirrus Logic CS5484 User Manual

Page 28: Figure 22. byte sequence for checksum, Table 3. instruction format, Cs5484

Advertising
background image

CS5484

28

DS981F3

Table 3. Instruction Format

6.1.3 Checksum

To improve the communication reliability on the serial
interface, the CS5484 provides a checksum mechanism
on transmitted and received signals. Checksum is
disabled by default but can be enabled by setting the
appropriate bit in the SerialCtrl register. When enabled,
both host and CS5484 are expected to send one
additional checksum byte after the normal command
byte and applicable 3-byte register data has been
transmitted.

The checksum is calculated by subtracting each
transmit byte from 0xFF. Any overflow is truncated and
the result wraps. The CS5484 executes the command
only if the checksum transmitted by the host matches
the checksum calculated locally. Otherwise, it sets a
status bit (RX_CSUM_ERR in the Status0 register),
ignores the command, and clears the serial interface in
preparation for the next transmission.

Figure 22. Byte Sequence for Checksum

6.1.4 Serial Time Out

In case a transaction from the host is not completed (for
example, a data byte is missing in a register write), a
time out circuit will reset the interface after 128ms. This
will require that each byte be sent from the host within
128ms of the previous byte.

Function

Binary Value

Note

Controls

0 C

4

C

3

C

2

C

1

C

0

0 00001 - Software Reset
0 00010 - Standby
0 00011 - Wakeup
0 10100 - Single Conv.
0 10101 - Continuous Conv.
0 11000 - Halt Conv.

C

[5]

specifies the

instruction type:
0 = Controls
1 = Calibrations

Calibrations

1 C

4

C

3

C

2

C

1

C

0

1 00

C

2

C

1

C

0

DC

Offset

1 10

C

2

C

1

C

0

AC Offset*

1 11

C

2

C

1

C

0

Gain

For calibrations,
C

[4:3]

specifies the

type of calibration.
*AC Offset calibra-
tion valid only for cur-
rent channel

1 C

4

C

3

C

2

C

1

C

0

1 C

4

C

3

0 0 1

I1

1 C

4

C

3

0 1 0

V1

1 C

4

C

3

0 1 1

I2

1 C

4

C

3

1 0 0

V2

1 C

4

C

3

1 1 0

All Four

For calibrations,
C

[2:0]

specifies the

channel(s).

SDI/RX

Checksum

Page Select Cmd.

SDO/TX

SDI/RX

CHECKSUM

DATA

DATA

DATA

CHECKSUM

Read Cmd.

SDI/RX

DATA

DATA

DATA

CHECKSUM

Write Cmd.

SDI/RX

Checksum

Instruction

Page Select

Instruction

Read Command

Write Command

Advertising