2021-01-14 03:05 PM
I have an application where I am using an external signal to trigger TIM8_CH1 to do a capture and generate a DMA interrupt where I then store the counter value. I want to perform a similar action on an internal firmware (FW) signal. I want to store the TIM8 count value to a memory location when a FW event occurs.
Is there a way to trigger TIM8 to perform a count capture based on a FW trigger?
I'm using a STM32G431.
Solved! Go to Solution.
2021-01-14 03:24 PM
2021-01-14 03:21 PM
The IC mode is limited to those described in the reference manual, generally when a pin changes value. What "firmware signal" are you trying to use? A variable changing value? If so, no.
2021-01-14 03:24 PM
Maybe setting TIMx_EGR.CCxG is what you'r looking for?
JW
2021-01-14 04:22 PM
I'll give this a try. Basically I have a firmware signal than is a sinusoid frequency of about 200Hz that is updated every PWM period (about 33usec). After filtering this sinusoid I want to detect when it has a zero crossing. This decision will be done in the high-frequency interrupt and when a crossing is detected I want to trigger the counter capture. I'll report back what I find,
Thanks,
Brian