WXK
2024-09-11 6a19a2e2e7c86b9df50e57d36e62fd4cb9079fbf
Src/decadriver/deca_device.c
@@ -160,7 +160,7 @@
    uint8_t plllockdetect = EC_CTRL_PLLLCK;
    uint16_t otp_addr = 0;
    uint32_t ldo_tune = 0;
u8 iderror_count = 0;
    dw1000local.dblbuffon = 0; // Double buffer mode off by default
    dw1000local.prfIndex = 0; // 16MHz
    dw1000local.cdata.aatset = 0; // Auto ACK bit not set
@@ -175,6 +175,11 @@
    while (DWT_DEVICE_ID != dw1000local.deviceID) // MP IC ONLY (i.e. DW1000) FOR THIS CODE
    {
          dw1000local.deviceID =  dwt_readdevid() ;
                if(iderror_count++>10)
        {
            break;
        }
    }
    _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