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

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
Thermo 28 Click front image hardware assembly
SiBRAIN for STM32F745VG front image hardware assembly
Prog-cut hardware assembly
UNI Clicker MB 1 - upright/with-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

After loading the code example, pressing the "DEBUG" button builds and programs it on the selected setup.

Application Output Step 1

After programming is completed, a header with buttons for various actions available in the IDE appears. By clicking the green "PLAY "button, we start reading the results achieved with Click board™.

Application Output Step 3

Upon completion of programming, the Application Output tab is automatically opened, where the achieved result can be read. In case of an inability to perform the Debug function, check if a proper connection between the MCU used by the setup and the CODEGRIP programmer has been established. A detailed explanation of the CODEGRIP-board connection can be found in the CODEGRIP User Manual. Please find it in the RESOURCES section.

Application Output Step 4

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

This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.

/*!
 * @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 library initializes and defines the UART bus drivers 
 * to transmit or receive data. 
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes driver and set 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 transmitted send messages every 1 second.
 *
 * @author Nenad Filipovic
 *
 */

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

#define RECEIVER
// #define 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.

    LOG_MAP_USB_UART( log_cfg );
    log_cfg.level = LOG_LEVEL_DEBUG;
    log_cfg.baud = 115200;
    log_init( &logger, &log_cfg );
    log_printf( &logger, "------------------\r\n" );
    log_info( &logger, " Application Init " );

    // Click initialization.

    ism_cfg_setup( &ism_cfg );
    ISM_MAP_MIKROBUS( ism_cfg, MIKROBUS_1 );
    err_t init_flag  = ism_init( &ism, &ism_cfg );
    if ( init_flag == SPI_MASTER_ERROR ) {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    ism_default_cfg ( &ism );
    log_info( &logger, " Application Task " );
    log_printf( &logger, "------------------\r\n" );
    Delay_ms( 100 );

    #ifdef RECEIVER   
        ism_switch_rx_mode( &ism );
        log_printf( &logger, "   Receive data  \r\n" );
    #endif
   
    #ifdef TRANSMITTER
        ism_switch_tx_mode( &ism );
        log_printf( &logger, "  Transmit data   \r\n" );
    #endif
        
    log_printf( &logger, "------------------\r\n" );
}

void application_task ( void ) {
    #ifdef RECEIVER
        uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };

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

    #ifdef TRANSMITTER
        ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, &demo_message_1[ 0 ], 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[ 0 ], 12 );
        log_printf( &logger, "  Tx : %s", demo_message_2 );
        Delay_ms( 1000 );
    #endif
}

void main ( void ) {
    application_init( );

    for ( ; ; ) {
        application_task( );
    }
}

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

Additional Support

Resources