DW1000 UWB driver based on work of Matthias Grob & Manuel Stalder - ETH Zürich - 2015
Revision 7:b13881dbb09d, committed 2016-04-13
- Comitter:
- AndyA
- Date:
- Wed Apr 13 09:07:14 2016 +0000
- Parent:
- 6:2c77afdf7367
- Child:
- 8:0b408e77b701
- Commit message:
- Switched to Burst SPI and increased clock speed.
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BurstSPI.lib Wed Apr 13 09:07:14 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/Sissors/code/BurstSPI/#bc069279eb37
--- a/DW1000.cpp Mon Apr 11 14:45:44 2016 +0000 +++ b/DW1000.cpp Wed Apr 13 09:07:14 2016 +0000 @@ -1,6 +1,6 @@ #include "DW1000.h" -#define SPIRATE_PLL (5*1000*1000) +#define SPIRATE_PLL (10*1000*1000) #define SPIRATE_OSC (2*1000*1000) DW1000::DW1000(UWBMode setup, PinName MOSI, PinName MISO, PinName SCLK, PinName CS, PinName IRQ) : irq(IRQ), spi(MOSI, MISO, SCLK), cs(CS)
--- a/DW1000.h Mon Apr 11 14:45:44 2016 +0000 +++ b/DW1000.h Wed Apr 13 09:07:14 2016 +0000 @@ -4,6 +4,7 @@ #define DW1000_H #include "mbed.h" +#include "BurstSPI.h" // register addresses // Mnemonic Address Bytes Description @@ -591,7 +592,7 @@ void ISR(); // interrupt handling method (also calls according callback methods) // SPI Inteface - SPI spi; // SPI Bus + BurstSPI spi; // SPI Bus DigitalOut cs; // Slave selector for SPI-Bus (here explicitly needed to start and end SPI transactions also usable to wake up DW1000) uint8_t readRegister8(uint8_t reg, uint16_t subaddress); // expressive methods to read or write the number of bits written in the name