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

sd card example not working fine

Hi All,

I am working on fatfs example from sdk 12.2.0 on pca10040, nrf52 dk, nrf52832. And i did not change anything in the code but it seems that my sd card is not getting initialized as i am getting following message on putty:-

APP:INFO: FATFS example.

APP:INFO:Initializing disk 0 (SDC)...

APP:INFO:Disk initialization failed.

and on debug, my code goes into this if condition in diskio_blkdev.c file:- Line no.-81

if (m_drives[drv].config.wait_func == NULL)
{
    m_drives[drv].config.wait_func = default_wait_func;
}

can anyone help me understand the reason behind why this is happening and how i should deal with it?

Thank in advance.

Regards

Parents
  • Please double check your connection as there is a bug in SDK12.2 docummentation for SD card example. VDD and GND are switched in the table. Here you can find correct connection settings:

    infocenter.nordicsemi.com/.../app_sdcard_example.html

    The other problem might be with MISO PULLUP settings. In SDK <= 13 it was set to "no pullup", beginning from SDK_14 by default MISO is set to pulldown. This can cause problem for some SD cards. In order to fix it try to change SDK config parameter: NRF_SPI_DRV_MISO_PULLUP_CFG to NRF_GPIO_PIN_NOPULL.

  • Hello, the connections are according to this documentation that you shared. Is there any other way to get the solution out of it?

Reply Children
No Data