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

NRF52832 FatFs "Disk initialization failed"

Hi,

I'm trying to run fatfs example in sdk. I only changed the spi pin numbers. What is wrong with that?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
* @defgroup fatfs_example_main main.c
* @{
* @ingroup fatfs_example
* @brief FATFS Example Application main file.
*
* This file contains the source code for a sample application using FAT filesystem and SD card library.
*
*/
#include "nrf.h"
#include "bsp.h"
#include "ff.h"
#include "diskio_blkdev.h"
#include "nrf_block_dev_sdc.h"
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Here is RTT screen.

My schematic is;

CS-------------P0.08
MOSI----------P0.06
SCK-----------P0.05
MISO----------P0.00

Thanks..

  • Hi

    The RTT states that you can't initialize your disk. Have you tried with the default pin configurations so you are sure that it is the pin config that is wrong here? Only thing I can think of being wrong with the pin configs is that P0.00 is by default used as a pin for the optional crystal (XL1), and that it might be set as that somewhere. Can you try changing just that P0.00 to something else to confirm whether that is the problem or not?

    Best regards,

    Simon

  • Hi simon,

    I'm using custom board of NRF52832. I've checked all default spi

    ports pin configurations but there is no match with default pin configurations with this board.

    I'm waiting your advice.

    Thanks.

  • Hi

    Does the SD card socket boardhave level converters for use with 5V boards? If it does the Fatfs example won't work unless you power it using a 5V source.

    Best regards,

    Simon

  • Hi,

    I'm using this breakout board and there is no level converter. Standart sd card working on 3.3V.

  • I'm using custom board

    As said, the first thing to do is to test the application with default pin assignments on a Dev Kit - that way you have a known-good reference to work from

1 2