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.
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 31:a4d8072139f2, committed 2016-11-21
- Comitter:
- Wolfgang Betz
- Date:
- Mon Nov 21 09:41:37 2016 +0100
- Parent:
- 30:9c6dcfc47619
- Child:
- 32:e5272bafeeea
- Commit message:
- Enable standby mode
Changed in this revision
| SimpleSpirit1.cpp | Show annotated file Show diff for this revision Revisions of this file |
| SimpleSpirit1.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/SimpleSpirit1.cpp Fri Nov 18 13:35:27 2016 +0100
+++ b/SimpleSpirit1.cpp Mon Nov 21 09:41:37 2016 +0100
@@ -19,11 +19,8 @@
#define STATE_TIMEOUT (1000)
-// betzw: switching force & back from standby seems to be unstable
-// #define USE_STANDBY_STATE
-
-// betzw: enable beyond macro if you want debug messages also from IRQ handler
-#define DEBUG_IRQ
+// betzw: switching force & back from standby is on some devices quite unstable
+#define USE_STANDBY_STATE
/*** Class Implementation ***/
/** Static Class Variables **/
@@ -474,7 +471,6 @@
#endif
csma_ca_state(S_DISABLE); // disable CSMA/CA
cmd_strobe(SPIRIT1_STROBE_FTX);
- // cmd_strobe(SPIRIT1_STROBE_SABORT); // betzw: we do not know in which state we are (most likely it's a not stable state)!
if(_spirit_tx_started) {
_spirit_tx_started = false;
CLEAR_TXBUF();
@@ -493,7 +489,6 @@
_spirit_rx_err = false;
_spirit_tx_started = false;
- // cmd_strobe(SPIRIT1_STROBE_RX); // data-sheet says that we will return to READY state automatically (furthermore we are in a not stable state)!
CLEAR_TXBUF();
CLEAR_RXBUF();
--- a/SimpleSpirit1.h Fri Nov 18 13:35:27 2016 +0100
+++ b/SimpleSpirit1.h Mon Nov 21 09:41:37 2016 +0100
@@ -16,6 +16,10 @@
#include "spirit1-const.h"
+// betzw: enable beyond macro if you want debug messages also from IRQ handler
+#define DEBUG_IRQ
+
+
/*** Macros from Cube Implementation ***/
#define CLEAR_TXBUF() (spirit_tx_len = 0)
#define IS_RXBUF_EMPTY() (spirit_rx_len == 0)
@@ -75,7 +79,7 @@
void rx_timeout_handler(void) {
set_ready_state();
cmd_strobe(SPIRIT1_STROBE_RX);
-#ifndef NDEBUG
+#ifdef DEBUG_IRQ
debug("\n\r%s (%d)\n\r", __func__, __LINE__);
#endif
}
X-NUCLEO-IDS01A4 Sub-1GHz RF Expansion Board