Page 1 of 1

110Kbps don't work

Posted: Mon Feb 27, 2017 4:05 pm
by justinleeyang
Hi, All:

I want to try the 110Kbps, but range don't work, anchor only receive the data, but don't return data to tag.

Re: 110Kbps don't work

Posted: Tue Feb 28, 2017 5:12 am
by justinleeyang
Hi, all:

I find the config as following:

Code: Select all

void dwSetDataRate(dwDevice_t* dev, uint8_t rate) {
	rate &= 0x03;
	dev->txfctrl[1] &= 0x83;
	dev->txfctrl[1] |= (uint8_t)((rate << 5) & 0xFF);
	// special 110kbps flag
	if(rate == TRX_RATE_110KBPS) {
		setBit(dev->syscfg, LEN_SYS_CFG, RXM110K_BIT, true);
	} else {
		setBit(dev->syscfg, LEN_SYS_CFG, RXM110K_BIT, false);
	}
	// SFD mode and type (non-configurable, as in Table )
	if(rate == TRX_RATE_6800KBPS) {
		setBit(dev->chanctrl, LEN_CHAN_CTRL, DWSFD_BIT, false);
		setBit(dev->chanctrl, LEN_CHAN_CTRL, TNSSFD_BIT, false);
		setBit(dev->chanctrl, LEN_CHAN_CTRL, RNSSFD_BIT, false);
	} else {
		setBit(dev->chanctrl, LEN_CHAN_CTRL, DWSFD_BIT, true);
		setBit(dev->chanctrl, LEN_CHAN_CTRL, TNSSFD_BIT, true);
		setBit(dev->chanctrl, LEN_CHAN_CTRL, RNSSFD_BIT, true);
	}
	uint8_t sfdLength;
	if(rate == TRX_RATE_6800KBPS) {
		sfdLength = 0x08;
	} else if(rate == TRX_RATE_850KBPS) {
		sfdLength = 0x10;
	} else {
		sfdLength = 0x40;
	}
	dwSpiWrite(dev, USR_SFD, SFD_LENGTH_SUB, &sfdLength, LEN_SFD_LENGTH);
	dev->dataRate = rate;
}
and I also check the dw1000 user manaul,
xxxxxxxxxxxxx.png
so I think that when data rate 110kbps:
if(rate == TRX_RATE_6800KBPS) {
setBit(dev->chanctrl, LEN_CHAN_CTRL, DWSFD_BIT, false);
setBit(dev->chanctrl, LEN_CHAN_CTRL, TNSSFD_BIT, false);
setBit(dev->chanctrl, LEN_CHAN_CTRL, RNSSFD_BIT, false);
} else {
setBit(dev->chanctrl, LEN_CHAN_CTRL, DWSFD_BIT, true);
setBit(dev->chanctrl, LEN_CHAN_CTRL, TNSSFD_BIT, false);
setBit(dev->chanctrl, LEN_CHAN_CTRL, RNSSFD_BIT, false);


}

Re: 110Kbps don't work

Posted: Wed Mar 01, 2017 9:50 am
by arnaud
Hi,

I have never tried to run the radios in 110K mode. Is it working with your modifications?

Re: 110Kbps don't work

Posted: Fri Mar 03, 2017 11:48 pm
by justinleeyang
hi, arnaud:

sorry, the later reply.

I don't change the two line code, my rxtimeout time too short result in communication fail, add the timeout to ~20ms, pass.

Re: 110Kbps don't work

Posted: Mon Mar 06, 2017 12:20 pm
by arnaud
Ok, so the current code works for 110kbps, good to know. Thanks.