Prototype RF driver for STM Sub-1 GHz RF expansion board based on the SPSGRF-868 module for STM32 Nucleo.

Prototype RF Driver for STM Sub-1 GHz RF Expansion Boards based on the SPSGRF-868 and SPSGRF-915 Modules for STM32 Nucleo

Currently supported boards:

Note, in order to use expansion board X-NUCLEO-IDS01A4 in mbed you need to perform the following HW modifications on the board:

  • Unmount resistor R4
  • Mount resistor R7

Furthermore, on some Nucleo development boards (e.g. the NUCLEO_F429ZI), in order to be able to use Ethernet together with these Sub-1 GHz RF expansion boards, you need to compile this driver with macro SPIRIT1_SPI_MOSI=PB_5 defined, while the development board typically requires some HW modification as e.g. described here!

This driver can be used together with the 6LoWPAN stack (a.k.a. Nanostack).

Committer:
Wolfgang Betz
Date:
Tue Nov 22 11:40:10 2016 +0100
Revision:
34:edda6a7238ec
Child:
67:93bec0baf1de
Perform re-naming

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Wolfgang Betz 34:edda6a7238ec 1 /**
Wolfgang Betz 34:edda6a7238ec 2 ******************************************************************************
Wolfgang Betz 34:edda6a7238ec 3 * @file platform/stm32nucleo-spirit1/contiki-conf.h
Wolfgang Betz 34:edda6a7238ec 4 * @author System LAB
Wolfgang Betz 34:edda6a7238ec 5 * @version V1.0.0
Wolfgang Betz 34:edda6a7238ec 6 * @date 17-May-2015
Wolfgang Betz 34:edda6a7238ec 7 * @brief Contiki configuration parameters
Wolfgang Betz 34:edda6a7238ec 8 ******************************************************************************
Wolfgang Betz 34:edda6a7238ec 9 * @attention
Wolfgang Betz 34:edda6a7238ec 10 *
Wolfgang Betz 34:edda6a7238ec 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
Wolfgang Betz 34:edda6a7238ec 12 *
Wolfgang Betz 34:edda6a7238ec 13 * Redistribution and use in source and binary forms, with or without modification,
Wolfgang Betz 34:edda6a7238ec 14 * are permitted provided that the following conditions are met:
Wolfgang Betz 34:edda6a7238ec 15 * 1. Redistributions of source code must retain the above copyright notice,
Wolfgang Betz 34:edda6a7238ec 16 * this list of conditions and the following disclaimer.
Wolfgang Betz 34:edda6a7238ec 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Wolfgang Betz 34:edda6a7238ec 18 * this list of conditions and the following disclaimer in the documentation
Wolfgang Betz 34:edda6a7238ec 19 * and/or other materials provided with the distribution.
Wolfgang Betz 34:edda6a7238ec 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Wolfgang Betz 34:edda6a7238ec 21 * may be used to endorse or promote products derived from this software
Wolfgang Betz 34:edda6a7238ec 22 * without specific prior written permission.
Wolfgang Betz 34:edda6a7238ec 23 *
Wolfgang Betz 34:edda6a7238ec 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Wolfgang Betz 34:edda6a7238ec 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Wolfgang Betz 34:edda6a7238ec 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Wolfgang Betz 34:edda6a7238ec 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Wolfgang Betz 34:edda6a7238ec 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Wolfgang Betz 34:edda6a7238ec 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Wolfgang Betz 34:edda6a7238ec 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Wolfgang Betz 34:edda6a7238ec 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Wolfgang Betz 34:edda6a7238ec 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Wolfgang Betz 34:edda6a7238ec 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Wolfgang Betz 34:edda6a7238ec 34 *
Wolfgang Betz 34:edda6a7238ec 35 ******************************************************************************
Wolfgang Betz 34:edda6a7238ec 36 */
Wolfgang Betz 34:edda6a7238ec 37 /*---------------------------------------------------------------------------*/
Wolfgang Betz 34:edda6a7238ec 38 #ifndef __CONTIKI_CONF_H__
Wolfgang Betz 34:edda6a7238ec 39 #define __CONTIKI_CONF_H__
Wolfgang Betz 34:edda6a7238ec 40 /*---------------------------------------------------------------------------*/
Wolfgang Betz 34:edda6a7238ec 41 #include "platform-conf.h"
Wolfgang Betz 34:edda6a7238ec 42 //#include "project-conf.h"
Wolfgang Betz 34:edda6a7238ec 43 /*---------------------------------------------------------------------------*/
Wolfgang Betz 34:edda6a7238ec 44 #define SLIP_BRIDGE_CONF_NO_PUTCHAR 1
Wolfgang Betz 34:edda6a7238ec 45
Wolfgang Betz 34:edda6a7238ec 46 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
Wolfgang Betz 34:edda6a7238ec 47 #define NULLRDC_CONF_802154_AUTOACK 0
Wolfgang Betz 34:edda6a7238ec 48 #define NETSTACK_CONF_FRAMER framer_802154
Wolfgang Betz 34:edda6a7238ec 49 #define NETSTACK_CONF_NETWORK sicslowpan_driver
Wolfgang Betz 34:edda6a7238ec 50
Wolfgang Betz 34:edda6a7238ec 51 #undef NETSTACK_CONF_RDC
Wolfgang Betz 34:edda6a7238ec 52 #define NETSTACK_CONF_RDC nullrdc_driver
Wolfgang Betz 34:edda6a7238ec 53 #define NETSTACK_RDC_HEADER_LEN 0
Wolfgang Betz 34:edda6a7238ec 54
Wolfgang Betz 34:edda6a7238ec 55 #undef NETSTACK_CONF_MAC
Wolfgang Betz 34:edda6a7238ec 56 #define NETSTACK_CONF_MAC csma_driver
Wolfgang Betz 34:edda6a7238ec 57 #define NETSTACK_MAC_HEADER_LEN 0
Wolfgang Betz 34:edda6a7238ec 58
Wolfgang Betz 34:edda6a7238ec 59 #define SICSLOWPAN_CONF_MAC_MAX_PAYLOAD \
Wolfgang Betz 34:edda6a7238ec 60 (NETSTACK_RADIO_MAX_PAYLOAD_LEN - NETSTACK_MAC_HEADER_LEN - \
Wolfgang Betz 34:edda6a7238ec 61 NETSTACK_RDC_HEADER_LEN )
Wolfgang Betz 34:edda6a7238ec 62
Wolfgang Betz 34:edda6a7238ec 63 #define RIMESTATS_CONF_ENABLED 0
Wolfgang Betz 34:edda6a7238ec 64 #define RIMESTATS_CONF_ON 0
Wolfgang Betz 34:edda6a7238ec 65
Wolfgang Betz 34:edda6a7238ec 66
Wolfgang Betz 34:edda6a7238ec 67 /* Network setup for IPv6 */
Wolfgang Betz 34:edda6a7238ec 68
Wolfgang Betz 34:edda6a7238ec 69 #define CXMAC_CONF_ANNOUNCEMENTS 0
Wolfgang Betz 34:edda6a7238ec 70
Wolfgang Betz 34:edda6a7238ec 71
Wolfgang Betz 34:edda6a7238ec 72 /* A trick to resolve a compilation error with IAR. */
Wolfgang Betz 34:edda6a7238ec 73 #ifdef __ICCARM__
Wolfgang Betz 34:edda6a7238ec 74 #define UIP_CONF_DS6_AADDR_NBU 1
Wolfgang Betz 34:edda6a7238ec 75 #endif
Wolfgang Betz 34:edda6a7238ec 76
Wolfgang Betz 34:edda6a7238ec 77 /* radio driver blocks until ACK is received */
Wolfgang Betz 34:edda6a7238ec 78 #define NULLRDC_CONF_ACK_WAIT_TIME (0)
Wolfgang Betz 34:edda6a7238ec 79 #define CONTIKIMAC_CONF_BROADCAST_RATE_LIMIT 0
Wolfgang Betz 34:edda6a7238ec 80 #define IEEE802154_CONF_PANID 0xABCD
Wolfgang Betz 34:edda6a7238ec 81
Wolfgang Betz 34:edda6a7238ec 82 #define AODV_COMPLIANCE
Wolfgang Betz 34:edda6a7238ec 83
Wolfgang Betz 34:edda6a7238ec 84 #define WITH_ASCII 1
Wolfgang Betz 34:edda6a7238ec 85
Wolfgang Betz 34:edda6a7238ec 86 #define PROCESS_CONF_NUMEVENTS 8
Wolfgang Betz 34:edda6a7238ec 87 #define PROCESS_CONF_STATS 1
Wolfgang Betz 34:edda6a7238ec 88 /*#define PROCESS_CONF_FASTPOLL 4*/
Wolfgang Betz 34:edda6a7238ec 89
Wolfgang Betz 34:edda6a7238ec 90
Wolfgang Betz 34:edda6a7238ec 91 #define LINKADDR_CONF_SIZE 8
Wolfgang Betz 34:edda6a7238ec 92
Wolfgang Betz 34:edda6a7238ec 93 #define UIP_CONF_LL_802154 1
Wolfgang Betz 34:edda6a7238ec 94 #define UIP_CONF_LLH_LEN 0
Wolfgang Betz 34:edda6a7238ec 95
Wolfgang Betz 34:edda6a7238ec 96 #define UIP_CONF_ROUTER 1
Wolfgang Betz 34:edda6a7238ec 97
Wolfgang Betz 34:edda6a7238ec 98 /* configure number of neighbors and routes */
Wolfgang Betz 34:edda6a7238ec 99 #ifndef UIP_CONF_DS6_ROUTE_NBU
Wolfgang Betz 34:edda6a7238ec 100 #define UIP_CONF_DS6_ROUTE_NBU 30
Wolfgang Betz 34:edda6a7238ec 101 #endif /* UIP_CONF_DS6_ROUTE_NBU */
Wolfgang Betz 34:edda6a7238ec 102
Wolfgang Betz 34:edda6a7238ec 103 #ifndef UIP_CONF_ND6_SEND_RA
Wolfgang Betz 34:edda6a7238ec 104 #define UIP_CONF_ND6_SEND_RA 0
Wolfgang Betz 34:edda6a7238ec 105 #endif
Wolfgang Betz 34:edda6a7238ec 106 #define UIP_CONF_ND6_REACHABLE_TIME 600000 //90000// 600000
Wolfgang Betz 34:edda6a7238ec 107 #define UIP_CONF_ND6_RETRANS_TIMER 10000
Wolfgang Betz 34:edda6a7238ec 108
Wolfgang Betz 34:edda6a7238ec 109
Wolfgang Betz 34:edda6a7238ec 110 #define UIP_CONF_IPV6 1
Wolfgang Betz 34:edda6a7238ec 111 #ifndef UIP_CONF_IPV6_QUEUE_PKT
Wolfgang Betz 34:edda6a7238ec 112 #define UIP_CONF_IPV6_QUEUE_PKT 0
Wolfgang Betz 34:edda6a7238ec 113 #endif /* UIP_CONF_IPV6_QUEUE_PKT */
Wolfgang Betz 34:edda6a7238ec 114 #define UIP_CONF_IP_FORWARD 0
Wolfgang Betz 34:edda6a7238ec 115 #ifndef UIP_CONF_BUFFER_SIZE
Wolfgang Betz 34:edda6a7238ec 116 //#define UIP_CONF_BUFFER_SIZE 280
Wolfgang Betz 34:edda6a7238ec 117 #define UIP_CONF_BUFFER_SIZE 600
Wolfgang Betz 34:edda6a7238ec 118 #endif
Wolfgang Betz 34:edda6a7238ec 119
Wolfgang Betz 34:edda6a7238ec 120 #define SICSLOWPAN_CONF_MAXAGE 4
Wolfgang Betz 34:edda6a7238ec 121 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
Wolfgang Betz 34:edda6a7238ec 122
Wolfgang Betz 34:edda6a7238ec 123
Wolfgang Betz 34:edda6a7238ec 124 #ifndef SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS
Wolfgang Betz 34:edda6a7238ec 125 #define SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS 5
Wolfgang Betz 34:edda6a7238ec 126 #endif /* SICSLOWPAN_CONF_MAX_MAC_TRANSMISSIONS */
Wolfgang Betz 34:edda6a7238ec 127
Wolfgang Betz 34:edda6a7238ec 128 #define UIP_CONF_ICMP_DEST_UNREACH 1
Wolfgang Betz 34:edda6a7238ec 129
Wolfgang Betz 34:edda6a7238ec 130 #define UIP_CONF_DHCP_LIGHT
Wolfgang Betz 34:edda6a7238ec 131 #define UIP_CONF_LLH_LEN 0
Wolfgang Betz 34:edda6a7238ec 132 #ifndef UIP_CONF_RECEIVE_WINDOW
Wolfgang Betz 34:edda6a7238ec 133 #define UIP_CONF_RECEIVE_WINDOW 150
Wolfgang Betz 34:edda6a7238ec 134 #endif
Wolfgang Betz 34:edda6a7238ec 135 #ifndef UIP_CONF_TCP_MSS
Wolfgang Betz 34:edda6a7238ec 136 #define UIP_CONF_TCP_MSS UIP_CONF_RECEIVE_WINDOW
Wolfgang Betz 34:edda6a7238ec 137 #endif
Wolfgang Betz 34:edda6a7238ec 138 #define UIP_CONF_MAX_CONNECTIONS 4
Wolfgang Betz 34:edda6a7238ec 139 #define UIP_CONF_MAX_LISTENPORTS 8
Wolfgang Betz 34:edda6a7238ec 140 #define UIP_CONF_UDP_CONNS 12
Wolfgang Betz 34:edda6a7238ec 141 #define UIP_CONF_FWCACHE_SIZE 30
Wolfgang Betz 34:edda6a7238ec 142 #define UIP_CONF_BROADCAST 1
Wolfgang Betz 34:edda6a7238ec 143 #define UIP_ARCH_IPCHKSUM 0
Wolfgang Betz 34:edda6a7238ec 144 #define UIP_CONF_UDP 1
Wolfgang Betz 34:edda6a7238ec 145 #define UIP_CONF_UDP_CHECKSUMS 1
Wolfgang Betz 34:edda6a7238ec 146 #define UIP_CONF_TCP 1
Wolfgang Betz 34:edda6a7238ec 147 /*---------------------------------------------------------------------------*/
Wolfgang Betz 34:edda6a7238ec 148 /* include the project config */
Wolfgang Betz 34:edda6a7238ec 149 /* PROJECT_CONF_H might be defined in the project Makefile */
Wolfgang Betz 34:edda6a7238ec 150 #ifdef PROJECT_CONF_H
Wolfgang Betz 34:edda6a7238ec 151 #include "project-conf.h"
Wolfgang Betz 34:edda6a7238ec 152 #endif /* PROJECT_CONF_H */
Wolfgang Betz 34:edda6a7238ec 153 /*---------------------------------------------------------------------------*/
Wolfgang Betz 34:edda6a7238ec 154 #endif /* CONTIKI_CONF_H */
Wolfgang Betz 34:edda6a7238ec 155 /*---------------------------------------------------------------------------*/