From b7c9cae60ccca37f258df39db3c56c72531df0a9 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Wed, 10 Oct 2018 17:01:11 +0200 Subject: [PATCH] Platform Zoul: move generic cc2538 defines from contiki-conf.h to cc2538-def.h --- arch/cpu/cc2538/cc2538-def.h | 15 +++++++++++++++ arch/platform/zoul/contiki-conf.h | 22 ---------------------- examples/6tisch/sixtop/project-conf.h | 10 ---------- 3 files changed, 15 insertions(+), 32 deletions(-) diff --git a/arch/cpu/cc2538/cc2538-def.h b/arch/cpu/cc2538/cc2538-def.h index 75195258e..163456a14 100644 --- a/arch/cpu/cc2538/cc2538-def.h +++ b/arch/cpu/cc2538/cc2538-def.h @@ -41,6 +41,21 @@ /* 192us as in datasheet but ACKs are not always received, so adjusted to 250us */ #define CC2538_DELAY_BEFORE_RX ((unsigned)US_TO_RTIMERTICKS(250)) #define CC2538_DELAY_BEFORE_DETECT 0 +/* Frame filtering done in software */ +#define TSCH_CONF_HW_FRAME_FILTERING 0 + +#ifndef TSCH_CONF_BASE_DRIFT_PPM +/* The drift compared to "true" 10ms slots. + * 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 +#endif /*---------------------------------------------------------------------------*/ #define SPI_CONF_CONTROLLER_COUNT 2 diff --git a/arch/platform/zoul/contiki-conf.h b/arch/platform/zoul/contiki-conf.h index b8f545bf0..a4c455d86 100644 --- a/arch/platform/zoul/contiki-conf.h +++ b/arch/platform/zoul/contiki-conf.h @@ -65,11 +65,6 @@ uint16_t *radio_tsch_timeslot_timing(void); /** @} */ /*---------------------------------------------------------------------------*/ -/* 352us from calling transmit() until the SFD byte has been sent */ -#define CC2538_DELAY_BEFORE_TX ((unsigned)US_TO_RTIMERTICKS(352)) -/* 192us as in datasheet but ACKs are not always received, so adjusted to 250us */ -#define CC2538_DELAY_BEFORE_RX ((unsigned)US_TO_RTIMERTICKS(250)) -#define CC2538_DELAY_BEFORE_DETECT 0 #define RADIO_PHY_OVERHEAD radio_phy_overhead() #define RADIO_BYTE_AIR_TIME radio_byte_air_time() @@ -79,23 +74,6 @@ uint16_t *radio_tsch_timeslot_timing(void); #define TSCH_CONF_DEFAULT_TIMESLOT_TIMING radio_tsch_timeslot_timing() -#ifndef TSCH_CONF_BASE_DRIFT_PPM -/* The drift compared to "true" 10ms slots. - * 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 -#endif - -#if MAC_CONF_WITH_TSCH -#define TSCH_CONF_HW_FRAME_FILTERING 0 -#endif /* MAC_CONF_WITH_TSCH */ - /*---------------------------------------------------------------------------*/ /** * \name Serial Boot Loader Backdoor configuration diff --git a/examples/6tisch/sixtop/project-conf.h b/examples/6tisch/sixtop/project-conf.h index e3d82d972..bb107175f 100755 --- a/examples/6tisch/sixtop/project-conf.h +++ b/examples/6tisch/sixtop/project-conf.h @@ -74,14 +74,4 @@ #endif /* WITH_SECURITY */ -/*******************************************************/ -/************* Other system configuration **************/ -/*******************************************************/ - -#if CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL || \ - CONTIKI_TARGET_OPENMOTE_CC2538 -#define TSCH_CONF_HW_FRAME_FILTERING 0 -#endif /* CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL \ - || CONTIKI_TARGET_OPENMOTE_CC2538 */ - #endif /* PROJECT_CONF_H_ */