Skip to content

SDM : Protocol Description

Oleksiy Kebkal edited this page Mar 27, 2024 · 3 revisions

Interface description

default socket: IP:4200

SDM Frame Format

<0x80,0x00,0x7f,0xff,0x00,0x00,0x00,0x00>
      ,<cmd:8>,<param:24>,<len:32>,<data:len*16>

all numbers are little-endian.

to phy:

cmd code param len description
STOP 0 0 0 - ongoing TX: stop transmitting until FPGBUSY EDGE
- ongoing RX: stop receiving until FPGABUSY EDGE
- otherwise: send SDM_CMD_STOP command
TX 1 0 > 0 - ongoing TX: return BUSY,TX and stop ongoing data transmission until FPGABUSY EDGE
- ongoing RX: return BUSY,RX and stop ongoing data reception until FPGABUSY EDGE
- otherwise: transmission of len 16-bit samples, transmission begins immediately (TX_ON and SDM_CMD_TX)
- len must be divisible by 1024, otherwise undefined behaviour
RX 2 len: >= 0 0 - ongoing TX: return BUSY,TX and stop ongoing data transmission until FPGABUSY EDGE
- ongoing RX: redefine param and continue to do RX
- otherwise: send SDM_CMD_RX command
- param len: length of 16-bit samples want to be received
- if len equal 0 then 16-bit samples will be received till comman SDM_CMD_STOP
REF 3 0 `>` 0 - ongoing TX or RX: return BUSY and stop ongoing process until FPGABUSY EDGE
- otherwise: send SDM_CMD_REF
CONFIG 4 - thr:16
- gain:1
- srclevel:7
0/1 If len == 1, data contains preamplifier gain: preamp_gain:4,reserved:12
Preamplifier gain is described in the table below
If thr == 0, RX bypasses threshold and starts RX immediately
Example: by thr:350, gain: 1, source level: 2, param value is 0x5e,0x01,0x82
USBL_CONFIG 5 - preamp_gain:4
- sample_rate:3
- reserved:17
4 - write_delay:32 in samples, 65535 max
- data_length:32 in samples, 1024,2048…51200
USBL_RX 6 - data_len:16
- channel:3
- reserved:5
0
SYSTIME 7 0 0 requests current dsp clock value, last tx time, last rx time in us

USBL_CONFIG, USBL_RX, SYSTIME since dsp version 0x40da

from phy:

cmd code param len description
STOP 0 0 0 report about STOP higher level
RX 2 0 >= 0 start data reception, prepare RX frame header, len contains predefined by higher layer parameter
USBL_RX 6 0 >= 0 start USBL data reception, prepare RX frame header, len contains predefined by higher layer parameter
SYSTIME 7 0 6 current_time:32/unsigned-little-endian,
tx_time:32/unsigned-little-endian,
rx_time:32/unsigned-little-endian
SYSTIME 7 0 8 current_time:32/unsigned-little-endian,
tx_time:32/unsigned-little-endian,
rx_time:32/unsigned-little-endian,
sync_in_time:32/unsigned-little-endian

SYNCIN and sync_in_time from dsp version 0x40dc

time in microseconds

NOTE: by switching to PHY STOP is generated.

sdm sublayer reports:

cmd cmd code param len description
SYNCIN 253 0 0 sync in event (clock can be requested with SYSTIME)
BUSY 254 1 or 2 0 in case of race conditions
REPORT 255 0 0 stop rejected (not in SDM mode)
1 len transmission stopped after len samples (FPGABUSY EDGE)
2 len reception stopped after len samples (FPGABUSY EDGE)
3 0 reference update failed
3 len reference update finished
4 0 config failed
4 1 config accepted
5 0 usbl config failed
5 1 usbl config accepted
6 len usbl reception stopped after len samples (FPGABUSY EDGE)
7 0 system time request failed
254 len garbage dropped
255 code unknown command code

SYNCIN and sync_in_time from dsp version 0x40dc