Src/decadriver/deca_device.c
@@ -155,6 +155,8 @@
#define XTRIM_ADDRESS  (0x1E)
uint8_t module_power;
uint32_t power_temp,power_input;
extern u32 id,error_times;
u8 errortimes;
int dwt_initialise(uint16_t config)
{
      
@@ -175,9 +177,11 @@
    dw1000local.deviceID =  dwt_readdevid() ;
    while (DWT_DEVICE_ID != dw1000local.deviceID) // MP IC ONLY (i.e. DW1000) FOR THIS CODE
    {
        if(errortimes++>10)
            break;
          dw1000local.deviceID =  dwt_readdevid() ;
    }
    id =  dwt_readdevid() ;
    _dwt_enableclocks(FORCE_SYS_XTI); // NOTE: set system clock to XTI - this is necessary to make sure the values read by _dwt_otpread are reliable
    dw1000local.deviceID =  dwt_readdevid() ;
      if(module_power>36)