1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Problem in reading/writing to SD card through MPC5554 using high SPI clock speed

Discussion in 'Embedded' started by sanaas, Feb 3, 2011.

  1. sanaas

    sanaas Guest

    Hi everybody,

    I have interfaced a 4 GB class 4 Kingston micro SD card with MPC5554 usin
    SPI. I have implemented FAT32 file system driver on it.
    Everything(reading/writing files) works fine when I keep SPI clock at 3 MH
    after initialization. With 3 MHz clock I am able to write 1 MB of data in
    file in 1 min which is pretty low speed!!
    But when I turn to SPI clock above 3 MHz, the SD card does not read/writ
    sectors at all!! All I want to do is to increase this speed of dat
    Has any body done such a thing with speed higher than 3 MHz? I would be s
    grateful if any body could help me in this issue as I have been trying t
    solve this issue since last so many days but in vain and my FAT32 drive
    would be of no use in my application with such a low speed.

    sanaas, Feb 3, 2011
    1. Advertisements

  2. sanaas

    WangoTango Guest

    While I am no SPI expert by any means, I have used a LOT of SPI
    peripherals with nary a problem. I would say you need to start digging
    out the test equipment and look at what is REALLY going on. A scope to
    make sure your signals are clean and not ringing/bouncing all over the
    place is a good start. Does the card have decent power supply
    decoupling as close to the SD connector as possible? Is your SPI really
    working at the speeds you think? Is it operating in the mode that you
    think? Is the chip select signal active when it should be? All things
    you need to find out. So, a scope and maybe a logic analyzer would be
    called for and some testing is in order.
    WangoTango, Feb 3, 2011
    1. Advertisements

  3. IIRC you need a fair bit of buffering to get high throughput on an SD
    card.. even fast cards go away for significant stretches of time, like
    a hundred ms or more.
    Spehro Pefhany, Feb 3, 2011
  4. sanaas

    sanaas Guest


    Thanks for showing interest in solving my problem and for you
    You are right that there should be buffering but people have achieve
    speeds in hundreds of KB/s using SD card without using any buffer.My spee
    is not even 50KB/s!!
    I do have an oscilloscope and I have observed the signals multiple times
    There is no ringing effect as such and you are right that the power suppl
    and controller should be as close as possible to SD card for high frequenc
    operation but I am working on a card which is already designed an
    manufactured accordingly, so I cannot move any thing!! Well my issue i
    still unsolved. Although i am able to run it now at 12.5 MHz speed bu
    first of all it does not responds in one go and secondly at this speed car
    responds too late when I write a sector to it so there is only a fe
    seconds speed difference between the two. I am trying to solve the issue b
    observing SPI signals clk,data in and out etc.
    sanaas, Feb 18, 2011
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.