5 Replies Latest reply on Jul 11, 2016 5:42 AM by bukac_1515461

    emFile not communicating with SD Card


      Hey there,


      Im currently trying to use an SD card in one of my projects.


      PSoC Creator 3.3 CP2, Component emFile 1.20, Lib emFile_V322c.


      I am using an Lcsoft.net SD Card holder (see the schematic attached) and a PSoC5LP Prototyping Kit. I already measured all the physical connections, tried another SD-Card holder, other boards, other pins, other libraray configuration... no success so far.


      I used the Demo-Project and as well tried to set up an empty project with the instructions from the emFile datasheet.


      I have used exactly this SD-Card (32MB SDXC/MMC) some years ago with PSoCs and it worked fine. Also the card is not write protected and works fine under windows.


      I also Included FS_ConfigIO.c to my project and inserted UART Debug statements there but there is nothing coming out. My code (based on the example)




      /* Get volume name of SD card #0 */
          if(0 != FS_GetVolumeName(0u, &sdVolName[0], 9u))
              /* Getting volume name succeeded so prompt it on the LCD */
              UART_PutString("\r\nSD card name:");
              /* Operation Failed - indicate this */
              UART_PutString("\r\nFailed to get SD card name");


          UART_PutString("SD card format: ");
          if(0 == FS_FormatSD(sdVolName))




          /* This will create directory "Dir" on SD card */
          if(0 == FS_MkDir("Dir"))
              /* Display successful directory creation message */
              UART_PutString("\r\n\"Dir\" created");
              /* Display failure message */
              UART_PutString("\r\nFailed to create directory");




      I get:


      SD card name:mmc:0:SD card format: Failed


      Failed to create directory


      Needless to say that also the card is not formatted and no directory created.


      Its a bare-metal system without OS. I tried emf16nosnlfn emf32nosnlfn and emf16noslfn




      Build Setting:


      Additional Include dirs:
      ..\..\..\200_Components\emFile_V322c\Code\Include\PSoC5; ..\..\..\200_Components\emFile_V322c\Code\Include\PSoC5\emf16nOS


      Additional Libs




      Additional Lib dir:






      I attached a logic analyzer to the borad, this doesn't look like proper SPI communication to me (see attach file).