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.

Msp430f5529 ... ADC12MEM0 updates

The ADC is set for a "repeat-single-channel" mode.  Will "ADC12MEM0" update while in the ISR? ... can the code be structured to loop until ADC12MEM0 changes?

  • 460822 said:
    Will "ADC12MEM0" update while in the ISR?

    Yes. Whenever a conversion is finished, the result is moved into ADC10MEM by hardware, independently of CPU operation.

    However, if another conversion is done while you didn't handle the result of the last, then there's something significantly wrong with your design.

    460822 said:
    can the code be structured to loop until ADC12MEM0 changes

    it can, bu tthis would violate every microcontrolelr design rule. To act when things are due is the reason why someone has invented interrupts.

    However, you won't wait for ADC10MEM to change (what if it doesn't change because the input voltag edidn't change?). You wait ADC10IFG being set, indicating that a conversion was done abd ADC10MEM contains a new result.

    Altrernatively, use the (DMA-like) data transfer unit (or use a DMA on the 5x devices) to move a result form ADC10MEM the moment it appears and trigger an interrupt when a number of transfers is done.

  • Thanks.  The second question was to clarify the first question.

**Attention** This is a public forum