110Kbps don't work

All discussions related to the Loco Positioning system
Post Reply
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

110Kbps don't work

Post 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.
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: 110Kbps don't work

Post 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);


}
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: 110Kbps don't work

Post by arnaud »

Hi,

I have never tried to run the radios in 110K mode. Is it working with your modifications?
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: 110Kbps don't work

Post 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.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: 110Kbps don't work

Post by arnaud »

Ok, so the current code works for 110kbps, good to know. Thanks.
Post Reply