| | |
| | | #define VTEMP_ADDRESS (0x09) |
| | | #define XTRIM_ADDRESS (0x1E) |
| | | uint8_t module_power; |
| | | uint8_t uwb_errorflag; |
| | | uint8_t uwb_error; |
| | | int dwt_initialise(uint16_t config) |
| | | { |
| | | uint32_t power_temp,power_input; |
| | |
| | | while (DWT_DEVICE_ID != dw1000local.deviceID) // MP IC ONLY (i.e. DW1000) FOR THIS CODE |
| | | { |
| | | dw1000local.deviceID = dwt_readdevid() ; |
| | | uwb_error++; |
| | | if(uwb_error>100) |
| | | { |
| | | uwb_errorflag=1; |
| | | 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 |