| Digital Power Starter Kit 3 Firmware dsPIC33C Boost Converter Voltage Mode Control Example |

Boost Converter
Hardware Abstraction Layer » Phase Current Feedback » Conversion Macros

Conversion macros for user-declarations of phase current feedback parameters of the boost converter. More...

Collaboration diagram for Boost Converter:

#define | BOOST_ISNS_MIN (uint16_t)(int16_t)(((BOOST_ISNS_MINIMUM-BOOST_ISNS_FEEDBACK_OFFSET) * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)
| Conversion macros of phase current feedback parameters. More...
#define | BOOST_ISNS_OCL (uint16_t)(((BOOST_ISNS_MAXIMUM-BOOST_ISNS_FEEDBACK_OFFSET) * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)
| Over Current Limit. More...
#define | BOOST_ISNS_OCL_RELEASE (uint16_t)(((BOOST_ISNS_RELEASE-BOOST_ISNS_FEEDBACK_OFFSET) * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)
| Over Current Release Level. More...
#define | BOOST_ISNS_REF (uint16_t)((BOOST_ISNS_REFERENCE * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)
| Output Current Reference. More...
#define | BOOST_ISNS_REF_STARTUP (uint16_t)((BOOST_ISNS_REFERENCE_STARTUP * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)
| Output Current Startup Reference. More...
#define | BOOST_ISNS_FB_OFFSET (uint16_t)(BOOST_ISNS_FEEDBACK_OFFSET / ADC_GRANULARITY)
#define | BOOST_ISNS_ADC_TRGDLY (uint16_t)(BOOST_ISNS_ADC_TRG_DELAY / PWM_CLOCK_PERIOD)
#define | BOOST_ISNS_NORM_INV_G (float)(1.0/BOOST_ISNS_FEEDBACK_GAIN)
| Inverted feedback gain required for value normalization. More...
#define | BOOST_ISNS_NORM_SCALER (int16_t)(ceil(log(BOOST_ISNS_NORM_INV_G)/log(2)))
| ISNS normalization. More...
#define | BOOST_ISNS_NORM_FACTOR (int16_t)((BOOST_ISNS_NORM_INV_G / pow(2.0, BOOST_ISNS_NORM_SCALER)) * (pow(2.0, 15)-1))
| ISNS normalization factor scaled in Q15. More...

## Detailed Description

Conversion macros for user-declarations of phase current feedback parameters of the boost converter.

## Macro Definition Documentation

## ◆ BOOST_ISNS_ADC_TRGDLY

#define BOOST_ISNS_ADC_TRGDLY (uint16_t)(BOOST_ISNS_ADC_TRG_DELAY / PWM_CLOCK_PERIOD)

Definition at line 1239 of file dpsk3_hwdescr.h.

## ◆ BOOST_ISNS_FB_OFFSET

#define BOOST_ISNS_FB_OFFSET (uint16_t)(BOOST_ISNS_FEEDBACK_OFFSET / ADC_GRANULARITY)

Definition at line 1238 of file dpsk3_hwdescr.h.

## ◆ BOOST_ISNS_MIN

#define BOOST_ISNS_MIN (uint16_t)(int16_t)(((BOOST_ISNS_MINIMUM-BOOST_ISNS_FEEDBACK_OFFSET) * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)

Conversion macros of phase current feedback parameters.

These conversion macros are used to convert user settings defined as physical quantities into binary (integer) numbers, which will be written to registers and variables and used in calculations throughout the firmware.Over Current Limit

Definition at line 1233 of file dpsk3_hwdescr.h.

## ◆ BOOST_ISNS_NORM_FACTOR

#define BOOST_ISNS_NORM_FACTOR (int16_t)((BOOST_ISNS_NORM_INV_G / pow(2.0, BOOST_ISNS_NORM_SCALER)) * (pow(2.0, 15)-1))

ISNS normalization factor scaled in Q15.

Definition at line 1243 of file dpsk3_hwdescr.h.

## ◆ BOOST_ISNS_NORM_INV_G

#define BOOST_ISNS_NORM_INV_G (float)(1.0/BOOST_ISNS_FEEDBACK_GAIN)

Inverted feedback gain required for value normalization.

Definition at line 1241 of file dpsk3_hwdescr.h.

## ◆ BOOST_ISNS_NORM_SCALER

#define BOOST_ISNS_NORM_SCALER (int16_t)(ceil(log(BOOST_ISNS_NORM_INV_G)/log(2)))

ISNS normalization.

Definition at line 1242 of file dpsk3_hwdescr.h.

## ◆ BOOST_ISNS_OCL

#define BOOST_ISNS_OCL (uint16_t)(((BOOST_ISNS_MAXIMUM-BOOST_ISNS_FEEDBACK_OFFSET) * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)

Over Current Limit.

Definition at line 1234 of file dpsk3_hwdescr.h.

## ◆ BOOST_ISNS_OCL_RELEASE

#define BOOST_ISNS_OCL_RELEASE (uint16_t)(((BOOST_ISNS_RELEASE-BOOST_ISNS_FEEDBACK_OFFSET) * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)

Over Current Release Level.

Definition at line 1235 of file dpsk3_hwdescr.h.

## ◆ BOOST_ISNS_REF

#define BOOST_ISNS_REF (uint16_t)((BOOST_ISNS_REFERENCE * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)

Output Current Reference.

Definition at line 1236 of file dpsk3_hwdescr.h.

## ◆ BOOST_ISNS_REF_STARTUP

#define BOOST_ISNS_REF_STARTUP (uint16_t)((BOOST_ISNS_REFERENCE_STARTUP * BOOST_ISNS_FEEDBACK_GAIN) / ADC_GRANULARITY)

Output Current Startup Reference.

Definition at line 1237 of file dpsk3_hwdescr.h.