Our 868MHz ultra-low-power RF module makes long-distance wireless communication effortless, ensuring robust connections for remote monitoring and control systems.
A
A
Hardware Overview
How does it work?
Spirit Click is based on the SP1ML, a Spirit1 868MHz low-power RF module with an integrated microcontroller from STMicroelectronics. Besides the STM32L1 MCU, the module integrates a filter/balun and a chip antenna. Over the chip antenna, it achieves output power up to +11.6dBm and uses modulation schemes 2-FSK, GFSK, GMSK, OOK, and ASK. Its compact size, integrated design, all necessary FCC modular approvals, and CE compliance reduce time-to-market, making it an ideal choice for wireless applications. The data rates depend on the used modulation. The UART host interface allows simple connection to an external microcontroller with standard firmware, allowing AT commands to facilitate RF configuration, data transmission, and reception using simple point-to-point communication. It can also switch the module between the command and operating modes. In addition, the serial wire
debug interface (SWD) is also available, as the Spirit Click and the SP1ML module support custom module firmware. The 5-pin header, aside from the module, can also be used for debugging purposes. Additional RXTX LED status indicator shows when the data is sent or received. The command mode allows module configuration and status interrogation using an extended AT-style command set. In operating mode, the module serves its primary purpose as a wireless transceiver. Following power-up or reset, the module starts in operating mode with the current configuration loaded from EEPROM. In operating mode, data received from the host on the UART interface will be wirelessly transmitted by the Spirit1 radio using the current configuration settings for frequency, data rate, modulation, and output power. Conversely, any data received by Spirit1 that meets the configured filtering criteria
will be output to the UART interface. In command mode, the module will accept commands to configure module settings and interrogate module status. Spirit Click uses a standard UART interface to communicate with the host MCU, supporting baud rates from 9600 up to 250000bps, while 38400bps is the default value. You can reset the Spirit Click over the RST pin and shut it down over the SHD pin. To change the operating mode, there is the CMD pin. This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the LOGIC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used for further development.
Features overview
Development board
UNI-DS v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports a wide range of microcontrollers, such as different STM32, Kinetis, TIVA, CEC, MSP, PIC, dsPIC, PIC32, and AVR MCUs regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer over WiFi. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, UNI-DS v8 provides a fluid and immersive working experience, allowing access anywhere and under any
circumstances at any time. Each part of the UNI-DS v8 development board contains the components necessary for the most efficient operation of the same board. An advanced integrated CODEGRIP programmer/debugger module offers many valuable programming/debugging options, including support for JTAG, SWD, and SWO Trace (Single Wire Output)), and seamless integration with the Mikroe software environment. Besides, it also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector. Communication options such as USB-UART, USB
HOST/DEVICE, CAN (on the MCU card, if supported), and Ethernet is also included. In addition, it also has the well-established mikroBUS™ standard, a standardized socket for the MCU card (SiBRAIN standard), and two display options for the TFT board line of products and character-based LCD. UNI-DS v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU

Type
8th Generation
Architecture
ARM Cortex-M3
MCU Memory (KB)
384
Silicon Vendor
STMicroelectronics
Pin count
144
RAM (Bytes)
49152
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
This Click board can be interfaced and monitored in two ways:
Application Output
- Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
UART Terminal
- Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Software Support
Library Description
This library contains API for SPIRIT Click driver.
Key functions:
spirit_power_module
- Function for power mode of SPIRIT click.spirit_reset
- Function for reseting SPIRIT click.spirit_set_mode
- Function for setting mode of SPIRIT click.
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* @file main.c
* @brief SPIRIT Click Example.
*
* # Description
* This example reads and processes data from SPIRIT click.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver and configures the click board.
*
* ## Application Task
* Depending on the selected mode, it reads all the received data or sends the desired message
* every 2 seconds.
*
* ## Additional Function
* - static err_t spirit_process ( void ) - The general process of collecting the received data.
*
* @author Jelena Milosavljevic
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "spirit.h"
#define PROCESS_BUFFER_SIZE 500
#define PROCESS_COUNTER 20
#define TEXT_TO_SEND "MikroE - SPIRIT click board\r\n"
#define DEMO_APP_RECEIVER
//#define DEMO_APP_TRANSMITTER
static spirit_t spirit;
static log_t logger;
static char app_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
static int32_t app_buf_len = 0;
static int32_t app_buf_cnt = 0;
/**
* @brief SPIRIT data reading function.
* @details This function reads data from device and concatenates data to application buffer.
*
* @return @li @c 0 - Read some data.
* @li @c -1 - Nothing is read.
* @li @c -2 - Application buffer overflow.
*
* See #err_t definition for detailed explanation.
* @note None.
*/
static void spirit_process ( void );
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
spirit_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
spirit_cfg_setup( &cfg );
SPIRIT_MAP_MIKROBUS( cfg, MIKROBUS_1 );
spirit_init( &spirit, &cfg );
Delay_ms( 1000 );
log_info( &logger, "---- Configuring the module ----" );
spirit_power_module( &spirit, SPIRIT_MODULE_WAKE_UP );
spirit_reset( &spirit );
spirit_set_mode( &spirit, SPIRIT_OPERATING_MODE );
Delay_ms( 1000 );
log_printf( &logger, "COMMAND MODE\r\n" );
spirit_send_cmd( &spirit, SPIRIT_CMD_ENTER_COMMAND_MODE );
spirit_process( );
log_printf( &logger, "FIRMWARE VERSION\r\n" );
spirit_send_cmd( &spirit, SPIRIT_CMD_READ_MODULE_VERSION );
spirit_process( );
log_printf( &logger, "TXRX LED - OPEN DRAIN OUTPUT\r\n" );
spirit_send_cmd_with_parameter( &spirit, SPIRIT_CMD_CFG_TXRX_LED, SPIRIT_PCFG_TXRXLED_OPEN_DRAIN );
spirit_process( );
log_printf( &logger, "STORE CONFIG\r\n" );
spirit_send_cmd( &spirit, SPIRIT_CMD_STORE_CURRENT_CONFIG );
spirit_process( );
log_printf( &logger, "OPERATING MODE\r\n" );
spirit_send_cmd( &spirit, SPIRIT_CMD_ENTER_OPERATING_MODE );
spirit_process( );
log_info( &logger, "---- The module has been configured ----" );
#ifdef DEMO_APP_RECEIVER
log_info( &logger, "---- RECEIVER MODE ----" );
#endif
#ifdef DEMO_APP_TRANSMITTER
log_info( &logger, "---- TRANSMITTER MODE ----" );
#endif
Delay_ms( 1000 );
}
void application_task ( void ) {
#ifdef DEMO_APP_RECEIVER
spirit_process( );
#endif
#ifdef DEMO_APP_TRANSMITTER
spirit_generic_write( &spirit, TEXT_TO_SEND, strlen( TEXT_TO_SEND ) );
log_info( &logger, "---- The message has been sent ----" );
Delay_ms( 2000 );
#endif
}
void main ( void ) {
application_init( );
for ( ; ; ) {
application_task( );
}
}
static void spirit_process ( void ) {
int32_t rsp_size;
char uart_rx_buffer[ PROCESS_BUFFER_SIZE ] = { 0 };
uint8_t process_cnt = PROCESS_COUNTER;
while( process_cnt != 0 ) {
rsp_size = spirit_generic_read( &spirit, &uart_rx_buffer, PROCESS_BUFFER_SIZE );
if ( rsp_size > 0 ) {
for ( uint8_t cnt = 0; cnt < rsp_size; cnt++ ) {
log_printf( &logger, "%c", uart_rx_buffer[ cnt ] );
if ( uart_rx_buffer[ cnt ] == '\n' ) {
log_printf( &logger, "-----------------------------\r\n" );
}
}
}
else {
process_cnt--;
// Process delay
Delay_100ms( );
}
}
}
// ------------------------------------------------------------------------ END
Additional Support
Resources
Category:Sub-1 GHz Transceievers