We are facing an issue when temperature compensation is enabled. Some times the ranging functionality stops working as the receiver interrupts are not getting received.
We have the implementation as follows.
static void BandwidthPower_Compensation(void)
static uint32_t u32_TempCheck_timer = TEMP_COMPENSATION_INTERVAL;
u32_CurrentTime = portGetTickCnt();
if(u32_CurrentTime >= u32_TempCheck_timer)
u32_TempCheck_timer = u32_CurrentTime + TEMP_COMPENSATION_INTERVAL;
/* Read DW1000 IC temperature for temperature compensation procedure.*/ raw_temp = (dwt_readtempvbat(1) & 0xFF00) >> 8; /*reduce SPI to < 3MHz*/ port_set_dw1000_slowrate(); /* Compensate bandwidth and power settings for temperature */ txconfig.PGdly = dwt_calcbandwidthtempadj(CAS_PG_COUNT_REF_VAL); /*increase SPI to max*/ port_set_dw1000_fastrate(); txconfig.power = dwt_calcpowertempadj(DWT_CHANNEL_NO, ModePower[my.wb_setting.wb_mode].power, (int) (raw_temp - CAS_TEMPERATURE_REF_VAL)); /* Configure the TX frontend with the adjusted settings */ dwt_configuretxrf(&txconfig); }
We are doing the compensation periodically in every 1 Minute. In our application ranging is also working parallelly. When we enable the temperature compensation feature the DW1000 is miss behaving like not getting the RX ok callback, stuck in ISR…etc…
What could be the issue, Is it due to writing to the power register/reading of cal register…when the transmission is ongoing as part of ranging process.?