Other Parts Discussed in Thread: EK-TM4C1294XL
Hey,
I am new to the TM4C123GH6PGE series. I like to monitor the speed of a fan. This fan provides a "tacho" signal, that generates 2 pulses for one rotation. My idea is to count the impulses in a time interval of 1 second.
After checking the datasheet I am thinking, that it is possible to use the PWM peripheral to do that job for me.
I was looking for some example code, but I didn't found some. So I am asking here for some help.
my fan is driven via PH5 -> M0PWM5 (currently I just use a GPIO output and set it to 1 = max speed)
the fan tacho signal comes back via PH6 -> M0PWM6
How do I need to setup my pins and the pwm0 peripheral to count the impulses for a certain amount of time?
How do I should use the fault, generator1, generator2, ..., generator3 ISR?
Any ideas or references to code snipes?
Stefan