eFuse 7 Click
eFuse 7 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.
Click Library
- Author : Stefan Ilic
- Date : May 2023.
- Type : GPIO type
Software Support
Example Description
This library contains API for the eFuse 7 Click driver. This driver provides the functions to set the current limiting conditions in order to provide the threshold of the fault conditions.
Example Libraries
- MikroSDK.Board
- MikroSDK.Log
- Click.eFuse7
Example Key Functions
- efuse7_cfg_setup Config Object Initialization function.
void efuse7_cfg_setup(efuse7_cfg_t *cfg)
eFuse 7 configuration object setup function.
eFuse 7 Click configuration object.
Definition efuse7.h:143
- efuse7_init Initialization function.
err_t efuse7_init(efuse7_t *ctx, efuse7_cfg_t *cfg)
eFuse 7 initialization function.
eFuse 7 Click context object.
Definition efuse7.h:129
- efuse7_default_cfg Click Default Configuration function.
err_t efuse7_default_cfg(efuse7_t *ctx)
eFuse 7 default configuration function.
- efuse7_enable_output eFuse 7 output enable function.
void efuse7_enable_output(efuse7_t *ctx)
eFuse 7 output enable function.
- efuse7_wiper_inc eFuse 7 wiper position increase function.
void efuse7_wiper_inc(efuse7_t *ctx, uint8_t inc_num)
eFuse 7 wiper position increase function.
- efuse7_set_limit eFuse 7 set current limit function.
err_t efuse7_set_limit(efuse7_t *ctx, uint8_t set_current)
eFuse 7 set current limit function.
Application Init
Initialization of Click module and UART log, then performing default configuration and setting a current limit to 1A.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
if ( DIGITAL_OUT_UNSUPPORTED_PIN ==
efuse7_init( &efuse7, &efuse7_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
display_selection( );
Delay_ms ( 100 );
}
@ EFUSE7_ERROR
Definition efuse7.h:158
#define EFUSE7_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition efuse7.h:115
void application_init(void)
Definition main.c:61
Application Task
This example demonstrates the use of the eFuse 7 Click board. Reading user's input from UART Terminal and using it as an index for an array of pre-calculated values that define the current limit level. Results are being sent to the UART Terminal, where you can track their changes.
{
static char index;
if ( 1 == log_read( &logger, &index, 1 ) )
{
if ( ( index >= '0' ) && ( index <= '7' ) )
{
log_printf( &logger, " >>> Selected mode %c \r\n", index );
log_printf( &logger, "---------------------------\r\n" );
Delay_ms ( 100 );
}
else
{
log_printf( &logger, " Data not in range! \r\n" );
log_printf( &logger, "---------------------------\r\n" );
display_selection( );
Delay_ms ( 100 );
}
}
}
void application_task(void)
Definition main.c:99
const uint8_t limit_value_op[8]
Definition main.c:33
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.
Additional Notes and Information
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.