lyra24p  2.1.0.0
Main Page

LYRA 24P Click

LYRA 24P Click is a compact add-on board for high-performance wireless connectivity in IoT devices running on Bluetooth. This board features the LYRA 24P (453-00145R), a secure high-performance wireless module from Ezurio. It features a 32-bit ARM® Cortex®-M33 core at 39MHz, Bluetooth® Low Energy (BLE) 5.3 connectivity, and industry-leading Secure Vault® technology for enhanced security and future-proofing. The module supports 2.4GHz wireless connectivity with a built-in antenna and offers global regulatory certifications.

Click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Nov 2023.
  • Type : UART type

Software Support

We provide a library for the LYRA 24P Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for LYRA 24P Click driver.

Standard key functions :

Example key functions :

  • lyra24p_write_command This function writes a desired command by using UART serial interface.
    err_t lyra24p_write_command ( lyra24p_t *ctx, uint8_t *command );
  • lyra24p_write_cmd_param This function writes a desired command, command value, prefix and parameter by using UART serial interface.
    err_t lyra24p_write_cmd_param ( lyra24p_t *ctx, uint8_t *command, uint8_t *cmd_val, uint8_t *prefix, uint8_t *param );
  • lyra24p_inquire_command This function writes a desired inquire command, command value and enable/disable quote by using UART serial interface.
    err_t lyra24p_inquire_command ( lyra24p_t *ctx, uint8_t *command, uint8_t *cmd_val, uint8_t en_query );

Example Description

This example demonstrates the use of LYRA 24P Click board by processing the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs a factory reset. In the next step, the demo app requests the LYRA module name, software version, and MAC address and sets the local device name, sets the module into VSP mode and start advertising.

void application_init ( void )
{
log_cfg_t log_cfg;
lyra24p_cfg_t lyra24p_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
lyra24p_cfg_setup( &lyra24p_cfg );
LYRA24P_MAP_MIKROBUS( lyra24p_cfg, MIKROBUS_1 );
if ( UART_ERROR == lyra24p_init( &lyra24p, &lyra24p_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
lyra24p_hw_reset( &lyra24p );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
lyra24p_check_response( LYRA24P_RSP_OK );
Delay_ms ( 500 );
}

Application Task

Initializes the driver and performs a factory reset. In the next step, the demo app are requesting the LYRA module name, software version and MAC address and sets the local device name "LYRA 24P Click",
sets the module into VSP mode and start adverttising.

void application_task ( void )
{
if ( LYRA24P_OK == lyra24p_process( &lyra24p ) )
{
lyra24p_log_app_buf( );
lyra24p_clear_app_buf( );
Delay_ms ( 100 );
}
}

Note

We have used the BLE Scanner smartphone application for the test.

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.LYRA24P

Additional notes and informations

Depending on the development board you are using, you may need USB UART Click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.


LYRA24P_CMD_ATLVSP
#define LYRA24P_CMD_ATLVSP
Definition: lyra24p.h:195
LYRA24P_CMD_ATPS
#define LYRA24P_CMD_ATPS
Definition: lyra24p.h:74
LYRA24P_OK
@ LYRA24P_OK
Definition: lyra24p.h:343
lyra24p_cfg_setup
void lyra24p_cfg_setup(lyra24p_cfg_t *cfg)
LYRA 24P configuration object setup function.
lyra24p_write_cmd_param
err_t lyra24p_write_cmd_param(lyra24p_t *ctx, uint8_t *command, uint8_t *cmd_val, uint8_t *prefix, uint8_t *param)
LYRA 24P command - command value - prefix - parameter writing function.
lyra24p_inquire_command
err_t lyra24p_inquire_command(lyra24p_t *ctx, uint8_t *command, uint8_t *cmd_val, uint8_t en_query)
LYRA 24P inquire command function.
LYRA24P_ATS_ARG_DEVNAME_FORMAT
#define LYRA24P_ATS_ARG_DEVNAME_FORMAT
LYRA 24P ATS commands arguments.
Definition: lyra24p.h:215
lyra24p_write_command
err_t lyra24p_write_command(lyra24p_t *ctx, uint8_t *command)
LYRA 24P command writing function.
DEVICE_NAME
#define DEVICE_NAME
Definition: main.c:39
application_task
void application_task(void)
Definition: main.c:170
lyra24p_cfg_t
LYRA 24P Click configuration object.
Definition: lyra24p.h:317
LYRA24P_ATI_ARG_DEV_NAME
#define LYRA24P_ATI_ARG_DEV_NAME
LYRA 24P ATI commands arguments.
Definition: lyra24p.h:207
LYRA24P_CMD_AT
#define LYRA24P_CMD_AT
LYRA 24P parameter access commands.
Definition: lyra24p.h:73
lyra24p_hw_reset
void lyra24p_hw_reset(lyra24p_t *ctx)
LYRA 24P HW reset function.
LYRA24P_ATI_ARG_BT_ADDR
#define LYRA24P_ATI_ARG_BT_ADDR
Definition: lyra24p.h:209
LYRA24P_MAP_MIKROBUS
#define LYRA24P_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition: lyra24p.h:278
LYRA24P_PREFIX_SYMBOL_ZERO
#define LYRA24P_PREFIX_SYMBOL_ZERO
Definition: lyra24p.h:238
lyra24p_init
err_t lyra24p_init(lyra24p_t *ctx, lyra24p_cfg_t *cfg)
LYRA 24P initialization function.
LYRA24P_ATI_ARG_FW_VER
#define LYRA24P_ATI_ARG_FW_VER
Definition: lyra24p.h:208
LYRA24P_RSP_OK
#define LYRA24P_RSP_OK
LYRA 24P response arguments.
Definition: lyra24p.h:222
lyra24p_t
LYRA 24P Click context object.
Definition: lyra24p.h:294
LYRA24P_CMD_ATS
#define LYRA24P_CMD_ATS
Definition: lyra24p.h:78
LYRA24P_CMD_ATLADV
#define LYRA24P_CMD_ATLADV
Definition: lyra24p.h:128
application_init
void application_init(void)
Definition: main.c:88
LYRA24P_QUERY_EN
#define LYRA24P_QUERY_EN
Definition: lyra24p.h:252
LYRA24P_QUERY_DIS
#define LYRA24P_QUERY_DIS
LYRA 24P pin logic states.
Definition: lyra24p.h:251
lyra24p_set_device_name
err_t lyra24p_set_device_name(lyra24p_t *ctx, uint8_t *device_name)
LYRA 24P set device name function.
LYRA24P_CMD_ATI
#define LYRA24P_CMD_ATI
Definition: lyra24p.h:77
LYRA24P_ATS_VAL_DEVNAME
#define LYRA24P_ATS_VAL_DEVNAME
Definition: lyra24p.h:216
LYRA24P_PREFIX_SYMBOL_SET_VAL
#define LYRA24P_PREFIX_SYMBOL_SET_VAL
Definition: lyra24p.h:231