HAL + 0/8 examples
CodeScope will show references to __LL_TIM_CALC_ARR from the following samples and libraries:
 
Symbols
loading...
Files
loading...

__LL_TIM_CALC_ARR macro

HELPER macro calculating the auto-reload value to achieve the required output signal frequency.

Syntax

#define __LL_TIM_CALC_ARR(__TIMCLK__, __PSC__, __FREQ__) \     ((((__TIMCLK__)/((__PSC__) + 1U)) >= (__FREQ__)) ? (((__TIMCLK__)/((__FREQ__) * ((__PSC__) + 1U))) - 1U) : 0U)

Arguments

__TIMCLK__

timer input clock frequency (in Hz)

__PSC__

prescaler

__FREQ__

output signal frequency (in Hz)

Return value

Auto-reload value (between Min_Data=0 and Max_Data=65535)

Notes

ex: __LL_TIM_CALC_ARR (1000000, LL_TIM_GetPrescaler (), 10000);

Examples

__LL_TIM_CALC_ARR is referenced by 8 libraries and example projects.

References

LocationText
stm32f4xx_ll_tim.h:1054
#define __LL_TIM_CALC_ARR(__TIMCLK__, __PSC__, __FREQ__) \