Hi I have implemented a mass storage usb device using An AT91SAM7S256 microcontroller and the memory used is AT45DB161D serial flash.
I used keil's mass storage sample from my 4.03 uvision.
The sample was placed in the following path under AT91SAM7-EK samples directory: \USB\Memory
The problem is, I am getting very low transfer rates for my mass storage device. I know that serial flash is not good option for a mass storage device, but my device is a composite device(HID + mass storage) in which the amount of data to be carried in mass storage device is 2-3 M-bytes. Transfer rate for write on a file with 1.5M size is 6.5 Minutes :( and it's read takes like 30 seconds. Can anyone clear it out for me: Is this the maximum transfer rate i can get on this hardware? or Something is not configured correctly.
Some information on device's configuration
-Master clock source = PLL -installed Xtal is 18.432 MHz -PLL MUL = 72 -PLL DIV = 14 which gives PLL = 96 MHz -Master clock DIV = 2 -USB DIV = 2 -SPI SCBR = 2 which gives SPCK = 24 MHz
As I concluded I can not raise SPCK anymore. Well I can put SCBR=1. But it did not work for some reason. To be more precise I can not use any other value for SCBR besides 2 which is really making me mad. AT91SAM7S datasheet says I should be able to use any value between 1-255.
Thanks for your attention Ehsan Taheri