commit 0ecf4119112d1298b03fa5a045da617f5cae8b2d
Author: Cung Sang <csang@techfak.uni-bielefeld.de>
Date:   Mon Apr 1 18:20:46 2019 +0200

    adapted the UWB pin config in NUCLEO-F10bRB with Light Ring breakout

diff --git a/modules/NUCLEO-F103RB/module.c b/modules/NUCLEO-F103RB/module.c
index 11fcafd..c3efbfa 100644
--- a/modules/NUCLEO-F103RB/module.c
+++ b/modules/NUCLEO-F103RB/module.c
@@ -51,23 +51,24 @@ SerialConfig moduleHalProgIfConfig = {
 
 #if defined(AMIROLLD_CFG_DW1000)
 
-/*! SPI (high and low speed) configuration for DW1000 */
+/*! SPI (high speed) configuration for DW1000 */
 SPIConfig moduleHalSpiUwbHsConfig = {
   /* circular buffer mode        */ false,
   /* callback function pointer   */ NULL,
   /* chip select line port       */ GPIOB,
   /* chip select line pad number */ GPIOB_PIN12,
-  /* CR1                         */ 0,
-  /* CR2                         */ 0,
+  /* CR1                         */ 0,                                  // 32/2 Mbps
+  /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
 };
 
+/*! SPI (low speed) configuration for DW1000 */
 SPIConfig moduleHalSpiUwbLsConfig = {
   /* circular buffer mode        */ false,
   /* callback function pointer   */ NULL,
   /* chip select line port       */ GPIOB,
   /* chip select line pad number */ GPIOB_PIN12,
-  /* CR1                         */ SPI_CR1_BR_1 | SPI_CR1_BR_0,
-  /* CR2                         */ 0,
+  /* CR1                         */ SPI_CR1_BR_1 | SPI_CR1_BR_0,        // 32/16 Mbps
+  /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
 };
 
 #endif /* defined(AMIROLLD_CFG_DW1000) */
@@ -97,12 +98,11 @@ ROMCONST apalControlGpio_t moduleGpioLed = {
 };
 
 #if defined(AMIROLLD_CFG_DW1000)
-
 /**
  * @brief   DW1000 reset output signal GPIO.
  */
 static apalGpio_t _gpioDw1000Reset = {
-  /* line */ PAL_LINE(GPIOA, GPIOA_ARD_A0),
+  /* line */ LINE_ARD_D15,     // PAL_LINE(GPIOB, GPIOB_ARD_D15)
 };
 ROMCONST apalControlGpio_t moduleGpioDw1000Reset = {
   /* GPIO */ &_gpioDw1000Reset,
@@ -113,12 +113,11 @@ ROMCONST apalControlGpio_t moduleGpioDw1000Reset = {
   },
 };
 
-
 /**
  * @brief   DW1000 interrrupt input signal GPIO.
  */
 static apalGpio_t _gpioDw1000Irqn = {
-  /* line */ PAL_LINE(GPIOB, GPIOB_ARD_D6),
+  /* line */ LINE_ARD_D14,    // PAL_LINE(GPIOB, GPIOB_ARD_D14)
 };
 ROMCONST apalControlGpio_t moduleGpioDw1000Irqn = {
   /* GPIO */ &_gpioDw1000Irqn,
@@ -129,7 +128,6 @@ ROMCONST apalControlGpio_t moduleGpioDw1000Irqn = {
   },
 };
 
-
 /**
  * @brief   DW1000 SPI chip select output signal GPIO.
  */
@@ -241,9 +239,13 @@ static int _utShellCmdCb_Dw1000(BaseSequentialStream* stream, int argc, char* ar
 {
   (void)argc;
   (void)argv;
+  ((ut_dw1000data_t*)moduleUtAlldDw1000.data)->dw1000d = &moduleLldDw1000;
   aosUtRun(stream, &moduleUtAlldDw1000, NULL);
   return AOS_OK;
 }
+static ut_dw1000data_t _utAlldDw1000Data = {
+  /* dw1000d    */ NULL,
+};
 aos_unittest_t moduleUtAlldDw1000 = {
   /* info           */ "DW1000",
   /* name           */ "UWB System",
@@ -253,7 +255,7 @@ aos_unittest_t moduleUtAlldDw1000 = {
     /* callback */ _utShellCmdCb_Dw1000,
     /* next     */ NULL,
   },
-  /* data           */ &moduleLldDw1000,
+  /* data           */ &_utAlldDw1000Data,  // TODO: &moduleLldDw1000
 };
 #endif /* defined(AMIROLLD_CFG_DW1000) */
 
diff --git a/modules/NUCLEO-F103RB/module.h b/modules/NUCLEO-F103RB/module.h
index 344337c..e183c8d 100644
--- a/modules/NUCLEO-F103RB/module.h
+++ b/modules/NUCLEO-F103RB/module.h
@@ -79,18 +79,18 @@ extern SerialConfig moduleHalProgIfConfig;
 #if defined(AMIROLLD_CFG_DW1000)
 
 /**
- * @brief   SPI interface driver for the motion sensors (gyroscope and accelerometer).
+ * @brief   SPI interface driver for UWB DW1000 module.
  */
 #define MODULE_HAL_SPI_UWB                      SPID2
 
 
 /**
- * @brief   Configuration for the SPI interface driver to communicate with the LED driver.
+ * @brief   Configuration for the high-speed SPI interface driver of DW1000 module..
  */
 extern SPIConfig moduleHalSpiUwbHsConfig;
 
 /**
- * @brief   Configuration for the SPI interface driver to communicate with the wireless transceiver.
+ * @brief   Configuration for the low-speed SPI interface driver of DW1000 module.
  */
 extern SPIConfig moduleHalSpiUwbLsConfig;
 
@@ -149,7 +149,7 @@ extern ROMCONST apalControlGpio_t moduleGpioUserButton;
 /**
  * @brief   Event flag to be call dwt_isr() interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_DW1000_IRQn      AOS_IOEVENT_FLAG(PAL_PAD(LINE_ARD_D6))
+#define MODULE_OS_IOEVENTFLAGS_DW1000_IRQn      AOS_IOEVENT_FLAG(PAL_PAD(LINE_ARD_D14))
 
 /**
  * @brief   Event flag to be set on a USER_BUTTON interrupt.
@@ -252,7 +252,6 @@ extern ROMCONST char* moduleShellPrompt;
 #if defined(AMIROLLD_CFG_DW1000)
   #define MODULE_MAIN_LOOP_IO_EVENT_DW1000() {                                \
     if(eventflags & MODULE_OS_IOEVENTFLAGS_DW1000_IRQn) {                     \
-      /*apalGpioToggle(moduleGpioLedGreen.gpio); // just for debug  */        \
       process_deca_irq();                                                     \
     }                                                                         \
   }
