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.

  • Hi,

    What is the return code from the call to f_mount() in main.c? This again comes from find_volume() in ff.c. Looking at the return code or stepping through the find_volume() function should give some insight into what is happening.

  • I resolved this question when I formated the sdcard to FAT32.

    Now, I am trying add this example in my custom solution I am have the follow error after add the paths and files.

    nrf_log_frontend.c:92:35: error: unknown type name 'nrf_log_module_dynamic_data_t'

    I am trying use variables and strutuctures that are in nrf_log_internal but the Segger tell me that the types and variables declared in this file doenst exists. I dont know if I forgot to set any flag into sdk_config.h

    Ps. I already added the path to the file where is declared the "nrf_log_module_dynamic_data_t"

     variable.

Reply
  • I resolved this question when I formated the sdcard to FAT32.

    Now, I am trying add this example in my custom solution I am have the follow error after add the paths and files.

    nrf_log_frontend.c:92:35: error: unknown type name 'nrf_log_module_dynamic_data_t'

    I am trying use variables and strutuctures that are in nrf_log_internal but the Segger tell me that the types and variables declared in this file doenst exists. I dont know if I forgot to set any flag into sdk_config.h

    Ps. I already added the path to the file where is declared the "nrf_log_module_dynamic_data_t"

     variable.

Children
Related