Things seem to break down when I use your existing code then try to build a little array. Your example breaks when I add this code and nothing else at the end of the loop():
uint8_t data_out[N_DATA_BYTES] = {0};
data_out[0] = 0x64;
data_out[1] = 0x64;
data_out[2] = 0x64;
data_out[3] = 0x01;
This makes me wonder whether you are relying on some memory being shared without explicitly passing that to a function? This is really unfortunate because this little local array is important for me to transmit the data I just got from the PS2 controller.