Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

SD Card / FileX issue using SSP 1.3

$
0
0

Hello -

I am having trouble getting the SD card interface working correctly on my custom S7G2 board.  I started with the R11AN0147EG0100 FileX Port Block Media Framework Module Guide example on my DK-S7G2 and that is working correctly (using SSP 1.2).  I then integrated this same example into my project and custom board (using SSP 1.3).  It fails at the first write during the formatting stage when 'format media during initialization' option is enabled.  The fault happens at this code:

void  SF_EL_FX_BlockDriver (FX_MEDIA * p_fx_media)
{
....
        case (UINT)FX_DRIVER_WRITE:
        {
            ret_val = p_block_media->p_api->write(p_block_media->p_ctrl,
                                                  p_fx_media->fx_media_driver_buffer,
                                                  p_fx_media->fx_media_driver_logical_sector + p_fx_media->fx_media_hidden_sectors,
                                                  p_fx_media->fx_media_driver_sectors);
            break;
        }
...
The ret_val is SSP_ERR_WRITE_FAILED:

If I disable the 'format media during initialization' option, the application runs and appears to correctly read the "Available space" correctly and outputs the value on my debug terminal.  I have tried several SD cards and each one reports the correct available space here.  The next step is to create a directory using  res = fx_directory_create(&g_fx_media, dir_name).  The program then hangs somewhere in the _fx_directory_search() call and never returns.

If anyone has any suggestions I would certainly appreciate you help!

Things I have checked / tried:

  1. I have tried both DMAC and DTC
  2. I have tried both the Card and the Embedded settings media type settings
  3. CD is not used
  4. All SDHI0 pins are set to High drive
  5. I have tried all SDHI0 pins with internal pull-ups enabled and disabled
  6. Changing the write protect tab on the SD card results in SDHI0.INFO.SDWPMON changing state

 

Here is my project config:

 


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>