Is this the most recent code with the "rpm too high for at least 100ms" requirement? If it is, then I have a different idea. The rpm is probably going from around 100 to over 3000 probably instantly. It may even be the higher bits that are just plain impossible. Like it might go from 0b0000000011111111 (255 rpm) to 0b1000000011111111. Some noise in the high bits. Those high bits are irrelevant, since the rpm will never be something ridiculous like 50000. So, I can make sure the high bits are always set to zero before checking that the rpm is too high. Or if any one of those bits is 1, then you can know the poor thing is out to lunch again, and have it disabled.
Also, the rpm is being checked at around 1kHz, so you shouldn't see an increase in rpm from one read to the next of more than say 100. I could just ignore the fault if the change in rpm is too big?
Last edited by MPaulHolmes; 03-04-2011 at 09:08 PM..
|