DW1000 UWB driver based on work of Matthias Grob & Manuel Stalder - ETH Zürich - 2015

Dependencies:   BurstSPI

Revision:
15:6faab70a5b19
Parent:
13:8718966cd81e
Child:
17:1fb08dfef237
--- a/DW1000.h	Thu Mar 30 11:32:35 2017 +0000
+++ b/DW1000.h	Wed Nov 08 10:43:03 2017 +0000
@@ -32,6 +32,8 @@
     */
     DW1000(PinName MOSI, PinName MISO, PinName SCLK, PinName CS, PinName IRQ);              // constructor, uses SPI class
 
+    void setSPISpeed(uint32_t speed);
+
     /** Read the device ID
     * @return the device ID (0xDECA0130)
     */
@@ -172,6 +174,40 @@
 
     void getFullLEDMetrics(uint16_t *led_thresh, uint16_t *led_ppindx, uint16_t *led_ppampl);
 
+    void getRxClockInfo(int32_t *offset, uint8_t* phase, uint8_t* delta);
+
+    /** Read the current crystal tuning value
+    *
+    * Reads the current FX_XTALT value from 0 to 0x1f.
+    * See section 8.1 of the manual for details.
+    *
+    * @return The current value.
+    */
+    uint8_t readXTALTune();
+
+
+    /** Set the crystal tuning value
+    *
+    * Sets the value of the FX_XTALT register.
+    * See section 8.1 of the manual for details.
+    *
+    * Values will be lost on reset, consider programming the final value 
+    * into the OTP memory to store perminently.
+    *
+    * @value The value to use from 0 to 0x1f
+    */
+    void setXTALTune(uint8_t value);
+
+    /** Puts the device into CW test mode
+    *
+    * The radio will be set to output a constant wave at carrier frequency.
+    * Transmit gain will be set to the maximum of 33.5dB but can be chaged by
+    * setting the TX power register
+    * To exit test mode the radio should be reset.
+    */
+    void enterRFTestMode();
+
+        
 protected:
 
     /**
@@ -334,7 +370,12 @@
             return readRegister16(DW1000_LDE_CTRL,DWLDE_LDE_PPAMPL);
         }
 
+
+        
+    #define DW1000_RX_TTCKO             0x14 //     5 Receiver Time Tracking Offset       (in double buffer set)
+
 private:
+
     void resetAll();                                                                        // soft reset the entire DW1000 (some registers stay as they were see User Manual)
 
     void setupRadio();