I certainly haven't had any issues with the occasional high latencies that flash memory introduces - the SCSI disk drivers don't seem to have any fixed timeouts that I've run across yet. Did you use the ACMD23 (SET_WR_BLK_ERASE_COUNT) command before writing the data ?From my experience, SD writes seem to be "pretty fast" most of the time, but every 10 or 20 blocks you'll see one block take 10x or 20x the average time.
Does anyone know the -exact- field that Drive Setup/Apple HD SC Setup checks ? I think I'll make that field a configurable option, stored in eeprom and set via USB. That way, people can change it to "Apple Computer, Inc." if they want (or shatever string Drive Setup expects).Have you considered making the firmware emulate an Apple drive so we can use the stock Drive Setup/Apple HD SC Setup with it?
I think it's because they're interfaced similar to IDE. Since SCSI>IDE is already done, it's probably not too much to carry it over to CF.Is there a technical reason why CF cards are easier to adapt for SCSI than SD cards?
SD cards are patent encumbered devices. The "open" SPI interface is very slow. Having straight IDE gives folks the option to use whatever kind of storage device they want.This is very exciting. Are there no other SCSI to SD converters out there already? I've seen several SCSI to compact flash converters, but that's not nearly as appealing, since CF cards aren't very common any more and mounting one on a modern PC for file copying may require extra hardware. Is there a technical reason why CF cards are easier to adapt for SCSI than SD cards?
bigmessowires, I meant 240 kiloBYTES per second, using a class 10 card. SPI running at 24MHz at the moment. I'm not bit-bashing SPI though - I'm loading 4 bytes at a time into a FIFO buffer, and letting the hardware clock out bits to the SD card without software intervention.mmcmaster, do you mean 240 kiloBYTES (KB) per second, or kilobits (Kb)? Assuming kilobytes, I'd love to know what method you're using to get that write speed on a class 4 card, since it's about 8x better than I was ever able to achieve
240 KB/sec sounds about right for class 10. I know I'm starting to sound like a broken record here, but before you spend too much more time optimizing the software side of your SCSI interface, you may want to do a simple SD performance test where you write 100 blocks full of random data to the SD card. That will tell you the best case possible performance, if the software interface were infinitely fast. I hope I'm wrong, but I suspect you may find it won't go much faster than you've already got it, without switching from SPI to the proprietary 4-bit interface.bigmessowires, I meant 240 kiloBYTES per second, using a class 10 card. SPI running at 24MHz at the moment. I'm not bit-bashing SPI though - I'm loading 4 bytes at a time into a FIFO buffer, and letting the hardware clock out bits to the SD card without software intervention.
I suspect the SD card writing itself is actually closer to 2 megabytes per second, and I'm being limited by poor throughput on the pure-software SCSI interface. I timed the current SCSI interface at 449KB/sec by commenting out the SD card write methods. I'm halfway through addressing that by moving the SCSI single byte read/write method into the programmable logic of the PSoC chip, and feeding it with the magical FIFO buffer.
Yes, there is code and information out in-the-wild the used the proprietry interface. eg. see http://opencores.org/project,sdcard_mass_storage_controller. But it would be SLOWER than the simple SPI interface unless it was implemented in hardware (eg. an FPGA), as there are now more serial outputs to control.Even though its protected by patents/NDA, etc... Hence "Secure" digital memory. I assume thats what they mean by that anyway. could be wrong....
isnt it possible to reverse-engineer, or find code out there that utilizes the proprietary interface?
A little bit of skepticism is healthy :b&w: I've done a quick test whereby I modified the code to write 20 sectors to the SD card for every 1 sector requested. Each SD card write command would be passed 8192 * 20 = 163840 bytes.I know I'm starting to sound like a broken record here, but before you spend too much more time optimizing the software side of your SCSI interface, you may want to do a simple SD performance test where you write 100 blocks full of random data to the SD card.
$ sudo dd bs=8192 count=100 if=/dev/urandom of=/dev/sdd oflag=dsync
100+0 records in
100+0 records out
819200 bytes (819 kB) copied, 23.6144 s, 34.7 kB/s