uwb-dw1000 icon indicating copy to clipboard operation
uwb-dw1000 copied to clipboard

DW1000_DEVICE_TX_PWR does not match `dw1000_dev_cfg` power settings

Open fjmolinas opened this issue 4 years ago • 2 comments

The syscfg for the uwb-dw1000 sets the default TX_POWER for the device to -14.3:

https://github.com/Decawave/uwb-dw1000/blob/9503f2a394b870bd339668351afa6730da8da1c6/hw/drivers/uwb/uwb_dw1000/syscfg.yml#L28-L33

On the other side the default dw1000_dev_cfg power settings sets a gain of 9dB as the default, but if DW1000_BIAS_CORRECTION_ENABLED is enabled the correction is not based on the configuration settings in the default config but on the macros DW1000_DEVICE_TX_PWR and DW1000_DEVICE_ANT_GAIN.

https://github.com/Decawave/uwb-dw1000/blob/9503f2a394b870bd339668351afa6730da8da1c6/hw/drivers/uwb/uwb_dw1000/src/dw1000_hal.c#L77-L84

https://github.com/Decawave/uwb-core/blob/c6cf518e39a49f7084b229ee4ed7ab7ee80b2e5d/lib/uwb_rng/src/uwb_rng.c#L1027-L1039

I'm therefore quite unclear on what each of these values mean and what values should be considered for BIAS_CORRECTION

fjmolinas avatar Dec 02 '20 10:12 fjmolinas

The DW1000_DEVICE_TX_PWR isn't used. It should be removed. Thanks for pointing this out.

edit: The bias correction does reference this value still as per your comments. However this hasn't been used in a while. I'd say do not use the bias correction. The receiver do oversteer if you have too much power coming into the antenna creating this bias, but this should only be a problem if you're having the antennas less than say 2m apart and high tx power. You can see if you're oversteering the receiver by checking the rssi.

ncasaril avatar Feb 25 '21 04:02 ncasaril

The DW1000_DEVICE_TX_PWR isn't used. It should be removed. Thanks for pointing this out.

edit: The bias correction does reference this value still as per your comments. However this hasn't been used in a while. I'd say do not use the bias correction. The receiver do oversteer if you have too much power coming into the antenna creating this bias, but this should only be a problem if you're having the antennas less than say 2m apart and high tx power. You can see if you're oversteering the receiver by checking the rssi.

Hi @ncasaril thanks for the explanation, that clarifies things for me. Cheers!

fjmolinas avatar Feb 25 '21 08:02 fjmolinas