This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Does fatfs example work correctly on nrf51822 (pca10028)?

I downloaded SDK 12.3.0 (seems to be it is the last supported SDK for PCA10028) and tried to use fats example, I changed pin configs to SPI's pins.

I also prepared my 16Gb card (Sandisk Ultra) by formatting it to FAT32, so my console shows this one (as you can see I commented out returns if action is not equal FR_OK):

APP:INFO:
FATFS example.

APP:INFO:Initializing disk 0 (SDC)...
APP:INFO:Capacity: 14804 MB
APP:INFO:Mounting volume...
APP:INFO:
 Listing directory: /
APP:INFO:Directory listing failed!
APP:INFO:Directory read failed.
APP:INFO:Writing to file NORDIC.TXT...
APP:INFO:Unable to open or create file: NORDIC.TXT.
APP:INFO:Write failed

According to fatfs's limit my card has to work correctly

Filesystem type: FAT, FAT32(rev0.0) and exFAT(rev1.0).
Number of open files: Unlimited. (depends on available memory)
Number of volumes: Upto 10.
Volume size: Upto 2 TB at 512 bytes/sector.
File size: Upto 4 GB - 1 on FAT volume and virtually unlimited on exFAT volume.
Cluster size: Upto 128 sectors on FAT volume and upto 16 MB on exFAT volume.
Sector size: 512, 1024, 2048 and 4096 bytes.

Related