Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of stm-spirit1-rf-driver by
spirit1-config.h
00001 /* 00002 * Copyright (c) 2012, STMicroelectronics. 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 3. Neither the name of the Institute nor the names of its contributors 00014 * may be used to endorse or promote products derived from this software 00015 * without specific prior written permission. 00016 * 00017 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 00018 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00019 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00020 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 00021 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00022 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00023 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00024 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00025 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00026 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00027 * SUCH DAMAGE. 00028 * 00029 * This file is part of the Contiki operating system. 00030 * 00031 */ 00032 /*---------------------------------------------------------------------------*/ 00033 #ifndef __SPIRIT1_CONFIG_H__ 00034 #define __SPIRIT1_CONFIG_H__ 00035 /*---------------------------------------------------------------------------*/ 00036 #include "radio.h" 00037 #include "SPIRIT_Config.h" 00038 #include "spirit1-const.h" 00039 /*---------------------------------------------------------------------------*/ 00040 #define CCA_THRESHOLD -98.0 /* dBm */ 00041 #define XTAL_FREQUENCY 50000000 /* Hz */ 00042 #define SPIRIT_MAX_FIFO_LEN (96) // betzw - WAS: 600 00043 /*---------------------------------------------------------------------------*/ 00044 00045 /* Sometimes Spirit1 seems to NOT deliver (correctly) the 'IRQ_RX_DATA_READY' 00046 * event for packets which have a length which is close to a multiple of 00047 * RX FIFO size. Furthermore, in these cases also the content delivery seems 00048 * to be compromised as well as the generation of RX/TX FIFO errors. 00049 * This can be avoided by reducing the maximum packet length to a value which 00050 * is lower than the RX FIFO size. 00051 * 00052 * Enable beyond macro if you want to use the version of the driver which avoids 00053 * FIFO overflows by reducing packet length. 00054 * 00055 * NOTE: the non delivery of event 'IRQ_RX_DATA_READY' MUST still be 00056 * investigated further deeply (both on HW & SW level)! 00057 */ 00058 #define RX_FIFO_THR_WA 00059 00060 /** 00061 * The MAX_PACKET_LEN is an arbitrary value used to define the two array 00062 * spirit_txbuf and spirit_rxbuf. 00063 * The SPIRIT1 supports with its packet handler a length of 65,535 bytes, 00064 * and in direct mode (without packet handler) there is no limit of data. 00065 */ 00066 #ifdef RX_FIFO_THR_WA 00067 #define MAX_PACKET_LEN (SPIRIT_MAX_FIFO_LEN-1) 00068 #else 00069 #define MAX_PACKET_LEN (255) // betzw - WAS: SPIRIT_MAX_FIFO_LEN, but LEN_WIDTH is set to 7 so the variable payload length is theoretically from 0 to 255 bytes 00070 #endif 00071 00072 /*---------------------------------------------------------------------------*/ 00073 /** 00074 * Spirit1 IC version 00075 */ 00076 #define SPIRIT1_VERSION SPIRIT_VERSION_3_0 00077 /*---------------------------------------------------------------------------*/ 00078 #endif /* __SPIRIT1_CONFIG_H__ */ 00079 /*---------------------------------------------------------------------------*/
Generated on Wed Jul 13 2022 00:11:56 by
