Hi,
I'm trying to run fatfs example in sdk. I only changed the spi pin numbers. What is wrong with that?
Here is RTT screen.
My schematic is;
CS-------------P0.08
MOSI----------P0.06
SCK-----------P0.05
MISO----------P0.00
Thanks..
Hi,
I'm trying to run fatfs example in sdk. I only changed the spi pin numbers. What is wrong with that?
* @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" #define FILE_NAME "NORDIC.TXT" #define TEST_STRING "SD card example." #define SDC_SCK_PIN 5 ///< SDC serial clock (SCK) pin. #define SDC_MOSI_PIN 6 ///< SDC serial data in (DI) pin. #define SDC_MISO_PIN 0 ///< SDC serial data out (DO) pin. #define SDC_CS_PIN 8 ///< SDC chip select (CS) pin. /** * @brief SDC block device definition * */ NRF_BLOCK_DEV_SDC_DEFINE( m_block_dev_sdc, NRF_BLOCK_DEV_SDC_CONFIG( SDC_SECTOR_SIZE, APP_SDCARD_CONFIG(SDC_MOSI_PIN, SDC_MISO_PIN, SDC_SCK_PIN, SDC_CS_PIN) ), NFR_BLOCK_DEV_INFO_CONFIG("Nordic", "SDC", "1.00") );
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,
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 Simonr 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