HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
|
Extensions for TIM peripherals. More...
#include "sarmfsw.h"
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 | set_TIM_Interrupts (TIM_HandleTypeDef *const pTim, const bool on) |
Start TIM module interrupts. | |
HAL_StatusTypeDef | deinit_TIM_Base (TIM_HandleTypeDef *const pTim) |
De-Init TIM base module (stop interruptions) | |
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.
|
inline |
De-Init TIM base module (stop interruptions)
[in,out] | pTim | - pointer to TIM instance |
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.
[in,out] | pTim | - pointer to TIM instance |
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 |
|
inline |
Start TIM module interrupts.
[in,out] | pTim | - pointer to TIM instance |
[in] | on | - Time Interrupts 0: off, 1: on |
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 |