Music Shield - Fragment end - can't continue recording!

Hello. I’ve recently purchased the Seeed Music Shield and planning to build a voice recorder/music player using Arduino Mega 2560.

I’ve got music_v1_14 uploaded to the board. Playing music works like a charm. However recording seems to work really, really bad. I’ve got a 2bg SD card and if I format it and record it usually keeps recording until I hit stop. However after a couple of successful recordings (haven’t been able to figure out a pattern) the recording stops on it’s own after 1-4 seconds (not sure if it actually records anything).

The same happens if there are mp3 files on the SD card. I simply can’t record even though there is plenty of space left on the card.

Does this have anything to do with the filesystem on the card? There is a comment in record.cpp > Record() that says:

  • \bug In case of fragmented filesystem, this version will not
  • function properly.

The if statement below (line 218 in record.cpp) evaluates and the recording stops. I have no idea how to get past this so any help would be appreciated.

if (freeSector!=(lastSector+1)){ //end of continuous space, must break!
  stopRecording = 1;
  Serial.println("\r\nFragment end - can't continue recording!");
  //InitDisplay(DS_STATIC,"FRAGMENT"," LIMIT!!",0);
  continueRecording = 1;
}

Best
.rickard

Please try to format the SD Card again to Fat16. And follow the steps:

  1. Press the reset and knob
  2. Release the reset
  3. Release the knob, until the green led is on
  4. When the music shield is beginning to record, the green and red LEDs will blink synchronous
  5. Press the knob to stop recording