SLAAEU3 June 2025 MSPM0C1104
The TACH signal is generated from the fan module and captured by the timers in the MSPM0. The timer capture the period of the pules and can be read from the register starting at 0x30. Two registers here show one capture value. For example 0x30 is the MSB of FAN1 and 0x31 is the LSB of FAN1. The valid bits for capture values are 16 bits. In this demo code, the capture timer frequency is configured as 8192Hz. Calculate the RPM with the capture value with Equation 1.
Ncap is the capture value.
Np: generated pulses turn a cycle.
Calcuate Tp as shown in Equation 2