Reading data from the accumulator

Hi Everyone,

I’m trying to read the accumulator data. I’m using 2 EVB1000 boards and Decawave’s source code (version 3.11).

I tried it by inserting the following lines at the beginning of function “instance_rxgoodcallback(const dwt_cb_data_t *rxd)” in instance_common.c:

[code]static uint16 len_x = 180 + 1;
uint8 accum_b[4065];

dwt_readaccdata(accum_b, len_x, 0);[/code]

If I make len_x 181 or smaller, everything works as expected (i.e. I can retrieve that portion of the accumulator data and two-way ranges are reported by the tag and anchor).

For some odd reason, if I make len_x larger than 181, the tag displays “RANGING WITH 102689205E69191E” and the anchor displays “AWAITING POLL” and both cease to report two-way ranges.

Does anyone have any idea what could be causing this? Thanks!

:slight_smile:
of course, … the accumulator read (over SPI) takes a lot of time… thus the ranging cannot proceed unless you change the response times. E.g. if you are reading accumulator after the Poll is received, then the anchor will not have time to respond (the dwt_starttx will return “LATE” error).

When EVK is running and there are no ranges reported the LCDs display original (pre-ranging) message.

Thanks for the tip Zoran. I was able to make len_x larger by changing the following variables in instance.h:

[code]//#define RX_TO_TX_TIME_US 150
#define RX_TO_TX_TIME_US 950

//#define TAG_TURN_AROUND_TIME_US 500
#define TAG_TURN_AROUND_TIME_US 1300[/code]

It now works as expected.