This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADC10 + Comparator_A+ causes CAIFG

Hello,


Having issues with the MSP430G25955: when both ADC10 and Comparator_A+ are enabled and configured for the same analog input, triggering a conversion in the ADC sets the CAIFG. Can you explain this phenomenon?

Thanks

  • Does the analog input have a high source impedance? When the ADC is converting, there's an additional load on the source to charge the sample/hold caps (see Sample Timing Considerations in the ADC12 chapter of the 2xx guide). Basically as soon as it starts sampling, the load sees another ~2k ohm to ground (since the sample/hold cap starts off uncharged), so the input that the Comparator_A+ is seeing might drop as the sample/hold cap is charging.
  • When you say "the same analog input", do you mean the same MCU pin rather than the same input connected to two pins?

    If so, I wouldn't be surprised if the ADC turned off the comparator's analog switch during sampling. Granted, the datasheet port diagrams suggest that the switches are independent and there's no sign of any override from the ADC to the comparator's switch. On the other hand, the pin function table only specifies what happens when ADC or comparator function is enabled, not both.

    You can confirm or disprove this by connecting the input to two separate pins, one for the ADC and another for the comparator. If the behaviour stays the same then look into Patrick's suggestion.

**Attention** This is a public forum