Bill Greiman
Well-known member
I have a SdFat user posting an SdFat issue. He wrote an initialized array to an SD and said the content was not correct.
I looked at his example and it appears a DMAMEM array like the example below is not initialized. It appears to have random content.
Typical output:
The correct output is printed if I remove the DMAMEM.
What should I tell him?
I looked at his example and it appears a DMAMEM array like the example below is not initialized. It appears to have random content.
Code:
DMAMEM uint8_t test[] = {1,2,3,4,5,6,7,8,9,10};
void setup() {
Serial.begin(9600);
while (!Serial) {
}
for (size_t i = 0; i < sizeof(test); i++) {
Serial.print(test[i]);
Serial.print(' ');
}
Serial.println();
}
void loop() {}
Typical output:
64 23 114 16 242 140 4 49 61 115
The correct output is printed if I remove the DMAMEM.
1 2 3 4 5 6 7 8 9 10
What should I tell him?