precision-converters-firmware
Loading...
Searching...
No Matches
Functions
stm32_pwm_ex.h File Reference

Extended support for STM32 PWM peripheral. More...

#include "stm32_pwm.h"
Include dependency graph for stm32_pwm_ex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int32_t compute_optimal_prescaler (struct stm32_pwm_desc *desc, uint64_t period_ns, uint32_t *prescaler)
 Calculate optimal prescaler value to fit the period in ARR register.
 

Detailed Description

Extended support for STM32 PWM peripheral.

Copyright (c) 2026 Analog Devices, Inc. All rights reserved.

This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Function Documentation

◆ compute_optimal_prescaler()

int32_t compute_optimal_prescaler ( struct stm32_pwm_desc *  desc,
uint64_t  period_ns,
uint32_t *  opt_prescaler 
)

Calculate optimal prescaler value to fit the period in ARR register.

Parameters
desc[in]- STM32 PWM descriptor.
period_ns[in]- Period to be set.
Returns
Prescaler value
Here is the caller graph for this function: