I am using two interrupts, one to read 4 of the ADC mux pins, one to send this data out using I2C. The data is stored in an int array. The main loop can read this data fine, but no matter how I do it, the I2C interrupt receives strange values for the array. I have a printf that runs when the I2C interrupt is called, and it shows values close, but not the same as the actual ADC counts, as though a bit is flipping. If I understand right, interrupts are disabled while in an interrupt, so I don't think it is a concurrency problem (it would affect the main loop anyway). I tried declaring the array as "volatile" but that did not help. The array is indexed properly, and correct data appears in a printf inside the main loop.
What gives? Does accessing arrays for reading change in interrupts? Is it because this is a 16-bit array?