TSCH: comment on how the TSCH base drift is computed
This commit is contained in:
parent
a11c2f4a1f
commit
688c6ee114
|
@ -47,7 +47,14 @@ typedef uint32_t rtimer_clock_t;
|
||||||
#define RADIO_DELAY_BEFORE_DETECT 0
|
#define RADIO_DELAY_BEFORE_DETECT 0
|
||||||
#ifndef TSCH_CONF_BASE_DRIFT_PPM
|
#ifndef TSCH_CONF_BASE_DRIFT_PPM
|
||||||
/* The drift compared to "true" 10ms slots.
|
/* The drift compared to "true" 10ms slots.
|
||||||
* Enable adaptive sync to enable compensation for this. */
|
* Enable adaptive sync to enable compensation for this.
|
||||||
|
* Slot length 10000 usec
|
||||||
|
* 328 ticks
|
||||||
|
* Tick duration 30.517578125 usec
|
||||||
|
* Real slot duration 10009.765625 usec
|
||||||
|
* Target - real duration = -9.765625 usec
|
||||||
|
* TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
|
*/
|
||||||
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
#endif
|
#endif
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -110,9 +110,15 @@ typedef uint32_t rtimer_clock_t;
|
||||||
|
|
||||||
/* If the timer base a binary 32kHz clock, compensate for this base drift */
|
/* If the timer base a binary 32kHz clock, compensate for this base drift */
|
||||||
#if RTIMER_USE_32KHZ && JN516X_EXTERNAL_CRYSTAL_OSCILLATOR
|
#if RTIMER_USE_32KHZ && JN516X_EXTERNAL_CRYSTAL_OSCILLATOR
|
||||||
/* Drift calculated using this formula:
|
/* The drift compared to "true" 10ms slots.
|
||||||
* ((US_TO_TICKS(10000) * 100) - RTIMER_SECOND) * 1e6 = 976.5625 ppm
|
* Enable adaptive sync to enable compensation for this.
|
||||||
*/
|
* Slot length 10000 usec
|
||||||
|
* 328 ticks
|
||||||
|
* Tick duration 30.517578125 usec
|
||||||
|
* Real slot duration 10009.765625 usec
|
||||||
|
* Target - real duration = -9.765625 usec
|
||||||
|
* TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
|
*/
|
||||||
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,14 @@ typedef uint32_t rtimer_clock_t;
|
||||||
#define RADIO_DELAY_BEFORE_DETECT 0
|
#define RADIO_DELAY_BEFORE_DETECT 0
|
||||||
#ifndef TSCH_CONF_BASE_DRIFT_PPM
|
#ifndef TSCH_CONF_BASE_DRIFT_PPM
|
||||||
/* The drift compared to "true" 10ms slots.
|
/* The drift compared to "true" 10ms slots.
|
||||||
* Enable adaptive sync to enable compensation for this. */
|
* Enable adaptive sync to enable compensation for this.
|
||||||
|
* Slot length 10000 usec
|
||||||
|
* 328 ticks
|
||||||
|
* Tick duration 30.517578125 usec
|
||||||
|
* Real slot duration 10009.765625 usec
|
||||||
|
* Target - real duration = -9.765625 usec
|
||||||
|
* TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
|
*/
|
||||||
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
#endif
|
#endif
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -280,7 +280,14 @@ typedef uint32_t rtimer_clock_t;
|
||||||
|
|
||||||
#ifndef TSCH_CONF_BASE_DRIFT_PPM
|
#ifndef TSCH_CONF_BASE_DRIFT_PPM
|
||||||
/* The drift compared to "true" 10ms slots.
|
/* The drift compared to "true" 10ms slots.
|
||||||
* Enable adaptive sync to enable compensation for this. */
|
* Enable adaptive sync to enable compensation for this.
|
||||||
|
* Slot length 10000 usec
|
||||||
|
* 328 ticks
|
||||||
|
* Tick duration 30.517578125 usec
|
||||||
|
* Real slot duration 10009.765625 usec
|
||||||
|
* Target - real duration = -9.765625 usec
|
||||||
|
* TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
|
*/
|
||||||
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,14 @@ typedef uint32_t rtimer_clock_t;
|
||||||
#define RADIO_DELAY_BEFORE_DETECT 0
|
#define RADIO_DELAY_BEFORE_DETECT 0
|
||||||
#ifndef TSCH_CONF_BASE_DRIFT_PPM
|
#ifndef TSCH_CONF_BASE_DRIFT_PPM
|
||||||
/* The drift compared to "true" 10ms slots.
|
/* The drift compared to "true" 10ms slots.
|
||||||
* Enable adaptive sync to enable compensation for this. */
|
* Enable adaptive sync to enable compensation for this.
|
||||||
|
* Slot length 10000 usec
|
||||||
|
* 328 ticks
|
||||||
|
* Tick duration 30.517578125 usec
|
||||||
|
* Real slot duration 10009.765625 usec
|
||||||
|
* Target - real duration = -9.765625 usec
|
||||||
|
* TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
|
*/
|
||||||
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
||||||
#endif
|
#endif
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
Loading…
Reference in New Issue