2025-11-12 4:59 AM - edited 2025-11-12 5:05 AM
Hi,
I want to count the time that an incoming level signal is high for.
To achieve this I setup Timer 15 as a Gated Mode Slave, which has it's counter counting while the trigger input is high. The trigger input is the Filtered Timer 15 Channel 1. For some reason when I connect my signal to my input Timer. Nothing Happens. The signal on the IO Pin TIM 15 CH1 is a 2V square Wave.
My own software seems correct. I then moved to Hal to see if I can achieve it.
I've tried to use HAL to achieve this without any luck here is my HAL software.
Uploaded is the main and IOC file
I am working on the STM32G071
Thanks
Solved! Go to Solution.
2025-11-12 9:12 PM
Solving my own problem:
The issue is that I was using the Timer in One Pulse Mode.
This is incorrect, without setting the Timer in One Pulse Mode, everything works as expected and the Timer accurately clocks while the trigger input is high
2025-11-12 9:12 PM
Solving my own problem:
The issue is that I was using the Timer in One Pulse Mode.
This is incorrect, without setting the Timer in One Pulse Mode, everything works as expected and the Timer accurately clocks while the trigger input is high