That is a bummer. It's these kind of things that can drive you nuts
Yes, this one sure is, but I've uncovered what I think could be an interesting lead. Whilst looking at other sources of documentation about SD interfaces, I came across
this application note which talks about interfacing SD cards with BlackFin processors. I have no idea what a BlackFin processor is, but found an interesting nugget of information on page 17 under the heading 'Send Data'. Item 5 in the list specifies exactly 4,121 clock cycles for the transaction.
Now I'd normally be very careful and sceptical about plucking random numbers from unknown sources and ascribing mystical importance to them, but in this case that number of clock cycles exactly matches the number of 'transfer cycles' (SD clock cycles, basically) used in the
SD-card-controller IP core I tried previously with no luck to use (with the Wishbone interface). I'm going to have to go back to the write function in its
sd_data_serial_host module and really pick it apart to understand what those extra clocks are being used for.
My interface currently only sends 4,114 clock cycles - it is ~8 clock cycles short (give or take the STOP bit), which would explain why there's no response from the SD card at the end of the block transfer - as far as the SD card is concerned, it's still waiting for the final 8 clocks to complete the write transaction.
Did you post pictures of your project? Have not read this whole thread, but am interested to see what you have got. Believe you are using a genuine Z80 connected to the FPGA?
There've been screenshots of the video output when we were working on that, I think I posted a picture once earlier in the thread (about a year or two ago, maybe), so here's some more at the end of the post.
Yes, it's a classic Z80-based 8-bit computer, modular design but vertical-stacking instead of the more common 'cards into a motherboard'-type setup, like the RC2014. My goal was to create something more powerful than my first computer - an Amstrad CPC 464. That has been achieved in spades.. It has 4MB of memory, runs at 8 MHz, has a CF card for storage (hopefully soon to be upgraded to SD card!), battery-backed clock, FRAM/anything else you can stick on I2C, had an authentic AY-8192 sound card at one point (looking to replicate that in HDL at some point), and graphics on par with 16-bit consoles of the early 90's.
This breadboard shot is where it all began, with a 7-chip computer I built thanks to Grant Searle. I knew next to nothing about electronics before that. Still don't, now.
This is my uCOM at an early stage. There's a couple more cards on the stack and a DECA at the bottom of it all at the moment:
Here's a part-built prototype GPU card:
And this last one is the uCOM with an early-prototype GPU card on the top, based on the Intel/Altera EP4CE10. I'll get round to designing and building another card one day, once supplies of Cyclone V's and/or MAX10's improve.