0

M0&M4 Flash IC with SdFAT Broken
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

M0&M4 Flash IC with SdFAT Broken

by Annakin4 on Wed Oct 09, 2019 5:51 pm

Hello all,

I used the SdFat and Adafruit_SPIFlash libraries before, and had them working, but I started a new project and updated both the SdFat and Adafruit_SPIFlash libraries from github. I have fresh both a ItsyBitsy M0 and a M4, I am now unable to mount a file system after running the format example with either. My setup is with the ItsyBitsy boards connected to my PC with no peripherals. When I run the SPI Flash FatFs Format Example, I get the following result-

Code: Select all | TOGGLE FULL SIZE
Adafruit SPI Flash FatFs Format Example
Flash chip JEDEC ID: 0xC84015
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This sketch will ERASE ALL DATA on the flash chip and format it with a new filesystem!
Type OK (all caps) and press enter to continue.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Creating and formatting FAT filesystem (this takes ~60 seconds)...
Formatted flash!
Error, failed to mount newly formatted filesystem!


And if I run the normal Adafruit_SPIFlash flash_erase example, that runs fine, but the filesystem is failing to mount after the format, I assume the format is actually failing. I notice at the top of the example sketch it says the following-

Code: Select all | TOGGLE FULL SIZE
// Since SdFat doesn't fully support FAT12 such as format a new flash
// We will use Elm Cham's fatfs f_mkfs() to format


While in the SdFat library, FAT12 is enabled as it is required by the Adafruit_SPIFlash library, not sure whats up with that but it seems the two libraries and this example are not on the same page.

Is there a workaround, or a known working version for both I can just get working? I'm pretty disappointed these libraries no longer just work out of the box.

Thanks,
Sam

Annakin4
 
Posts: 36
Joined: Fri May 15, 2015 3:25 pm

Re: M0&M4 Flash IC with SdFAT Broken

by Annakin4 on Fri Oct 11, 2019 8:50 am

Update, if anyone who comes across this thread via google looking for a solution, the FatFS branch of the SPIFlash repo does work

Annakin4
 
Posts: 36
Joined: Fri May 15, 2015 3:25 pm

Please be positive and constructive with your questions and comments.