element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum Compact Flash speed in memory mode
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 2 replies
  • Answers 1 answer
  • Subscribers 482 subscribers
  • Views 390 views
  • Users 0 members are here
Related

Compact Flash speed in memory mode

aleph0
aleph0 over 12 years ago

I developed an embedded system based on a FPGA (ECP2 lattice) with a soft core (MICO32). I also developed a peripheral in verilog for connecting to a compact flash. The processor runs at 70 Mhz, with 256 Mbytes of DDR1 external ram, and internal cache. The compact flash works in memory mode.

The problem is the sector access time, which is very slow. I can write 1.2 Megabytes in 60 seconds with a Sandisk ULTRA !!! With the same compact flash, connected to a PC, I measured more that 10 Mbytes/sec.

I did some measurements, and it seems that the problem is the access time to the sector. Before writing any sector, the status of the Comact flash is checked, and it must be 0x58.

Also after write sector, the status of the compact flash must be 0x58.

Does anybody knows how to access the compact flash in order to obtain a faster speed ? I don't need a very high speed such as UDMA, but 1.2Mbyte in 60 seconds is really not acceptable.... at least I need 500 Kbyes/sec...  Is there a way to achieve this speed in memory mode ?

 

Thanks

  • Sign in to reply
  • Cancel
Parents
  • michaelkellett
    0 michaelkellett over 12 years ago

    Are you using WriteSector or WriteMultiple ? I haven't used compact flash but on SD cards it is impossibly slow if you use single sector writes.

     

    The Sandisk document that I looked at didn't make it clear what the penaltyo of using memory mode was but says:

    "

    The CompactFlash Memory Card Series is optimized for operation with hosts, which support the PCMCIA I/O

    interface standard conforming to the PC Card ATA specification. However, the CompactFlash Card may also be

    configured to operate in systems that support only the memory interface standard."

     

    So memory mode may cost you something.

     

    Have you instrumented your code - so you know how long it takes for each part of the write process.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • michaelkellett
    0 michaelkellett over 12 years ago

    Are you using WriteSector or WriteMultiple ? I haven't used compact flash but on SD cards it is impossibly slow if you use single sector writes.

     

    The Sandisk document that I looked at didn't make it clear what the penaltyo of using memory mode was but says:

    "

    The CompactFlash Memory Card Series is optimized for operation with hosts, which support the PCMCIA I/O

    interface standard conforming to the PC Card ATA specification. However, the CompactFlash Card may also be

    configured to operate in systems that support only the memory interface standard."

     

    So memory mode may cost you something.

     

    Have you instrumented your code - so you know how long it takes for each part of the write process.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • aleph0
    0 aleph0 over 12 years ago in reply to michaelkellett

    Thank you for the answer. I will try using Write Multiple and do some tests.

    I am using only Write Sector. I experienced the same problem in the past with an SD card, and I was hoping not to have the same problem also with CF.

    Anyway, from the Sandisk specification, it seems that also in Write Multiple mode the status of the CF must be checked by the host  between every sector write,

    and the host can send the sector data only if the status is 0x58. I did some meausrements of the single sector write, and the most of the time is lost because of the

    waiting for the CF to be ready (0x58 in status register). Maybe in multiple sector write this time is reduced... I hope so...

    Now my CF is attached as a slave in a whishbone bus working at 70 Mhz. Even if I did a byte access every 20 clock cycles (which is a huge time compared to real situation)

    I should have at least 3.5 MBytes/sec... that would be a good speed...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube