Maximum packet size for DWM1000 SSR code example

For the SSR example: What is the largest number of bytes expected to be sent/received via SPI?
Also, what is highest address value used?

If this is less than 256, can I change all the buffer lengths to unit8?

I have ported the deca library and SSR example to another micro controller and notice a few inconsistencies in the buffer sizes fro spi transfers. In the SPI routine the headerLength is uin16 and bodyLength uint32.

Also in main loop we have this statement where RX_BUFFER_LEN is set to 1024 but the rx_buffer length is define as 12 bytes.

if (frame_len <= RX_BUFFER_LEN) //if correct number of bytes received then process data
dwt_readrxdata(rx_buffer, frame_len, 0);

Hi orbitcom,

Have you used the SS_TWR for nordic (from github) as a reference ? Or directly from the dw1000 driver ?


I am not sure of the original source, I think it is native Decawave. The copyright in main.c is as shown below. Because some of the length bytes in SPI function calls are 32bit and 16 bit, I can’t see there would be packets with data packets with over 16000 bytes, in which case I could make then all uint8 instead of uint32.

/*! ----------------------------------------------------------------------------

  • @file main.c
  • @brief Single-sided two-way ranging (SS TWR) initiator example code
  •       This is a simple code example which acts as the initiator in a SS TWR distance measurement exchange. This application sends a "poll"
  •       frame (recording the TX time-stamp of the poll), after which it waits for a "response" message from the "DS TWR responder" example
  •       code (companion to this application) to complete the exchange. The response message contains the remote responder's time-stamps of poll
  •       RX, and response TX. With this data and the local time-stamps, (of poll TX and response RX), this example application works out a value
  •       for the time-of-flight over-the-air and, thus, the estimated distance between the two devices, which it writes to the LCD.
  • @attention
  • Copyright 2015 © Decawave Ltd, Dublin, Ireland.
  • All rights reserved.
  • @author Decawave