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.
stm-spirit1-rf-driver/source/libs/Contiki_STM32_Library/spirit1-config.h@6:304d3ba87a01, 2017-11-03 (annotated)
- Committer:
- RobMeades
- Date:
- Fri Nov 03 13:01:23 2017 +0000
- Revision:
- 6:304d3ba87a01
- Parent:
- 0:19aa55d66228
Add comment concerning N2XX baud rate.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| group-ublox | 0:19aa55d66228 | 1 | /* |
| group-ublox | 0:19aa55d66228 | 2 | * Copyright (c) 2012, STMicroelectronics. |
| group-ublox | 0:19aa55d66228 | 3 | * All rights reserved. |
| group-ublox | 0:19aa55d66228 | 4 | * |
| group-ublox | 0:19aa55d66228 | 5 | * Redistribution and use in source and binary forms, with or without |
| group-ublox | 0:19aa55d66228 | 6 | * modification, are permitted provided that the following conditions |
| group-ublox | 0:19aa55d66228 | 7 | * are met: |
| group-ublox | 0:19aa55d66228 | 8 | * 1. Redistributions of source code must retain the above copyright |
| group-ublox | 0:19aa55d66228 | 9 | * notice, this list of conditions and the following disclaimer. |
| group-ublox | 0:19aa55d66228 | 10 | * 2. Redistributions in binary form must reproduce the above copyright |
| group-ublox | 0:19aa55d66228 | 11 | * notice, this list of conditions and the following disclaimer in the |
| group-ublox | 0:19aa55d66228 | 12 | * documentation and/or other materials provided with the distribution. |
| group-ublox | 0:19aa55d66228 | 13 | * 3. Neither the name of the Institute nor the names of its contributors |
| group-ublox | 0:19aa55d66228 | 14 | * may be used to endorse or promote products derived from this software |
| group-ublox | 0:19aa55d66228 | 15 | * without specific prior written permission. |
| group-ublox | 0:19aa55d66228 | 16 | * |
| group-ublox | 0:19aa55d66228 | 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND |
| group-ublox | 0:19aa55d66228 | 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| group-ublox | 0:19aa55d66228 | 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| group-ublox | 0:19aa55d66228 | 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE |
| group-ublox | 0:19aa55d66228 | 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| group-ublox | 0:19aa55d66228 | 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| group-ublox | 0:19aa55d66228 | 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| group-ublox | 0:19aa55d66228 | 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| group-ublox | 0:19aa55d66228 | 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| group-ublox | 0:19aa55d66228 | 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| group-ublox | 0:19aa55d66228 | 27 | * SUCH DAMAGE. |
| group-ublox | 0:19aa55d66228 | 28 | * |
| group-ublox | 0:19aa55d66228 | 29 | * This file is part of the Contiki operating system. |
| group-ublox | 0:19aa55d66228 | 30 | * |
| group-ublox | 0:19aa55d66228 | 31 | */ |
| group-ublox | 0:19aa55d66228 | 32 | /*---------------------------------------------------------------------------*/ |
| group-ublox | 0:19aa55d66228 | 33 | #ifndef __SPIRIT1_CONFIG_H__ |
| group-ublox | 0:19aa55d66228 | 34 | #define __SPIRIT1_CONFIG_H__ |
| group-ublox | 0:19aa55d66228 | 35 | /*---------------------------------------------------------------------------*/ |
| group-ublox | 0:19aa55d66228 | 36 | #include "radio.h" |
| group-ublox | 0:19aa55d66228 | 37 | #include "SPIRIT_Config.h" |
| group-ublox | 0:19aa55d66228 | 38 | #include "spirit1-const.h" |
| group-ublox | 0:19aa55d66228 | 39 | /*---------------------------------------------------------------------------*/ |
| group-ublox | 0:19aa55d66228 | 40 | #define CCA_THRESHOLD -98.0 /* dBm */ |
| group-ublox | 0:19aa55d66228 | 41 | #define XTAL_FREQUENCY 50000000 /* Hz */ |
| group-ublox | 0:19aa55d66228 | 42 | #define SPIRIT_MAX_FIFO_LEN (96) // betzw - WAS: 600 |
| group-ublox | 0:19aa55d66228 | 43 | /*---------------------------------------------------------------------------*/ |
| group-ublox | 0:19aa55d66228 | 44 | |
| group-ublox | 0:19aa55d66228 | 45 | /* Sometimes Spirit1 seems to NOT deliver (correctly) the 'IRQ_RX_DATA_READY' |
| group-ublox | 0:19aa55d66228 | 46 | * event for packets which have a length which is close to a multiple of |
| group-ublox | 0:19aa55d66228 | 47 | * RX FIFO size. Furthermore, in these cases also the content delivery seems |
| group-ublox | 0:19aa55d66228 | 48 | * to be compromised as well as the generation of RX/TX FIFO errors. |
| group-ublox | 0:19aa55d66228 | 49 | * This can be avoided by reducing the maximum packet length to a value which |
| group-ublox | 0:19aa55d66228 | 50 | * is lower than the RX FIFO size. |
| group-ublox | 0:19aa55d66228 | 51 | * |
| group-ublox | 0:19aa55d66228 | 52 | * Enable beyond macro if you want to use the version of the driver which avoids |
| group-ublox | 0:19aa55d66228 | 53 | * FIFO overflows by reducing packet length. |
| group-ublox | 0:19aa55d66228 | 54 | * |
| group-ublox | 0:19aa55d66228 | 55 | * NOTE: the non delivery of event 'IRQ_RX_DATA_READY' MUST still be |
| group-ublox | 0:19aa55d66228 | 56 | * investigated further deeply (both on HW & SW level)! |
| group-ublox | 0:19aa55d66228 | 57 | */ |
| group-ublox | 0:19aa55d66228 | 58 | #define RX_FIFO_THR_WA |
| group-ublox | 0:19aa55d66228 | 59 | |
| group-ublox | 0:19aa55d66228 | 60 | /** |
| group-ublox | 0:19aa55d66228 | 61 | * The MAX_PACKET_LEN is an arbitrary value used to define the two array |
| group-ublox | 0:19aa55d66228 | 62 | * spirit_txbuf and spirit_rxbuf. |
| group-ublox | 0:19aa55d66228 | 63 | * The SPIRIT1 supports with its packet handler a length of 65,535 bytes, |
| group-ublox | 0:19aa55d66228 | 64 | * and in direct mode (without packet handler) there is no limit of data. |
| group-ublox | 0:19aa55d66228 | 65 | */ |
| group-ublox | 0:19aa55d66228 | 66 | #ifdef RX_FIFO_THR_WA |
| group-ublox | 0:19aa55d66228 | 67 | #define MAX_PACKET_LEN (SPIRIT_MAX_FIFO_LEN-1) |
| group-ublox | 0:19aa55d66228 | 68 | #else |
| group-ublox | 0:19aa55d66228 | 69 | #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 |
| group-ublox | 0:19aa55d66228 | 70 | #endif |
| group-ublox | 0:19aa55d66228 | 71 | |
| group-ublox | 0:19aa55d66228 | 72 | /*---------------------------------------------------------------------------*/ |
| group-ublox | 0:19aa55d66228 | 73 | /** |
| group-ublox | 0:19aa55d66228 | 74 | * Spirit1 IC version |
| group-ublox | 0:19aa55d66228 | 75 | */ |
| group-ublox | 0:19aa55d66228 | 76 | #define SPIRIT1_VERSION SPIRIT_VERSION_3_0 |
| group-ublox | 0:19aa55d66228 | 77 | /*---------------------------------------------------------------------------*/ |
| group-ublox | 0:19aa55d66228 | 78 | #endif /* __SPIRIT1_CONFIG_H__ */ |
| group-ublox | 0:19aa55d66228 | 79 | /*---------------------------------------------------------------------------*/ |