SDCARD Project on SK S7g2

can anyone give me a sd card project for SK S7g2. The filex port framework project is on dk, i am looking for a starting point on sk board but could not find any..

  • The "FileX Port Block Media Framework Module Guide - Application Project" ( www.renesas.com/.../D6003792.html ) does work on the S7G2-SK.  
    The only thing is that you have to attach an SDCARD reader.
    I've hacked a SDCARD to microSDCARD reader and connected it to the necessary pins.
    Not perfect, but works as a proof of concept.

    The only thing that I missed at first was the requirement for Pull-up resistors on the clock, data, cmd lines.  You can enable the internal pull ups on the I/O lines for this in the Pin configuration tool.

  • In reply to Richard:

    I do have a sd card holder & 16gb sandisk memory card with me, would i be able to use it ??.

    And by the application project would work on sks7g2 ,do you mean i just need to change the device in bsp(to sk s7g2), related pin configuration(for sdcard 4-bit ) and the sd-mmc driver's (media type, bus width property) in ssp, or there are any other additional modifications too do.

    Besides it would be really helful if you add the zipped project for the showed trial of the application project on sk board itself . It would save me a heck of confusions.

    please help!!
    Regards
    Himanshu mhaskar
  • In reply to heman:

    Heman,

    Project is attached.  The code is taken from the module guide, with the necessary hardware / pin modifications for the S7G2-SK board.

    I cannot think of any reasons as to why the 16GB SDCARD will not work.  FYI, my project was running with a 2GB SCARD.

     

    NOTE: The project will not format the card, it assumes that it is already formatted.

    I removed the capacitor C63 (TSCAP on P2.5) from the S7G2-SK board as I wish to use P2.5 as the DAT3 pin, not as a CTSU pin.

    I have enabled the internal pull ups on all of the signals (CLK, CMD, DAT[3:0])

     

    Regards,

    Richard

     

    S7G2_SK_SDMMC_HAL_FRMK_FX_MG_AP.zip

  • In reply to Richard:

    Thankyou richard..this would help me a lot!

    Is there any other method than removing the capacitor on p2.5 on the sk board. I don't wish to touch any component on the board. Can i use the 1bit sd mode?Does it require any different configuration?

    Also could you tell me where to find the demo_filex.c file provided with filex distribution system. As the ssp is integrated with xware based components already, would it be located in any of the ssp files??.

    The said c file according to the user manual is a all in one sample code for usage of filex services.
    I would be implementing a database like hierachary of directories_subdirectories and files using a externally mounted sd card & Filex system on S7g2, which is why i would more code example on FILEx. please help!!.

    Regards ,
    Himanshu Mhaskar.
  • In reply to heman:

    1 bit mode will be fine. I originally tested in 1-bit mode before testing 4-bit mode.
    I will try and locate the file you refer to. I have never referenced this file, but it does appear difficult to find!

    BR, Richard
  • In reply to Richard:

    Thankyou richrad this would work for me.
    Regards Himanshu M
  • In reply to heman:

    Hello richard!

    I am facing a strange behavior with sd card interfacing, which is the code works perfectly fine with the 4GB sandisk micro sd card but not with the 16 gb/32gb. Also i am using a micro sd card card holder for all the trials.

    Note- The automatic formatting of the card to fat32 is disabled, as it takes indefinitely long time.
    I had formatted the card to fat32 by a windows 10 desktop.

    Could you help me with why this is happening??

    I read in of the documents somewhere that the ex-fat is supported now in latest ssp version. I downloaded & installed the newest version (1.6.3), but for some reason it.s not showing up in the bsp tab of the e2studio configurator. Not quite sure now, where did it go..

    will switching to ssp version 1.6.3 & newer filex solve the problem. Please help.
  • In reply to heman:

    P.S The classes were different for memory cards
    4 gb- class 4
    16 & 32 gb- class 10
  • In reply to heman:

    Can you confirm, that the issue you have is with formatting?
    Or is it that nothing is working?
  • In reply to Richard:

    I have intentionally disabled the automatic formatting on intialisation as i think 5 -6 minutes of processing is huge in our application. The problem isn't with formatting!.

    I just cant write/ read from a 8gb/16gb micro sd card, but can from a 4gb microsd card. I was tring the same code for all trials. you might want to review my project once.sd_card_13_09_2019.zip

  • In reply to heman:

    I have tried your project with an 8GB class 10 and a 64GB class 10 card, and both of these work with your project without any problems. I suspect the issue is with how your cards are formatted.
  • In reply to Jeremy:

    And how did you format the cards??. I followed a simple procedure of connecting it to a pc via a sd card usb adapter, right clicking and formatting to fat 32. Do i need to format it with some other fat system??.
    Regards,
    Himanshu M
  • In reply to Jeremy:

    The 8GB card is formatted as Fat32, and the filesystem starts at 0 offset into the disk :-

  • In reply to Jeremy:

    How are you doing the formatting? Is this on windows??
  • In reply to heman:

    Do you use any specialized software to do the formatting..