HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
|
Extensions for TIM peripherals. More...
Macros | |
#define | TIM_MIN_GRANULARITY 255 |
Functions | |
uint32_t | RCC_TIMCLKFreq (const TIM_HandleTypeDef *const pTim) |
Get TIM peripheral clock frequency. | |
HAL_StatusTypeDef | write_TIM_Preload (TIM_HandleTypeDef *const pTim, const uint32_t chan) |
Write preload bit in TIM module for desired channel. | |
HAL_StatusTypeDef | write_TIM_CCR (const TIM_HandleTypeDef *const pTim, const uint32_t chan, const uint32_t CCR_val) |
Low level TIM module CCR write. | |
HAL_StatusTypeDef | init_TIM_Base (TIM_HandleTypeDef *const pTim, const uint32_t freq) |
Init TIM module and start interruptions. | |
HAL_StatusTypeDef | set_TIM_Freq (TIM_HandleTypeDef *const pTim, const uint32_t freq) |
Set TIM module frequency. | |
HAL_StatusTypeDef | set_TIM_Tick_Freq (TIM_HandleTypeDef *const pTim, const uint32_t freq) |
Set TIM module tick frequency. | |
Extensions for TIM peripherals.
#define TIM_MIN_GRANULARITY 255 |
Minimum granularity for TIM channel
HAL_StatusTypeDef init_TIM_Base | ( | TIM_HandleTypeDef *const | pTim, |
const uint32_t | freq ) |
Init TIM module and start interruptions.
[in,out] | pTim | - pointer to TIM instance |
[in] | freq | - Desired TIM frequency |
uint32_t RCC_TIMCLKFreq | ( | const TIM_HandleTypeDef *const | pTim | ) |
Get TIM peripheral clock frequency.
HAL_StatusTypeDef set_TIM_Freq | ( | TIM_HandleTypeDef *const | pTim, |
const uint32_t | freq ) |
Set TIM module frequency.
[in,out] | pTim | - pointer to TIM instance for Frequency computation |
[in] | freq | - Desired TIM frequency |
HAL_StatusTypeDef set_TIM_Tick_Freq | ( | TIM_HandleTypeDef *const | pTim, |
const uint32_t | freq ) |
Set TIM module tick frequency.
[in,out] | pTim | - pointer to TIM instance for Frequency computation |
[in] | freq | - Desired TIM tick frequency |
HAL_StatusTypeDef write_TIM_CCR | ( | const TIM_HandleTypeDef *const | pTim, |
const uint32_t | chan, | ||
const uint32_t | CCR_val ) |
Low level TIM module CCR write.
[in,out] | pTim | - pointer to TIM instance for PWM generation |
[in] | chan | - Channel to write |
[in] | CCR_val | - CCR value |
HAL_StatusTypeDef write_TIM_Preload | ( | TIM_HandleTypeDef *const | pTim, |
const uint32_t | chan ) |
Write preload bit in TIM module for desired channel.
[in,out] | pTim | - pointer to TIM instance |
[in] | chan | - Channel to write |