I'm going to make a wild guess: you tried the volatile this way and it didn't work:
const volatile uint32_t (*currentWave)[WAVELENGHTS];
And that is to be expected, because this declaration makes volatile the uint32_t
values of the array, not the pointer. And the pointer is what changes asynchronously.
Try instead:
const uint32_t (* volatile currentWave)[WAVELENGHTS];
And see what happens.
Note: if you find the syntax awkward, try with typedefs:
typedef const uint32_t waveform_t[WAVELENGHTS];
waveform_t *volatile currentWave;
You could even do:
typedef waveform_t *waveform_ptr;
volatile waveform_ptr currentWave;
but I find it excessive.