Motor Driver Evaluation Kit NEVB-MTR1-t01-1.0.0
Firmware for NEVB-MTR1-KIT1 for trapezoidal control of BLDC motors using Hall-effect sensors
|
These defines are derived from the user settable defines. More...
Macros | |
#define | TIM4_PRESCALER_DIV_PATTERN(tim4Prescaler) |
Timer 4 clock select bits based on pre-scaler value. | |
#define | TIM4_TOP(tim4Freq) |
#define | TIM4_TOP_MAX 0x03ff |
Maximum top value for Timer 4. | |
#define | DT_PRESCALER_DIV_PATTERN(dtPrescaler) |
Deadtime generator pre-scaler selection bits based on pre-scaler value. | |
#define | DEAD_TIME_HALF(deadTime) |
This value specifies half the dead time in number of clock cycles. Divide by frequency to get duration. | |
#define | TIM3_TOP (((F_CPU / TIM3_FREQ / 3) >> 4) - 1) |
Calculated top value for Timer 3. | |
#define | TIM3_TOP_MAX 0xffff |
Maximum top value for Timer 3. | |
These defines are derived from the user settable defines.
#define DEAD_TIME_HALF | ( | deadTime | ) |
This value specifies half the dead time in number of clock cycles. Divide by frequency to get duration.
#define DT_PRESCALER_DIV_PATTERN | ( | dtPrescaler | ) |
Deadtime generator pre-scaler selection bits based on pre-scaler value.
This macro generates the deadtime generator pre-scaler selection bits pattern based on the chosen pre-scaler value.
Definition at line 1162 of file config.h.
#define TIM3_TOP (((F_CPU / TIM3_FREQ / 3) >> 4) - 1) |
#define TIM3_TOP_MAX 0xffff |
#define TIM4_PRESCALER_DIV_PATTERN | ( | tim4Prescaler | ) |
Timer 4 clock select bits based on pre-scaler value.
This macro generates the timer 4 clock select bits pattern based on the chosen pre-scaler value. It is used to configure the timer's clock division.
Definition at line 1144 of file config.h.
#define TIM4_TOP | ( | tim4Freq | ) |
Calculate top value for Timer 4. Formula: TIM4_TOP = (F_HST / (TIM4_FREQ * TIM4_PRESCALER * 2)).