|
TLE92466ED Driver 2.0.0
API reference
|
PERIOD register bit definitions and helper functions. More...
Classes | |
| struct | PeriodConfig |
| Calculate PWM period register values from desired period in microseconds. More... | |
Functions | |
| PeriodConfig | CalculateFromPeriodUs (float period_us) noexcept |
| Calculate period configuration from desired period in microseconds. | |
| constexpr uint16_t | BuildRegisterValue (const PeriodConfig &config) noexcept |
| Build PERIOD register value from configuration. | |
Variables | |
| constexpr uint16_t | MANT_MASK = 0x00FF |
| Mantissa mask (bits 7:0) | |
| constexpr uint16_t | EXP_MASK = 0x0700 |
| Exponent mask (bits 10:8) | |
| constexpr uint16_t | EXP_SHIFT = 8 |
| Exponent shift. | |
| constexpr uint8_t | EXP_VALUE_MASK = 0x07 |
| Exponent value mask (3 bits: 0-7) | |
| constexpr uint16_t | LOW_FREQ_BIT = (1 << 11) |
| Low frequency range bit. | |
| constexpr uint16_t | PWM_CTRL_PARAM_SHIFT = 12 |
| constexpr uint16_t | PWM_CTRL_PARAM_MASK = 0xF000 |
| constexpr uint32_t | F_SYS_HZ = 28'000'000UL |
| System clock frequency (28 MHz) | |
| constexpr float | F_SYS_PERIOD_US = 1.0F / 28.0F |
| System clock period (≈35.71 ns) | |
| constexpr float | kSpecMinFrequency_Hz = 110.0F |
| Datasheet minimum f_PWM. | |
| constexpr float | kSpecMaxFrequency_Hz = 4000.0F |
| Datasheet maximum f_PWM. | |
| constexpr float | kSpecMinPeriod_us = 1.0e6F / kSpecMaxFrequency_Hz |
| 250 µs | |
| constexpr float | kSpecMaxPeriod_us = 1.0e6F / kSpecMinFrequency_Hz |
| 9090.9 µs | |
| constexpr float | kSpecLowRangeMinFreq_Hz = kSpecMinFrequency_Hz / 8.0F |
| 13.75 Hz | |
| constexpr float | kSpecLowRangeMaxFreq_Hz = kSpecMaxFrequency_Hz / 8.0F |
| 500 Hz | |
| constexpr float | kSpecLowRangeMinPeriod_us |
| 2000 µs | |
| constexpr float | kSpecLowRangeMaxPeriod_us |
| 72727 µs | |
| constexpr float | kSpecCombinedMinPeriod_us = kSpecMinPeriod_us |
| Combined min period across both ranges (250 µs). | |
| constexpr float | kSpecCombinedMaxPeriod_us = kSpecLowRangeMaxPeriod_us |
| Combined max period across both ranges (low-range 72.7 ms). | |
PERIOD register bit definitions and helper functions.
PWM period configuration for ICC mode.
* Bit 11 : LOW_FREQ - Low frequency range (8x multiplier) * Bits 10-8: PERIOD_EXP - Period exponent (0-7) * Bits 7-0 : PERIOD_MANT - Period mantissa (0-255) *
Formulas:
|
constexprnoexcept |
Build PERIOD register value from configuration.
| config | Period configuration |
|
inlinenoexcept |
Calculate period configuration from desired period in microseconds.
| period_us | Desired PWM period in microseconds |
|
constexpr |
Exponent mask (bits 10:8)
|
constexpr |
Exponent shift.
|
constexpr |
Exponent value mask (3 bits: 0-7)
|
constexpr |
System clock frequency (28 MHz)
|
constexpr |
System clock period (≈35.71 ns)
|
constexpr |
Combined max period across both ranges (low-range 72.7 ms).
|
constexpr |
Combined min period across both ranges (250 µs).
|
constexpr |
500 Hz
|
constexpr |
72727 µs
|
constexpr |
13.75 Hz
|
constexpr |
2000 µs
|
constexpr |
Datasheet maximum f_PWM.
|
constexpr |
9090.9 µs
|
constexpr |
Datasheet minimum f_PWM.
|
constexpr |
250 µs
|
constexpr |
Low frequency range bit.
|
constexpr |
Mantissa mask (bits 7:0)
|
constexpr |
|
constexpr |
PWM controller proportional gain lives in bits [15:12] of PERIOD per datasheet \u00a75.3.3.3. 4-bit KI value.