2014-08-27 18:47:31 +02:00
|
|
|
/*
|
2013-08-16 10:20:23 +02:00
|
|
|
* Copyright 2008, Freie Universitaet Berlin (FUB). All rights reserved.
|
|
|
|
*
|
2014-08-23 15:43:13 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-08-27 18:47:31 +02:00
|
|
|
*/
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-03-23 21:04:44 +01:00
|
|
|
#ifndef CC1100_DEFAULTSETTINGS_H
|
|
|
|
#define CC1100_DEFAULTSETTINGS_H
|
2010-11-18 20:04:38 +01:00
|
|
|
|
|
|
|
/**
|
2014-10-19 13:47:19 +02:00
|
|
|
* @ingroup drivers_cc110x_legacy
|
2010-11-18 20:04:38 +01:00
|
|
|
* @{
|
2013-11-27 17:54:30 +01:00
|
|
|
*
|
2010-11-18 20:04:38 +01:00
|
|
|
* @file
|
2013-11-27 17:54:30 +01:00
|
|
|
* @brief TI Chipcon CC110x default settings
|
2010-11-18 20:04:38 +01:00
|
|
|
*
|
2013-11-27 17:54:30 +01:00
|
|
|
* @author Thomas Hillebrandt <hillebra@inf.fu-berlin.de>
|
|
|
|
* @author Heiko Will <hwill@inf.fu-berlin.de>
|
2010-11-18 20:04:38 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2014-10-13 15:49:17 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* returns hwtimer ticks per us */
|
2010-11-18 20:04:38 +01:00
|
|
|
#define RTIMER_TICKS(us) HWTIMER_TICKS(us)
|
|
|
|
|
2013-11-27 17:54:30 +01:00
|
|
|
#define TIMER_TICK_USEC_RES (122)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Watchdog cycle time in seconds, set 0 to disable watchdog */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define CC1100_WATCHDOG_PERIOD (5)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Number of transmission retries for unicast packets (constant RX mode) */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define TRANSMISSION_RETRIES_CRX_UC (5)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Number of transmission retries for unicast packets (WOR mode) */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define TRANSMISSION_RETRIES_WOR_UC (1)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Number of transmission retries for broadcast packets (constant RX mode) */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define TRANSMISSION_RETRIES_CRX_BC (0)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Number of transmission retries for broadcast packets (WOR mode) */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define TRANSMISSION_RETRIES_WOR_BC (0)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Time before chip goes back to RX (= stays in PWD after incoming packet) */
|
|
|
|
#define WOR_TIMEOUT_1 (3200) /* ~ 32 milliseconds */
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Time before chip goes back to WOR (= stays in RX after elapsed WOR_TIMEOUT_1) */
|
|
|
|
#define WOR_TIMEOUT_2 (800) /* ~ 8 milliseconds */
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* XOSC startup + FS calibration (300 + 809 us ~ 1.38 ms) */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define FS_CAL_TIME RTIMER_TICKS(12 * TIMER_TICK_USEC_RES)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Manual FS calibration (721 us) */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define MANUAL_FS_CAL_TIME RTIMER_TICKS(7 * TIMER_TICK_USEC_RES)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Reset wait time (in reset procedure) */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define RESET_WAIT_TIME RTIMER_TICKS(4 * TIMER_TICK_USEC_RES)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Time chip needs to go to RX */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define IDLE_TO_RX_TIME RTIMER_TICKS(1 * TIMER_TICK_USEC_RES)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Time chip needs to go to RX and CS signal is ready */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define CS_READY_TIME RTIMER_TICKS(3 * TIMER_TICK_USEC_RES)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Default RX interval for WOR in milliseconds */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define T_RX_INTERVAL (542)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Time of packet interval in microseconds (at 400 kbps) */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define T_PACKET_INTERVAL (3800)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* The size of the configuration array for CC1100 in bytes */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define CC1100_CONF_SIZE (39)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* The default channel number (0-24) for CC1100 */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define CC1100_DEFAULT_CHANNR (0)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2015-01-14 08:56:11 +01:00
|
|
|
/* Burst retry to TX switch time (measured ~ 230 us) */
|
2013-11-27 17:54:30 +01:00
|
|
|
#define BURST_RETRY_TX_SWITCH_TIME (23)
|
2010-11-18 20:04:38 +01:00
|
|
|
|
2014-10-13 15:49:17 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2010-11-18 20:04:38 +01:00
|
|
|
|
|
|
|
/** @} */
|
2015-03-23 21:04:44 +01:00
|
|
|
#endif /* CC110X_DEFAULTSETTINGS_H */
|