I'm using the MSP430F2132 and have been coming across a consistent issue. The point where my code gets stuck is soon after a return from a timer interrupt I copy the data from one unsigned array[16] to another.
for(i = 0;i<16;i++)
{
adctosd[i] = adc[i]; //copy buffer
adc[i] = 0; //clear buffer
}
Not always the first time, but eventually the data that is being copied in this transfer, some of it gets written outside of the memory allocated for adctosd and into the memory addresses just after it. Thus, those variables that are getting trashed with this overwritten data causes my code to crash.
My question is, is this a common issue with stack overflow? Or is it something else? I've set my stack to a relatively high point (as high as memory will allow), so it seems like that might not be the issue.
Any help would be greatly appreciated!
Dustin