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).

Revision:
25:2ec45788f28c
Parent:
24:03e351bfc9c9
Child:
28:6a71e15d5272
--- a/SimpleSpirit1.h	Thu Nov 10 15:25:59 2016 +0100
+++ b/SimpleSpirit1.h	Mon Nov 14 11:26:03 2016 +0100
@@ -134,11 +134,14 @@
     void chip_select() { _chip_select = 0; }
     void chip_unselect() { _chip_select = 1; }
 
-    void enter_shutdown() { _shut_down = 1; }
+    void enter_shutdown() {
+    	_shut_down = 1;
+    	wait_ms(5); // wait 5 milliseconds (to allow Spirit1 to shut down)
+    }
+
     void exit_shutdown() {
-    	wait_ms(2); // wait two milliseconds (to allow Spirit1 to shut down)
     	_shut_down = 0;
-    	wait_ms(10); // wait ten milliseconds (to allow Spirit1 a proper boot-up sequence)
+    	wait_ms(10); // wait 10 milliseconds (to allow Spirit1 a proper boot-up sequence)
     }
 
     void cs_to_sclk_delay(void) {
@@ -314,9 +317,14 @@
     	SpiritLinearFifoSetAlmostFullThresholdRx(cThrRxFifo);
     }
 
+    /** Calibration Instance Methods **/
+    void calibration_rco(SpiritFunctionalState xNewState) {
+    	SpiritCalibrationRco(xNewState);
+    }
+
     /** Internal Spirit Methods */
     void set_ready_state(void);
-    uint16_t arch_refresh_status(void);
+    uint8_t refresh_state(void);
 
     /** Friend Functions **/
     friend StatusBytes SdkEvalSpiWriteRegisters(uint8_t cRegAddress, uint8_t cNbBytes, uint8_t* pcBuffer);
@@ -345,7 +353,7 @@
     }
 
     /** Init Instance Method **/
-    void init(void);
+    void init();
 
     /** Spirit Irq Callback */
     void IrqHandler();
@@ -444,7 +452,7 @@
     }
 
     /** Reset Board **/
-    void reset_board(void) {
+    void reset_board() {
     	init();
     }
 };