|
TLE92466ED Driver 2.0.0
API reference
|
Dither configuration helper functions. More...
Classes | |
| struct | DitherConfig |
| Dither configuration structure. More... | |
Functions | |
| DitherConfig | CalculateFromAmplitudeFrequency (float amplitude_ma, float frequency_hz, bool parallel_mode=false, float t_ref_clk_us=DEFAULT_T_REF_CLK_US) noexcept |
| Calculate dither configuration from amplitude and frequency. | |
Variables | |
| constexpr float | F_SYS_HZ = 28'000'000.0F |
| System clock frequency (28 MHz) | |
| constexpr float | DEFAULT_T_REF_CLK_US = 1.0F / 28.0F |
| tref_clk at MANT=1, EXP=0 (≈35.71 ns) | |
Dither configuration helper functions.
Provides high-level functions to calculate dither parameters from user-friendly values.
Formulas:
Where t_ref_clk is set by the per-channel DITHER_CLK_DIV register (see DITHER_CLK_DIV namespace above). The chip's POR default of DITHER_CLK_DIV = 0x0000 makes t_ref_clk = 0, so any channel that needs feedback values populated MUST have DITHER_CLK_DIV programmed to a non-zero MANT/EXP combination first.
|
inlinenoexcept |
Calculate dither configuration from amplitude and frequency.
| amplitude_ma | Desired dither amplitude in milliamperes |
| frequency_hz | Desired dither frequency in Hz |
| parallel_mode | true if channel is in parallel mode |
| t_ref_clk_us | Reference clock period in microseconds (default: 0.125 µs) |
Automatically calculates step_size, num_steps, and flat_steps to achieve the desired amplitude and frequency. Uses reasonable defaults for steps and flat period if not specified.
|
constexpr |
tref_clk at MANT=1, EXP=0 (≈35.71 ns)
|
constexpr |
System clock frequency (28 MHz)