solidswitch6  2.1.0.0
Main Page

SolidSwitch 6 click

SolidSwitch 6 Click is a compact add-on board for reliable load management in automotive power distribution systems. This board features the VNF1048F, a high-side switch controller with intelligent e-fuse protection from STMicroelectronics. This board supports an input voltage range of 6V to 48V, controls external MOSFET, and offers essential protection features such as overcurrent, under-voltage, and thermal shutdown, with diagnostic feedback via SPI. It also includes an NTC resistor for monitoring MOSFET temperature and operates with either 3.3V or 5V logic levels.

click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Feb 2024.
  • Type : SPI type

Software Support

We provide a library for the SolidSwitch 6 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 SolidSwitch 6 Click driver.

Standard key functions :

Example key functions :

Example Description

This library contains API for the SolidSwitch 6 Click driver and demonstrate uses of the high-side switch controller with intelligent fuse protection.

The demo application is composed of two sections :

Application Init

The initialization of the SPI module and log UART. After driver initialization, the app sets the default configuration.

void application_init ( void )
{
log_cfg_t log_cfg;
solidswitch6_cfg_t solidswitch6_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
solidswitch6_cfg_setup( &solidswitch6_cfg );
SOLIDSWITCH6_MAP_MIKROBUS( solidswitch6_cfg, MIKROBUS_1 );
if ( SPI_MASTER_ERROR == solidswitch6_init( &solidswitch6, &solidswitch6_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( SOLIDSWITCH6_ERROR == solidswitch6_default_cfg ( &solidswitch6 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
log_printf( &logger, " ______________________\r\n" );
Delay_ms ( 100 );
}

Application Task

The demo application reads and displays the device temperature and voltage level of the current sense amplifier, NTC, and output voltage measurement. Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void )
{
float app_buf = 0;
if ( SOLIDSWITCH6_OK == solidswitch6_get_device_temp( &solidswitch6, &app_buf ) )
{
log_printf( &logger, " Temperature: %.2f [degC]\r\n", app_buf );
Delay_ms ( 100 );
}
if ( SOLIDSWITCH6_OK == solidswitch6_get_vntc( &solidswitch6, &app_buf ) )
{
log_printf( &logger, " NTC: %.2f V\r\n", app_buf );
Delay_ms ( 100 );
}
if ( SOLIDSWITCH6_OK == solidswitch6_get_vout( &solidswitch6, &app_buf ) )
{
log_printf( &logger, " Vout: %.2f V\r\n", app_buf );
Delay_ms ( 100 );
}
if ( SOLIDSWITCH6_OK == solidswitch6_get_vds( &solidswitch6, &app_buf ) )
{
log_printf( &logger, " VDS: %.2f V\r\n", app_buf );
Delay_ms ( 100 );
}
log_printf( &logger, " ______________________\r\n" );
Delay_ms ( 1000 );
}

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.SolidSwitch6

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.


solidswitch6_default_cfg
err_t solidswitch6_default_cfg(solidswitch6_t *ctx)
SolidSwitch 6 default configuration function.
solidswitch6_get_vds
err_t solidswitch6_get_vds(solidswitch6_t *ctx, float *vds)
SolidSwitch 6 get VDS function.
SOLIDSWITCH6_MAP_MIKROBUS
#define SOLIDSWITCH6_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition: solidswitch6.h:313
solidswitch6_cfg_t
SolidSwitch 6 Click configuration object.
Definition: solidswitch6.h:351
application_task
void application_task(void)
Definition: main.c:69
solidswitch6_cfg_setup
void solidswitch6_cfg_setup(solidswitch6_cfg_t *cfg)
SolidSwitch 6 configuration object setup function.
SOLIDSWITCH6_ERROR
@ SOLIDSWITCH6_ERROR
Definition: solidswitch6.h:421
solidswitch6_get_device_temp
err_t solidswitch6_get_device_temp(solidswitch6_t *ctx, float *tj)
SolidSwitch 6 get device temperature function.
SOLIDSWITCH6_OK
@ SOLIDSWITCH6_OK
Definition: solidswitch6.h:420
application_init
void application_init(void)
Definition: main.c:31
solidswitch6_get_vntc
err_t solidswitch6_get_vntc(solidswitch6_t *ctx, float *vntc)
SolidSwitch 6 get Vntc function.
solidswitch6_t
SolidSwitch 6 Click context object.
Definition: solidswitch6.h:329
solidswitch6_ctrl_t
SolidSwitch 6 Click control object.
Definition: solidswitch6.h:394
solidswitch6_init
err_t solidswitch6_init(solidswitch6_t *ctx, solidswitch6_cfg_t *cfg)
SolidSwitch 6 initialization function.
solidswitch6_get_vout
err_t solidswitch6_get_vout(solidswitch6_t *ctx, float *vout)
SolidSwitch 6 get Vout function.
solidswitch6_set_control
err_t solidswitch6_set_control(solidswitch6_t *ctx, solidswitch6_ctrl_t ctrl)
SolidSwitch 6 set control function.