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

Formatting a SD-Card with the nRF52840

Hi DevZone,

Does anyone have any experience with performing a SD-Card format with the nRF52840. This is to avoid removing the SD-Card from the hardware when a format is required.

I have been looking through the FatFS example from the Nordic SDK version 15.3. Below is the local location on my PC:

C:\SDK\nRF5_SDK_15.3.0_59ac345\examples\peripheral\fatfs\pca10056\blank\ses

This example uses the FatFS from ChaN (2014) and I have found the format IOCTL command at this location:

C:\SDK\nRF5_SDK_15.3.0_59ac345\external\fatfs\src\diskio.h (Line 59)

It seems like the user has to define their own disk format function to be attached to this command as it is not included in the nRF block device driver IOCTL function:

C:\SDK\nRF5_SDK_15.3.0_59ac345\components\libraries\block_dev\sdc\nrf_block_dev_sdc.c (line 336)

Has anyone done this successfully?

Br. Casper

Parents
  • Hi again Casper

    I'm sorry, but these diskio files and functions are very old, and has not been updated in ~4 years, so this is taking some time finding any answers to. I have asked about this internally, but no luck as of yet. In the meantime, might I suggest looking checking out this case on USB MSC corruption, which discusses the Fatfs and formatting in detail while waiting. It doesn't seem to have the exact answer you're looking for, but maybe you can get an idea of where to get started from that thread.

    I'll keep you posted on any updates I get internally. Thank you for your patience!

    Best regards,

    Simon

Reply
  • Hi again Casper

    I'm sorry, but these diskio files and functions are very old, and has not been updated in ~4 years, so this is taking some time finding any answers to. I have asked about this internally, but no luck as of yet. In the meantime, might I suggest looking checking out this case on USB MSC corruption, which discusses the Fatfs and formatting in detail while waiting. It doesn't seem to have the exact answer you're looking for, but maybe you can get an idea of where to get started from that thread.

    I'll keep you posted on any updates I get internally. Thank you for your patience!

    Best regards,

    Simon

Children
Related