hi,
i want to measure pulse width from 1hz using STM32. would it be possible to use PreScaler. so please provide me some example or link for measuring pulse.
thanks in advance.
The STM32 provides for a PWM Input Capture mode, depending on the model and TIM used, you might need to prescale TIMCLK to get a 16-bit TIM to span 1+ seconds.
The PWM Input Capture pairs two channels (CH1, CH2), and a reset, to provide a tick count for the period and duty of the input signal.
For long duration, and fine granularity of the measurement, consider an STM32 with a 32-bit TIM.
The HAL and SPL should have examples of this mode of operation, for one or more boards within a given part family.