I'm using an MSP430F5342 to generate a square wave using Timer-A. I would like to monitor a DC voltage and shut off the square wave from the timer when the voltage exceeds a certain level. It seems as if this could be done using Comparator_B since it is tied into the Timer_A system. However, I've been yet unable to determine if this can be done by going through the datasheet and user's guide.
Note: I need this to happen in hardware because the system can't handle a software delay between detecting the DC voltage level, and shutting off the square wave. For example, I can not monitor the DC voltage by reading an ADC, then turn off the timer using software. This is too slow. Another example would be generating an interrupt from the comparator that shuts down the timer. I believe this is still too slow. I am currently performing this function in hardware with external components (comparator and AND gate) and would like to eliminate these parts and pull the function into the MSP430.
Does anyone know if this can be done, and perhaps can provide an outline of how? Thanks.