Intermediate
30 min

Establish long-distance wireless transmission with RFM75 and STM32L432KC

Stay connected without the hassle

ISM Click with UNI Clicker

Published May 14, 2023

Click board™

ISM Click

Dev. board

UNI Clicker

Compiler

NECTO Studio

MCU

STM32L432KC

Unleash the potential of your solution and get efficient, fast, and reliable wireless communication

A

A

Hardware Overview

How does it work?

ISM Click is based on the RFM75, a low-power, high-performance 2.4GHz GFSK transceiver operating in the worldwide ISM frequency band from 2400MHz to 2527MHz from RF Solutions. The RFM75 operates in TDD mode, either as a transmitter or as a receiver. Burst mode transmission and up to 2Mbps air data rate make it suitable for ultra-low power consumption applications. The embedded packet processing engines enable their entire operation with a simple MCU as a radio system. Auto re-transmission and auto acknowledge giving reliable link without any MCU interference. A transmitter and receiver must be programmed with the same RF channel frequency to communicate, supporting a programmable air

data rate of 250Kbps, 1Mbps, or 2Mbps. The RF channel frequency determines the center of the channel used by RFM75. The RF_CH register, in register bank 0, sets the frequency according to the following formula F0= 2400 + RF_CH (MHz), where the resolution of the RF channel frequency is 1MHz. ISM Click communicates with MCU using the standard SPI serial interface that operates at clock rates up to 8 MHz. In power-down mode, RFM75 is in Sleep mode with minimal current consumption. The SPI interface is still active in this mode, and all register values are available by the SPI interface. This Click board™ also has a yellow LED indicator routed on the INT pin of the mikroBUS™ socket (provide the user with feedback after

a successfully received package) and a chip-enable function routed on the RST pin of the mikroBUS™ which activates TX or RX mode of the RFM75.  Besides, it also has two additional LED indicators, a red and blue LED routed on the AN and PWM pins of the mikroBUS™ socket. The user can use it for visual indication when sending or receiving data. This Click board™ can only be operated with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.

ISM Click top side image
ISM Click lateral side image
ISM Click bottom side image

Features overview

Development board

UNI Clicker is a compact development board designed as a complete solution that brings the flexibility of add-on Click boards™ to your favorite microcontroller, making it a perfect starter kit for implementing your ideas. It supports a wide range of microcontrollers, such as different ARM, PIC32, dsPIC, PIC, and AVR from various vendors like Microchip, ST, NXP, and TI (regardless of their number of pins), four mikroBUS™ sockets for Click board™ connectivity, a USB connector, LED indicators, buttons, a debugger/programmer connector, and two 26-pin headers for interfacing with external electronics. Thanks to innovative manufacturing technology, it allows you to build

gadgets with unique functionalities and features quickly. Each part of the UNI Clicker development kit contains the components necessary for the most efficient operation of the same board. In addition to the possibility of choosing the UNI Clicker programming method, using a third-party programmer or CODEGRIP/mikroProg connected to onboard JTAG/SWD header, the UNI Clicker board also includes a clean and regulated power supply module for the development kit. It provides two ways of board-powering; through the USB Type-C (USB-C) connector, where onboard voltage regulators provide the appropriate voltage levels to each component on the board, or using a Li-Po/Li

Ion battery via an onboard battery connector. All communication methods that mikroBUS™ itself supports are on this board (plus USB HOST/DEVICE), including the well-established mikroBUS™ socket, a standardized socket for the MCU card (SiBRAIN standard), and several user-configurable buttons and LED indicators. UNI Clicker is an integral part of the Mikroe ecosystem, allowing you to create a new application in minutes. Natively supported by Mikroe software tools, it covers many aspects of prototyping thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.

UNI clicker double image

Microcontroller Overview

MCU Card / MCU

default

Type

8th Generation

Architecture

ARM Cortex-M4

MCU Memory (KB)

256

Silicon Vendor

STMicroelectronics

Pin count

32

RAM (Bytes)

65536

Used MCU Pins

mikroBUS™ mapper

Data Transmission Indicator
PA0
AN
Chip Enable
PB1
RST
SPI Chip Select
PA1
CS
SPI Clock
PB3
SCK
SPI Data OUT
PB4
MISO
SPI Data IN
PB5
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
Data Reception Indicator
PB0
PWM
Interrupt
PA8
INT
NC
NC
TX
NC
NC
RX
NC
NC
SCL
NC
NC
SDA
NC
NC
5V
Ground
GND
GND
1

Take a closer look

Click board™ Schematic

ISM Click Schematic schematic

Step by step

Project assembly

UNI Clicker front image hardware assembly

Start by selecting your development board and Click board™. Begin with the UNI Clicker as your development board.

UNI Clicker front image hardware assembly
GNSS2 Click front image hardware assembly
SiBRAIN for STM32F745VG front image hardware assembly
Prog-cut hardware assembly
UNI Clicker Access MB 1 - upright/background hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
Necto image step 7 hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Debug Image Necto Step hardware assembly

Track your results in real time

Application Output

1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support

Library Description

This library contains API for ISM Click driver.

Key functions:

  • ism_cfg_setup - Config Object Initialization function.
  • ism_init - Initialization function.
  • ism_default_cfg - Click Default Configuration function.

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 Ism Click example
 *
 * # Description
 * This library contains API for the ISM Click driver.
 * This example transmits/receives and processes data from ISM clicks.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes driver and performs the default configuration. 
 *
 * ## Application Task
 * Transmitter/Receiver task depends on uncommented code.
 * Receiver logging each received byte to the UART for data logging,
 * while transmitter send messages every 1 second.
 *
 * @author Nenad Filipovic
 *
 */

#include "board.h"
#include "log.h"
#include "ism.h"

// Comment out the line below in order to switch the application mode to receiver
#define DEMO_APP_TRANSMITTER

static ism_t ism;
static log_t logger;

static uint8_t demo_message_1[ 9 ] = { 'M', 'i', 'k', 'r', 'o', 'E', 13, 10, 0 };
static uint8_t demo_message_2[ 12 ] = { 'I', 'S', 'M', ' ', 'C', 'l', 'i', 'c', 'k', 13, 10, 0 };

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    ism_cfg_t ism_cfg;  /**< Click config object. */

    /** 
     * 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.
    ism_cfg_setup( &ism_cfg );
    ISM_MAP_MIKROBUS( ism_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == ism_init( &ism, &ism_cfg ) ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );
        for ( ; ; );
    }

    ism_default_cfg ( &ism );
    Delay_ms ( 100 );
    
#ifdef DEMO_APP_TRANSMITTER
    ism_switch_tx_mode( &ism );
    log_printf( &logger, " Application Mode: Transmitter\r\n" );
#else
    ism_switch_rx_mode( &ism );
    log_printf( &logger, " Application Mode: Receiver\r\n" );
#endif
    log_info( &logger, " Application Task " );
}

void application_task ( void ) 
{
#ifdef DEMO_APP_TRANSMITTER
    ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_1, 9 );
    log_printf( &logger, "  Tx : %s", demo_message_1 );
    Delay_ms ( 1000 );

    ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_2, 12 );
    log_printf( &logger, "  Tx : %s", demo_message_2 );
    Delay_ms ( 1000 );
#else
    uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };

    ism_receive_packet( &ism, &rx_buf[ 0 ] );

    if ( rx_buf[ 0 ] ) 
    {
        log_printf( &logger, "  Rx : %s", rx_buf );
    }
#endif
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}

// ------------------------------------------------------------------------ END
/*!
 * @file main.c
 * @brief Ism Click example
 *
 * # Description
 * This library contains API for the ISM Click driver.
 * This example transmits/receives and processes data from ISM clicks.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes driver and performs the default configuration. 
 *
 * ## Application Task
 * Transmitter/Receiver task depends on uncommented code.
 * Receiver logging each received byte to the UART for data logging,
 * while transmitter send messages every 1 second.
 *
 * @author Nenad Filipovic
 *
 */

#include "board.h"
#include "log.h"
#include "ism.h"

// Comment out the line below in order to switch the application mode to receiver
#define DEMO_APP_TRANSMITTER

static ism_t ism;
static log_t logger;

static uint8_t demo_message_1[ 9 ] = { 'M', 'i', 'k', 'r', 'o', 'E', 13, 10, 0 };
static uint8_t demo_message_2[ 12 ] = { 'I', 'S', 'M', ' ', 'C', 'l', 'i', 'c', 'k', 13, 10, 0 };

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    ism_cfg_t ism_cfg;  /**< Click config object. */

    /** 
     * 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.
    ism_cfg_setup( &ism_cfg );
    ISM_MAP_MIKROBUS( ism_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == ism_init( &ism, &ism_cfg ) ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );
        for ( ; ; );
    }

    ism_default_cfg ( &ism );
    Delay_ms ( 100 );
    
#ifdef DEMO_APP_TRANSMITTER
    ism_switch_tx_mode( &ism );
    log_printf( &logger, " Application Mode: Transmitter\r\n" );
#else
    ism_switch_rx_mode( &ism );
    log_printf( &logger, " Application Mode: Receiver\r\n" );
#endif
    log_info( &logger, " Application Task " );
}

void application_task ( void ) 
{
#ifdef DEMO_APP_TRANSMITTER
    ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_1, 9 );
    log_printf( &logger, "  Tx : %s", demo_message_1 );
    Delay_ms ( 1000 );

    ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_2, 12 );
    log_printf( &logger, "  Tx : %s", demo_message_2 );
    Delay_ms ( 1000 );
#else
    uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };

    ism_receive_packet( &ism, &rx_buf[ 0 ] );

    if ( rx_buf[ 0 ] ) 
    {
        log_printf( &logger, "  Rx : %s", rx_buf );
    }
#endif
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}

// ------------------------------------------------------------------------ END
/*!
 * @file main.c
 * @brief Ism Click example
 *
 * # Description
 * This library contains API for the ISM Click driver.
 * This example transmits/receives and processes data from ISM clicks.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes driver and performs the default configuration. 
 *
 * ## Application Task
 * Transmitter/Receiver task depends on uncommented code.
 * Receiver logging each received byte to the UART for data logging,
 * while transmitter send messages every 1 second.
 *
 * @author Nenad Filipovic
 *
 */

#include "board.h"
#include "log.h"
#include "ism.h"

// Comment out the line below in order to switch the application mode to receiver
#define DEMO_APP_TRANSMITTER

static ism_t ism;
static log_t logger;

static uint8_t demo_message_1[ 9 ] = { 'M', 'i', 'k', 'r', 'o', 'E', 13, 10, 0 };
static uint8_t demo_message_2[ 12 ] = { 'I', 'S', 'M', ' ', 'C', 'l', 'i', 'c', 'k', 13, 10, 0 };

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    ism_cfg_t ism_cfg;  /**< Click config object. */

    /** 
     * 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.
    ism_cfg_setup( &ism_cfg );
    ISM_MAP_MIKROBUS( ism_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == ism_init( &ism, &ism_cfg ) ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );
        for ( ; ; );
    }

    ism_default_cfg ( &ism );
    Delay_ms ( 100 );
    
#ifdef DEMO_APP_TRANSMITTER
    ism_switch_tx_mode( &ism );
    log_printf( &logger, " Application Mode: Transmitter\r\n" );
#else
    ism_switch_rx_mode( &ism );
    log_printf( &logger, " Application Mode: Receiver\r\n" );
#endif
    log_info( &logger, " Application Task " );
}

void application_task ( void ) 
{
#ifdef DEMO_APP_TRANSMITTER
    ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_1, 9 );
    log_printf( &logger, "  Tx : %s", demo_message_1 );
    Delay_ms ( 1000 );

    ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_2, 12 );
    log_printf( &logger, "  Tx : %s", demo_message_2 );
    Delay_ms ( 1000 );
#else
    uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };

    ism_receive_packet( &ism, &rx_buf[ 0 ] );

    if ( rx_buf[ 0 ] ) 
    {
        log_printf( &logger, "  Rx : %s", rx_buf );
    }
#endif
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}

// ------------------------------------------------------------------------ END

Additional Support

Resources

Love this project?

'Buy This Kit' button takes you directly to the shopping cart where you can easily add or remove products.