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).
Diff: source/SimpleSpirit1.cpp
- Revision:
- 46:d104e58c5caf
- Parent:
- 45:2d01cc9bc761
- Child:
- 47:3a30b960a8c2
--- a/source/SimpleSpirit1.cpp Mon Dec 19 12:42:40 2016 +0100 +++ b/source/SimpleSpirit1.cpp Mon Dec 19 13:21:59 2016 +0100 @@ -464,7 +464,7 @@ } /* Disable handling of other TX flags */ - x_irq_status.IRQ_TX_FIFO_ALMOST_EMPTY = x_irq_status.IRQ_TX_FIFO_ERROR = S_RESET; + x_irq_status.IRQ_TX_FIFO_ALMOST_EMPTY = S_RESET; } /* The IRQ_TX_FIFO_ALMOST_EMPTY notifies an nearly empty TX fifo */ @@ -486,9 +486,6 @@ spi_write_linear_fifo(to_send, (uint8_t*)&tx_fifo_buffer[tx_buffer_pos]); } tx_buffer_pos += to_send; - - /* Disable handling of other TX flags */ - x_irq_status.IRQ_TX_FIFO_ERROR = S_RESET; } /* Transmission error */ @@ -550,7 +547,7 @@ } /* Disable handling of other RX flags */ - x_irq_status.IRQ_RX_FIFO_ERROR = x_irq_status.IRQ_RX_FIFO_ALMOST_FULL = S_RESET; + x_irq_status.IRQ_RX_FIFO_ALMOST_FULL = S_RESET; } } @@ -568,29 +565,6 @@ uint8_t fifo_available = linear_fifo_read_num_elements_rx_fifo(); spi_read_linear_fifo(fifo_available, &spirit_rx_buf[_spirit_rx_pos]); _spirit_rx_pos += fifo_available; - - spirit_rx_len = pkt_basic_get_received_pkt_length(); - -#ifdef DEBUG_IRQ - debug_if(!(spirit_rx_len <= MAX_PACKET_LEN), "\n\rAssert failed in: %s (%d)\n\r", __func__, __LINE__); -#endif - - if((spirit_rx_len > 0) && (_spirit_rx_pos >= spirit_rx_len)) { // already received everything - _is_receiving = false; // Finished receiving - stop_rx_timeout(); - - cmd_strobe(SPIRIT1_STROBE_FRX); - - last_rssi = qi_get_rssi(); //MGR - last_sqi = qi_get_sqi(); //MGR - - /* call user callback */ - if(_current_irq_callback) { - _current_irq_callback(RX_DONE); - } - } - /* Disable handling of other RX flags */ - x_irq_status.IRQ_RX_FIFO_ERROR = S_RESET; } }