STM32G474xx HAL 用户手册
函数
斩波模式配置
HRTIM 导出函数

函数

__STATIC_INLINE void LL_HRTIM_CHP_Config (const HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Configuration)
 为给定的定时器配置斩波级。
__STATIC_INLINE void LL_HRTIM_CHP_SetPrescaler (const HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Prescaler)
 设置预分频器,用于确定在启用斩波模式时叠加在定时器输出信号上的载波频率。
__STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPrescaler (const HRTIM_TypeDef *HRTIMx, uint32_t Timer)
 获取实际的斩波级预分频器值。
__STATIC_INLINE void LL_HRTIM_CHP_SetDutyCycle (const HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t DutyCycle)
 设置斩波占空比。
__STATIC_INLINE uint32_t LL_HRTIM_CHP_GetDutyCycle (const HRTIM_TypeDef *HRTIMx, uint32_t Timer)
 获取实际的斩波占空比。
__STATIC_INLINE void LL_HRTIM_CHP_SetPulseWidth (const HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t PulseWidth)
 设置起始脉冲宽度。
__STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPulseWidth (const HRTIM_TypeDef *HRTIMx, uint32_t Timer)
 获取实际的起始脉冲宽度。

函数文档

__STATIC_INLINE void LL_HRTIM_CHP_Config ( const HRTIM_TypeDef *  HRTIMx,
uint32_t  Timer,
uint32_t  Configuration 
)

为给定的定时器配置斩波级。

参考手册到 LL API 交叉引用:
CHPxR CARFRQ LL_HRTIM_CHP_Config
CHPxR CARDTY LL_HRTIM_CHP_Config
CHPxR STRTPW LL_HRTIM_CHP_Config
注意:
如果某个定时器输出的斩波模式已经启用,则不得调用此函数。
参数:
HRTIMx高分辨率定时器实例
Timer此参数可以是以下值之一:
Configuration此参数必须是以下所有值的组合:
返回值:
None

定义位于文件 stm32g4xx_ll_hrtim.h7655 行。

__STATIC_INLINE uint32_t LL_HRTIM_CHP_GetDutyCycle ( const HRTIM_TypeDef *  HRTIMx,
uint32_t  Timer 
)

获取实际的斩波占空比。

参考手册到 LL API 交叉引用:
CHPxR CARDTY LL_HRTIM_CHP_GetDutyCycle
参数:
HRTIMx高分辨率定时器实例
Timer此参数可以是以下值之一:
返回值:
DutyCycle此参数可以是以下值之一:

定义位于文件 stm32g4xx_ll_hrtim.h7795 行。

__STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPrescaler ( const HRTIM_TypeDef *  HRTIMx,
uint32_t  Timer 
)
__STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPulseWidth ( const HRTIM_TypeDef *  HRTIMx,
uint32_t