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

Fatsfs example (SDK 14) does not works (Mount Failed)

I am trying to test the fatfs example (SDK14) using the 10056 DK.

I do nothing modification and it results in...

<info> app: FATFS example started.
<info> app: Initializing disk 0 (SDC)...
<info> app: Capacity: 59400 MB
<info> app: Mounting volume...
<info> app: Mount failed.

I saw that the problem occurs in this line, but I dont know tha reason.

NRF_LOG_INFO("Mounting volume...");
ff_result = f_mount(&fs, "", 1);
if (ff_result)
{
NRF_LOG_INFO("Mount failed.");
return;
}

In sdk_config.h I chenged the #define NRFX_SPIM_MISO_PULL_CFG to 0 and added a pulldown in the MISO.

Anyone has this same problem?

Parents
  • MISO needs a pullup according to SD spec. A 64GB card would require ExFat support - which may not be enabled by default in FATFS. Try a <=32GB card, these are shipped with FAT32 filesystem.

  • Hi Turbo J,

    Now I am using a 32GB card (FAT32).

    In the sdk_config.h I have the follow config

    // <o> NRF_SPI_DRV_MISO_PULLUP_CFG - MISO PIN pull-up configuration.

    // <0=> NRF_GPIO_PIN_NOPULL
    // <1=> NRF_GPIO_PIN_PULLDOWN
    // <3=> NRF_GPIO_PIN_PULLUP

    #ifndef NRF_SPI_DRV_MISO_PULLUP_CFG
    #define NRF_SPI_DRV_MISO_PULLUP_CFG 3
    #endif

    Furthermore, I am using a 1k resistor as pullup on MISO pin.

    With these steps I couldnt to do the example works.

    When I run the example I have the follow messages.

    <info> app: FATFS example.
    <info> app: Initializing disk 0 (SDC)...
    <info> app: Capacity: 30436 MB
    <info> app: Mounting volume...
    <info> app: Mount failed.

Reply
  • Hi Turbo J,

    Now I am using a 32GB card (FAT32).

    In the sdk_config.h I have the follow config

    // <o> NRF_SPI_DRV_MISO_PULLUP_CFG - MISO PIN pull-up configuration.

    // <0=> NRF_GPIO_PIN_NOPULL
    // <1=> NRF_GPIO_PIN_PULLDOWN
    // <3=> NRF_GPIO_PIN_PULLUP

    #ifndef NRF_SPI_DRV_MISO_PULLUP_CFG
    #define NRF_SPI_DRV_MISO_PULLUP_CFG 3
    #endif

    Furthermore, I am using a 1k resistor as pullup on MISO pin.

    With these steps I couldnt to do the example works.

    When I run the example I have the follow messages.

    <info> app: FATFS example.
    <info> app: Initializing disk 0 (SDC)...
    <info> app: Capacity: 30436 MB
    <info> app: Mounting volume...
    <info> app: Mount failed.

Children
Related