Releasing the DO output from the SD in TAQOZ
Peter Jakacki
Posts: 10,193
Here's some information about the SD DO line that stays enabled regardless of the SD chip select.
It needs at least one clock after the chip select goes high with DI high. Here I issue a CMD0 just to activate the DO etc and then release the DO.
60 HIGH takes the SD chip select high
61 HIGH is the SD clock
Usually DI is left high anyway but you can do a 59 HIGH if you want to make sure.
My scope shows the DO floating to the midpoint where I have placed 100k to 3.3V and 100k to ground bias network for this test. (MOSI and MISO labels are swapped)
This is the new TAQOZ running in the FPGA image at 20MHz
It needs at least one clock after the chip select goes high with DI high. Here I issue a CMD0 just to activate the DO etc and then release the DO.
TAQOZ# 0 0 CMD . --- 1 ok TAQOZ# 60 HIGH 61 HIGH 61 LOW --- okNormally I supply 8 clocks for the SD card but a single clock is all it needs to release the output.
60 HIGH takes the SD chip select high
61 HIGH is the SD clock
Usually DI is left high anyway but you can do a 59 HIGH if you want to make sure.
My scope shows the DO floating to the midpoint where I have placed 100k to 3.3V and 100k to ground bias network for this test. (MOSI and MISO labels are swapped)
This is the new TAQOZ running in the FPGA image at 20MHz
------------------------------------------------------------------------------- Parallax P2 .:.:--TAQOZ--:.:. V1.1--v33h 190219-1900 -------------------------------------------------------------------------------
Comments
This sequence releases the SO on the Samsung 64GB SDXC successfully. From there it'll reboot and reload Taqoz happily
However, it doesn't work with the Team 64 GB SDXC, which keeps its SO pin at 3v3
edit: The SanDisk 32 GB was also tested fine, but was already working anyway
Did I see discussion on this go past a while back, where more than one CLK was needed to release SD ?
This was just a quick check but I will test other cards and see what they do, especially after sectors reads. My BeMicro-CVA9 is plugged into a daughter board that has a standard SD card socket so this makes it easier to test as well.
0 0 CMD .
60 HIGH 61 HIGH 61 LOW
60 HIGH 61 HIGH 61 LOW
was enough to get SO to float.
I don't think anyone has found a way to make it 100% reliable in all this time...
Or just give it 256 clocks. That ought to do it.
http://forums.parallax.com/discussion/comment/1465387/#Comment_1465387
Could be worth trying - does that meet this rule from above ie is DI known to be HI ?
"It needs at least one clock after the chip select goes high with DI high."
I have been sharing the SD pins on P1 for many years. I had to patch all the different drivers tho (fsrw, kyes, etc) to send more clocks.
Totally works, so i must still have a bug somewhere
SanDisk works with code as is
Samsung seems to need 1 extra clock pulse
Team seems to need 2 extra clock pulses
We need to check other brands, and other Sandisk types other than Ultra.
The solution if the rom really can't be changed may be to keep buying SanDisk Ultra's
Is it possible those exit-clocks need to be slower ?
I sent you an email
Just refreshing the problem...
Do any of your SanDisk cards fail in any way?
That's the easiest for me to replicate for now.
This one's for you. Its not a show stopper, but with a brand new (exFAT) SDXC card, Taqoz gets into a loop. You can see where i type '0 format' to invoke the fat32 formatter, which works fine.
The trouble is some users might see that looping happening and think they can't type in a command, because its not at the Taqoz# prompt.
Ignore the SanDisk line early on in the log, thats what Taqoz has booted from
For the CMD8 problem cards...
Attached is the new respin SD with debugging (ROM_Booter_v33j_SD-003c.spin)
Run on P2-EVAL with P59 ^ switch on (bypasses SD ROM code on power up)
Compile/download with pnut/etc and run PST/terminal program and see the results.
This post here has the latest eval image.