efuse2 2.0.0.0
main.c File Reference

eFuse2 Click example More...

#include "board.h"
#include "log.h"
#include "efuse2.h"

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

float op_current
 
float op_voltage
 
float min_voltage
 
float max_voltage
 

Detailed Description

eFuse2 Click example

Description

This is an example that demonstrate the use of the eFuse 2 click board.

The demo application is composed of two sections :

Application Init

Initialization driver enables - I2C, AD5175: enable write, set the normal operating mode and operating current to the 1,2 A; AD5241: set operating voltage to the 12,0 V; display diagnostic states.

Application Task

eFuse 2 click board uses USB UART log to display operating voltage, OVLO, UVLO and current limit condition. This firmware provides the functions to set the operating voltage and current limiting conditions in order to provide the threshold of the fault conditions. When one of the fault conditions is met, the microcontroller is notified via INT pin which is checked by the app to initiate a shutdown mode. All data logs write on USB UART changes every 2000 milliseconds.

Author
Stefan Ilic

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< 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 LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )

Variable Documentation

◆ max_voltage

float max_voltage

◆ min_voltage

float min_voltage

◆ op_current

float op_current

◆ op_voltage

float op_voltage