Our website is under construction. Please stay tuned!

dwm_backhaul_xfer

Writes downlink data and reads uplink data chunks. The DWM module must be configured as a bridge.

The uplink and the downlink data are encoded into TLV frames and transferred by the SPI interface as described in .

The SPI master tells the slave how many downlink bytes it wants to transfer by downlink_byte_cnt. The downlink_byte_cnt is read by the slave in the first SPI transfer. The slave has some uplink data ready to transfer to the master as it reads the downlink. To transfer both the downlink from the master to the slave and the uplink from the slave to the master, the slave has to calculate how many bytes and SPI transfers are needed. The master reads the number of the bytes and the number of the transfers in the second SPI transfer as it is explained in . Finally, the transfers are executed and both uplink and downlink are transferred. The maximum number of transfers currently supported is 5 with a maximum payload of 253 bytes, which is 255 - size of(TLV header). At most, 5 uplink frames and 2 downlink frames are supported in one call to dwm_backhaul_xfer.

void dwm_backhaul_xfer(uint16_t, uint8_t*)
Parameters
  • input – downlink_byte_cnt, 2 * [downlink_chunk]

  • downlink_byte_cnt – ? 16 bit unsigned integer ? (number of downlink data bytes without TLV header, 506 bytes max)

  • downlink_chunk – ? max 253 bytes ? (opaque data send as downlink to the slave)

  • output – 5 * [uplink_chunk]

  • uplink_chunk – ? max 253 bytes ? (opaque data send as uplink to the master)

C code example

Not available for the user application.

UART example

Not available on the UART interface.

SPI example other than Bridge

TLV request

type

length

value

0x37

0x02

downlink_byte_cnt = size of downlink data (244 bytes)

0xF4 0x00

Type 0x37 means command dwm_backhaul_xfer

TLV response

type

length

value (see error codes)

0x40

0x01

0x02

SPI example Bridge

Downlink bytes count: 244
Uplink bytes count: 980

TLV request

type

length

value

0x37

0x02

downlink_byte_cnt

= size of downlink data (244 bytes)

0xF4 0x00

Type 0x37 means command dwm_backhaul_xfer

This call has a variable number of consecutive transfers that follow the TLV request. See API over SPI interface description..

TLV downlink nr.1,2,3,4,5

type

length (244 bytes)

value

0x64

0xF4 (244)

downlink data chunk nr.1

0x65

0x00

empty

0x66

0x00

empty

0x67

0x00

empty

0x68

0x00

empty

TLV uplink nr.1,2,3,4,5

type

length (980 bytes)

value

0x6E

0xFD (253)

uplink data chunk nr.1

0x6F

0xFD

uplink data chunk nr.2

0x70

0xFD

uplink data chunk nr.3

0x71

0xDD (22#.

uplink data chunk nr.4

0x72

0x00

empty

Type 0x64 means downlink data chunk nr.1
Type 0x65 means downlink data chunk nr.2
Type 0x68 means downlink data chunk nr.5
Type 0x6E means uplink data chunk nr.1
Type 0x6F means uplink data chunk nr.2
Type 0x72 means uplink data chunk nr.5