Hi Mark,
Thanks for your reply.
You are correct, the only common code between the FatFS and the USB MSD are the sector read and write routines. These routines however, are where I believe the bottle neck is although I'm yet to benchmark the speed of this. As a very crude example, I have written a screen capture routine which dumps the entire contents of an off-screen buffer (38,400 bytes) into a bitmap file on the SD card - this takes roughly 4 or 5 seconds or so to complete to produce a 308kb file (crude stopwatch timing, bitmap is 32bpp).
I'm wondering whether I am initializing the SDHC correctly or whether I have the clock speed set too high, so that the chip defaults to a much slower speed. Either way, I still think that there is much more performance to be had.
Another possible clue could be when the USB MSD enumerates. If I pause the debugger during enumeration, more often than not the line of code that the debugger stops on is a loop polling an SDHC register. Enumeration without the debugger attached can take up to 10 seconds - which I would consider excessive. This still leads me to believe that it is the SDHC not functioning as fast as it should be.
I think I need to do more investigating.
Apologies if most of that is waffle. I have the flu and I can't really think straight or see properly at the moment...
Regards,
Kevin