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.
110Kbps don't work
-
- Expert
- Posts: 186
- Joined: Mon Dec 28, 2015 5:07 am
Re: 110Kbps don't work
Hi, all:
I find the config as following:
and I also check the dw1000 user manaul,
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);
}
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;
}
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
Hi,
I have never tried to run the radios in 110K mode. Is it working with your modifications?
I have never tried to run the radios in 110K mode. Is it working with your modifications?
-
- Expert
- Posts: 186
- Joined: Mon Dec 28, 2015 5:07 am
Re: 110Kbps don't work
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.
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
Ok, so the current code works for 110kbps, good to know. Thanks.