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:
Thu Oct 13 15:41:39 2016 +0200
Revision:
0:4fb29d9ee571
First compiling version (without warnings)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Wolfgang Betz 0:4fb29d9ee571 1 /**
Wolfgang Betz 0:4fb29d9ee571 2 ******************************************************************************
Wolfgang Betz 0:4fb29d9ee571 3 * @file SPIRIT_LinearFifo.h
Wolfgang Betz 0:4fb29d9ee571 4 * @author VMA division - AMS
Wolfgang Betz 0:4fb29d9ee571 5 * @version 3.2.2
Wolfgang Betz 0:4fb29d9ee571 6 * @date 08-July-2015
Wolfgang Betz 0:4fb29d9ee571 7 * @brief Configuration and management of SPIRIT Fifo.
Wolfgang Betz 0:4fb29d9ee571 8 * @details
Wolfgang Betz 0:4fb29d9ee571 9 *
Wolfgang Betz 0:4fb29d9ee571 10 * @attention
Wolfgang Betz 0:4fb29d9ee571 11 *
Wolfgang Betz 0:4fb29d9ee571 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Wolfgang Betz 0:4fb29d9ee571 13 *
Wolfgang Betz 0:4fb29d9ee571 14 * Redistribution and use in source and binary forms, with or without modification,
Wolfgang Betz 0:4fb29d9ee571 15 * are permitted provided that the following conditions are met:
Wolfgang Betz 0:4fb29d9ee571 16 * 1. Redistributions of source code must retain the above copyright notice,
Wolfgang Betz 0:4fb29d9ee571 17 * this list of conditions and the following disclaimer.
Wolfgang Betz 0:4fb29d9ee571 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Wolfgang Betz 0:4fb29d9ee571 19 * this list of conditions and the following disclaimer in the documentation
Wolfgang Betz 0:4fb29d9ee571 20 * and/or other materials provided with the distribution.
Wolfgang Betz 0:4fb29d9ee571 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Wolfgang Betz 0:4fb29d9ee571 22 * may be used to endorse or promote products derived from this software
Wolfgang Betz 0:4fb29d9ee571 23 * without specific prior written permission.
Wolfgang Betz 0:4fb29d9ee571 24 *
Wolfgang Betz 0:4fb29d9ee571 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Wolfgang Betz 0:4fb29d9ee571 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Wolfgang Betz 0:4fb29d9ee571 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Wolfgang Betz 0:4fb29d9ee571 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Wolfgang Betz 0:4fb29d9ee571 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Wolfgang Betz 0:4fb29d9ee571 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Wolfgang Betz 0:4fb29d9ee571 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Wolfgang Betz 0:4fb29d9ee571 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Wolfgang Betz 0:4fb29d9ee571 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Wolfgang Betz 0:4fb29d9ee571 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Wolfgang Betz 0:4fb29d9ee571 35 *
Wolfgang Betz 0:4fb29d9ee571 36 ******************************************************************************
Wolfgang Betz 0:4fb29d9ee571 37 */
Wolfgang Betz 0:4fb29d9ee571 38
Wolfgang Betz 0:4fb29d9ee571 39 /* Define to prevent recursive inclusion -------------------------------------*/
Wolfgang Betz 0:4fb29d9ee571 40 #ifndef __SPIRIT_LINEAR_FIFO_H
Wolfgang Betz 0:4fb29d9ee571 41 #define __SPIRIT_LINEAR_FIFO_H
Wolfgang Betz 0:4fb29d9ee571 42
Wolfgang Betz 0:4fb29d9ee571 43
Wolfgang Betz 0:4fb29d9ee571 44 /* Includes ------------------------------------------------------------------*/
Wolfgang Betz 0:4fb29d9ee571 45
Wolfgang Betz 0:4fb29d9ee571 46 #include "SPIRIT_Regs.h"
Wolfgang Betz 0:4fb29d9ee571 47 #include "SPIRIT_Types.h"
Wolfgang Betz 0:4fb29d9ee571 48
Wolfgang Betz 0:4fb29d9ee571 49
Wolfgang Betz 0:4fb29d9ee571 50 #ifdef __cplusplus
Wolfgang Betz 0:4fb29d9ee571 51 extern "C" {
Wolfgang Betz 0:4fb29d9ee571 52 #endif
Wolfgang Betz 0:4fb29d9ee571 53
Wolfgang Betz 0:4fb29d9ee571 54
Wolfgang Betz 0:4fb29d9ee571 55 /**
Wolfgang Betz 0:4fb29d9ee571 56 * @addtogroup SPIRIT_Libraries
Wolfgang Betz 0:4fb29d9ee571 57 * @{
Wolfgang Betz 0:4fb29d9ee571 58 */
Wolfgang Betz 0:4fb29d9ee571 59
Wolfgang Betz 0:4fb29d9ee571 60
Wolfgang Betz 0:4fb29d9ee571 61 /**
Wolfgang Betz 0:4fb29d9ee571 62 * @defgroup SPIRIT_LinearFifo Linear FIFO
Wolfgang Betz 0:4fb29d9ee571 63 * @brief Configuration and management of SPIRIT FIFO.
Wolfgang Betz 0:4fb29d9ee571 64 * @details See the file <i>@ref SPIRIT_LinearFifo.h</i> for more details.
Wolfgang Betz 0:4fb29d9ee571 65 * @{
Wolfgang Betz 0:4fb29d9ee571 66 */
Wolfgang Betz 0:4fb29d9ee571 67
Wolfgang Betz 0:4fb29d9ee571 68 /**
Wolfgang Betz 0:4fb29d9ee571 69 * @defgroup LinearFifo_Exported_Types Linear FIFO Exported Types
Wolfgang Betz 0:4fb29d9ee571 70 * @{
Wolfgang Betz 0:4fb29d9ee571 71 */
Wolfgang Betz 0:4fb29d9ee571 72
Wolfgang Betz 0:4fb29d9ee571 73
Wolfgang Betz 0:4fb29d9ee571 74 /**
Wolfgang Betz 0:4fb29d9ee571 75 * @}
Wolfgang Betz 0:4fb29d9ee571 76 */
Wolfgang Betz 0:4fb29d9ee571 77
Wolfgang Betz 0:4fb29d9ee571 78
Wolfgang Betz 0:4fb29d9ee571 79 /**
Wolfgang Betz 0:4fb29d9ee571 80 * @defgroup LinearFifo_Exported_Constants Linear FIFO Exported Constants
Wolfgang Betz 0:4fb29d9ee571 81 * @{
Wolfgang Betz 0:4fb29d9ee571 82 */
Wolfgang Betz 0:4fb29d9ee571 83 #define IS_FIFO_THR(VAL) (VAL<=96)
Wolfgang Betz 0:4fb29d9ee571 84
Wolfgang Betz 0:4fb29d9ee571 85 /**
Wolfgang Betz 0:4fb29d9ee571 86 * @}
Wolfgang Betz 0:4fb29d9ee571 87 */
Wolfgang Betz 0:4fb29d9ee571 88
Wolfgang Betz 0:4fb29d9ee571 89
Wolfgang Betz 0:4fb29d9ee571 90 /**
Wolfgang Betz 0:4fb29d9ee571 91 * @defgroup LinearFifo_Exported_Macros Linear FIFO Exported Macros
Wolfgang Betz 0:4fb29d9ee571 92 * @{
Wolfgang Betz 0:4fb29d9ee571 93 */
Wolfgang Betz 0:4fb29d9ee571 94
Wolfgang Betz 0:4fb29d9ee571 95
Wolfgang Betz 0:4fb29d9ee571 96 /**
Wolfgang Betz 0:4fb29d9ee571 97 * @}
Wolfgang Betz 0:4fb29d9ee571 98 */
Wolfgang Betz 0:4fb29d9ee571 99
Wolfgang Betz 0:4fb29d9ee571 100
Wolfgang Betz 0:4fb29d9ee571 101 /**
Wolfgang Betz 0:4fb29d9ee571 102 * @defgroup LinearFifo_Exported_Functions Linear FIFO Exported Functions
Wolfgang Betz 0:4fb29d9ee571 103 * @{
Wolfgang Betz 0:4fb29d9ee571 104 */
Wolfgang Betz 0:4fb29d9ee571 105
Wolfgang Betz 0:4fb29d9ee571 106 uint8_t SpiritLinearFifoReadNumElementsRxFifo(void);
Wolfgang Betz 0:4fb29d9ee571 107 uint8_t SpiritLinearFifoReadNumElementsTxFifo(void);
Wolfgang Betz 0:4fb29d9ee571 108 void SpiritLinearFifoSetAlmostFullThresholdRx(uint8_t cThrRxFifo);
Wolfgang Betz 0:4fb29d9ee571 109 uint8_t SpiritLinearFifoGetAlmostFullThresholdRx(void);
Wolfgang Betz 0:4fb29d9ee571 110 void SpiritLinearFifoSetAlmostEmptyThresholdRx(uint8_t cThrRxFifo);
Wolfgang Betz 0:4fb29d9ee571 111 uint8_t SpiritLinearFifoGetAlmostEmptyThresholdRx(void);
Wolfgang Betz 0:4fb29d9ee571 112 void SpiritLinearFifoSetAlmostFullThresholdTx(uint8_t cThrTxFifo);
Wolfgang Betz 0:4fb29d9ee571 113 uint8_t SpiritLinearFifoGetAlmostFullThresholdTx(void);
Wolfgang Betz 0:4fb29d9ee571 114 void SpiritLinearFifoSetAlmostEmptyThresholdTx(uint8_t cThrTxFifo);
Wolfgang Betz 0:4fb29d9ee571 115 uint8_t SpiritLinearFifoGetAlmostEmptyThresholdTx(void);
Wolfgang Betz 0:4fb29d9ee571 116
Wolfgang Betz 0:4fb29d9ee571 117 /**
Wolfgang Betz 0:4fb29d9ee571 118 * @}
Wolfgang Betz 0:4fb29d9ee571 119 */
Wolfgang Betz 0:4fb29d9ee571 120
Wolfgang Betz 0:4fb29d9ee571 121 /**
Wolfgang Betz 0:4fb29d9ee571 122 * @}
Wolfgang Betz 0:4fb29d9ee571 123 */
Wolfgang Betz 0:4fb29d9ee571 124
Wolfgang Betz 0:4fb29d9ee571 125
Wolfgang Betz 0:4fb29d9ee571 126 /**
Wolfgang Betz 0:4fb29d9ee571 127 * @}
Wolfgang Betz 0:4fb29d9ee571 128 */
Wolfgang Betz 0:4fb29d9ee571 129
Wolfgang Betz 0:4fb29d9ee571 130 #ifdef __cplusplus
Wolfgang Betz 0:4fb29d9ee571 131 }
Wolfgang Betz 0:4fb29d9ee571 132 #endif
Wolfgang Betz 0:4fb29d9ee571 133
Wolfgang Betz 0:4fb29d9ee571 134 #endif
Wolfgang Betz 0:4fb29d9ee571 135
Wolfgang Betz 0:4fb29d9ee571 136 /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/