Revision ef5bc242

View differences:

include/DW1000/v1/alld_dw1000_v1.h
1815 1815
void port_set_dw1000_fastrate(void);
1816 1816
void port_wakeup_dw1000_fast(void);
1817 1817
uint32_t portGetTickCnt(void);
1818
uint8_t port_CheckEXT_IRQ(void);
1819
//void reset_DW1000(void);
1820
//void process_deca_irq(void);
1818 1821

  
1822
//TODO: static or extern declaration
1823
//extern int writetospi(uint16_t headerLength, const uint8_t *headerBuffer, uint32_t readlength, const uint8_t *readBuffer);
1824
//extern int writetospi(uint16_t headerLength, const uint8_t *headerBuffer, uint32_t bodyLength, const	uint8_t *bodyBuffer);
1819 1825

  
1820 1826
/**
1821 1827
 * @brief   Pad specific IRQn handler. modify it if the PIN no. is changed
1822 1828
 */
1823
#define DW1000_EXTI_IRQn    EXTI15_10_IRQn
1829
#define DW1000_EXTI_IRQn    EXTI9_5_IRQn  // TODO: EXTI15_10_IRQn or EXTI9_5_IRQn
1824 1830

  
1825 1831

  
1826 1832
#endif /* defined(AMIROLLD_CFG_DW1000) && (AMIROLLD_CFG_DW1000 == 1) */
include/DW1000/v1/deca_instance_v1.h
524 524
  // -------------------------------------------------------------------------------------------------------------------
525 525

  
526 526
  #define DWT_PRF_64M_RFDLY   (514.462f)
527
  #define DWT_PRF_16M_RFDLY   (513.9067f)
527
//  #define DWT_PRF_16M_RFDLY   (513.9067f)
528
  #define DWT_PRF_16M_RFDLY   (515.03f)  // TODO: our calibrated value
528 529

  
529 530
  /* Extern declaration while defining them in .c file */
530 531
  extern const uint16_t rfDelays[2];
source/DW1000/v1/alld_dw1000_v1.c
4539 4539
  return chVTGetSystemTimeX();
4540 4540
}
4541 4541

  
4542
/*! @brief Check the current value of GPIO pin and return the value */
4543
uint8_t port_CheckEXT_IRQ(void) {
4544
  uint8_t  val;
4545
  apalGpioRead(pdw1000local->driver->gpio_exti->gpio, &val);
4546
  return val;
4547
}
4548

  
4542 4549
/*! @brief Disable the interrupt handler */
4543 4550
void port_DisableEXT_IRQ(void){   
4544 4551
  nvicDisableVector(DW1000_EXTI_IRQn);
source/DW1000/v1/deca_instance_common_v1.c
73 73

  
74 74
/*! Slot and Superframe Configuration for DecaRangeRTLS TREK Modes (4 default use cases selected by the switch S1 [2,3] on EVB1000, indexed 0 to 3 )*/
75 75
sfConfig_t sfConfig[4] ={
76
                         //mode 1 - S1: 2 off, 3 off
76
                         //mode 1 - S1: 2 off (110 Kbps), 3 off (ch 2)
77 77
                         {
78 78
                          .slotPeriod = (28), //slot duration in milliseconds (NOTE: the ranging exchange must be able to complete in this time
79 79
                          //e.g. tag sends a poll, 4 anchors send responses and tag sends the final + processing time
......
94 94

  
95 95
                         },
96 96
#else
97
                         //mode 2 - S1: 2 on, 3 off
97
                         //mode 2 - S1: 2 on (6.8 Mbps), 3 off (ch 2)
98 98
                         {
99 99
                          .slotPeriod = (10), //slot duration in milliseconds (NOTE: the ranging exchange must be able to complete in this time
100 100
                          //e.g. tag sends a poll, 4 anchors send responses and tag sends the final + processing time
101 101
                          .numSlots = (10),        //number of slots in the superframe (8 tag slots and 2 used for anchor to anchor ranging),
102 102
                          .sfPeriod = (10*10),  //in ms => 100 ms frame means 10 Hz location rate
103 103
                          .pollSleepDly = (10*10), //tag period in ms (sleep time + ranging time)
104
                          .replyDly = (2500) //poll to final delay in microseconds (needs to be adjusted according to lengths of ranging frames)
104
                          .replyDly = (3000) //poll to final delay in microseconds (needs to be adjusted according to lengths of ranging frames)
105 105
                         },
106 106
#endif
107
                         //mode 3 - S1: 2 off, 3 on
107
                         //mode 3 - S1: 2 off (110 Kbps), 3 on (ch 5)
108 108
                         {
109 109
                          .slotPeriod = (28), //slot duration in milliseconds (NOTE: the ranging exchange must be able to complete in this time
110 110
                          //e.g. tag sends a poll, 4 anchors send responses and tag sends the final + processing time
......
114 114
                          .replyDly = (20000) //poll to final delay in microseconds (needs to be adjusted according to lengths of ranging frames)
115 115

  
116 116
                         },
117
                         //mode 4 - S1: 2 on, 3 on
117
                         //mode 4 - S1: 2 on (6.8 Mbps), 3 on (ch 5)
118 118
                         {
119 119
                          .slotPeriod = (10), //slot duration in milliseconds (NOTE: the ranging exchange must be able to complete in this time
120 120
                          //e.g. tag sends a poll, 4 anchors send responses and tag sends the final + processing time

Also available in: Unified diff