Save the calibration value of tx power and bangwith

this is the code,when i save the calibration value:

	pbss->calSmartTemp = (int)(dwt_readtempvbat(0) >>8); //save the temperature when calibration
	pbss->calSmartPower = dwt_read32bitreg(TX_POWER_ID);//get the calibration value of smart tx power
	pbss->calSmartPgCount = dwt_calcpgcount(val3);//make PG_DELAY to PG_COUNT(PGC_STATUS)

when the DW1000 reset ,it takes the calibration value code is :slight_smile:

		tmp32bit = dwt_read32bitreg(SYS_CFG_ID);
		tmp32bit &= ~SYS_CFG_DIS_STXP;
		dwt_write32bitreg(SYS_CFG_ID, tmp32bit);//change into the smart tx power

		tmp16bit = dwt_readtempvbat(0);
		now_temp = (int)(tmp16bit>>8); //get the now temperature

		int delt_temp = now_temp - app.pConfig->calSmartTemp;
		tmp32bit=dwt_calcpowertempadj(2, app.pConfig->calSmartPower,delt_temp);//calibrate the tx power with temperature
		dwt_write32bitreg(TX_POWER_ID, tmp32bit);	//configurate the tx power
		tmp8bit = dwt_calcbandwidthtempadj(app.pConfig->calSmartPgCount);//make PG_COUNT into PG_DELAY 
		dwt_writetodevice(TX_CAL_ID,TC_PGDELAY_OFFSET,1,&tmp8bit);//configurate the PG_DELAY

this code could not output the right tx power and bandwith,compared with the calibration ,why?

thank you

You can refer to code i send to you.