Other Parts Discussed in Thread: CC430F5137
I've been recently having a problem where randomly the ADC routines in my code appears to stop working and hangs up. After messing around with the code I have come up with a theory as to what maybe going wrong, however I was wondering if I could clarify a key point of the theory.
I am running the ADC in "Sequence-of-channels" where it samples 2 channels then interrupts. The first thing that then gets done inside the interrupt (ADC12IFG1) is the line:
ADC12CTL0 |= (ADC12ENC | ADC12SC);
after that I do a few checks and then read the values from ADC12MEM0 and ADC12MEM1.
My theory is that the reading of the conversion values, while the ADC is busy may cause a problem. Is this a likely theory or is it possible I'm barking up the wrong tree. Unfortunately as it is a rare and random bug it will be hard to prove that the bug has disappeared so I need to be able to justify and be confident of whatever fix is implemented.
Edit: I'm using the CC430F5137 chip