I'm trying to measure the duty-cycle of the 0-5V electrical PWM signal I have generated from the any source. How can I do this? Anyone can help me?
- IDE: Keil
- Microcontroller: STM32F103C8T6
I'm trying to measure the duty-cycle of the 0-5V electrical PWM signal I have generated from the any source. How can I do this? Anyone can help me?
The process is described in detail in the Reference Manual, look for PWM input mode.
Don't forget to check the input pin in the pin definitions table of the Datasheet. If it's not marked as 5 Volt Tolerant (FT
in the I/O Level column), then place a suitable voltage divider between the signal source and the input pin.