Ich steig da nicht durch und weiß gar nicht, wovon Ihr genau redet (irgendwas mit SD).
Aber meine Frage: kann ich irgendwie mitstreiten??

Gruß
Jens
Moin KarlPokeMon hat geschrieben:Meinst Du ich habe diesen Screenshot hier aus Spaß gepostet, weil mir langweilig ist ?siggi hat geschrieben:Wo steht in der Doku der SD-Platine, daß /CS HIGH sein muß?
http://forum.tlienhard.com/phpBB3/viewt ... 300#p25656
Da steht "sowie" in Bezug auf CS und Activate. Sowie heißt nach meinem Sprachschatz soviel wie UND. Also gehören nach der Beschreibung für mich beide Signale auf +5V oder eben schaltbar wenn man das möchte. Entweder ist dieser Satz falsch oder der Verfasser hat sich sehr ungeschickt ausgedrückt.
Code: Alles auswählen
3 V
5 V
Masse
Clock
Datenausgang
Dateneingang
CS Signal
[color=#FF0000]SOWIE/UND[/color]
Activate Leitung
Ich auch nicht ...Dann verstehe ich ehrlich gesagt nicht, warum es a) jetzt bei Dir nicht läuftsiggi hat geschrieben: Nach dieser Beschreibung betreibe ich die SD-Karte seit Jahren im Laptop.
da es "hier" auch noch andere User mit SD/SPI/Pegelwandler-KnoffHoff gibt (Bodo, Joachim, Tom, Olli, Jens, ...) , die andere Hardware zur Pegelanpassung benutzen und die deshalb gut als "Vergleichsojekt" dienen kann, um Fehler in meiner Pegelanpassung aufzudecken.und Du b) hier nach Unterstützung fragst.
siggi,siggi hat geschrieben: Moin Karl
um diesen Satz falsch zu verstehen, muß man ihn schon aus dem Kontext reissen, wie es Dein Screenshot tut. Hier ist der ganze Abschnitt (der leider auf 2 Seiten verteilt ist):
Kann man mal sehen, noch eine andere/weitere Interpretation desselben Datenblattes.ZX-Heinz hat geschrieben: CS=H für Empfang, also Pins auf Input. (Activate-Signal ist egal). CLK und alles weitere wird ausgewertet.
CS=L (und natürlich Activate=+5V) für Senden.
Hallo Pokemon,PokeMon hat geschrieben:Also das hat m.E. jetzt nicht mit dem VDRIVE zu tun, das ist eine andere Hardware und erfordert auch andere Treiber.
Das Problem ist ab hier näher beschrieben:
http://forum.tlienhard.com/phpBB3/viewt ... 275#p25581
Das ist unwahrscheinlich, da ich ja von funktionsfähigen Routinen für PIO ausgegangen bin und "nur" den SPI-Zugriff angepaßt habe.PokeMon hat geschrieben: * Datenfehler (MSB/LSB vertauscht, falsche Routine angesprochen)
Die Karte selbst funzt am PIO-Interface eines anderen Zeddy. Und Joachim hatte ja mit anderem Pegelwandlerplatinchen auch keinen Erfolg. Wenn meines defekt ist, dann sollte es anderwo ja klappen ...* Hardwaredefekt (SD Karte oder Kartenleser)
Habe ich probiert: Mefisdos gestartet, VDRIVE abgeklemmt, Karte gesteckt: gleicher Effekt bei "D D:/": Plattenfehler* Initialisierungsproblem
Letzteres könnte man vielleicht umgehen, indem man die SD Karte erst einsteckt, wenn Dein Programm läuft.
Möglicherweise gibt der NU beim Startup aus seinem ROM irgendwelche Sequenzen auf den SPI Leitungen aus (Initialisierung des Flash Bausteins) die Deine SD Karte nicht mag und zum Absturz oder zumindest zum Schweigen bringt. Reset Anschluss haben die Dinger ja auch nicht. Ich würde mal die Karte ziehen und nur kurz vor Deinem Test frisch einstecken.
Das ist ja da ProblemPokeMon hat geschrieben:Dann sind aber nicht mehr viele Fehlerquellen denkbar.
Wenn dieselbe Karte im anderen Modul funktioniert und die gleichen Daten kommen ...
Auch die 3,ebbes V sind da. Und laut Oszi eisern. Hatte schon vermutet, daß ich der 'nen C spendieren müßte (Kabellänge ca. 15 cm), aber da tut sich nix beim Schreiben (kein Einbruch, kein Überschwinger)Auch auf die Gefahr hin, dass Du mich gleich steinigst:
Die 3.3V Spannung liegen schon an der SD Karte (Betriebsspannung) ?
Weil das Modul gibt es ganz offenbar mit und ohne 3.3V Regler und hat noch einen 3.3V Eingang am Steckverbinder.
Hier gefunden, Toshiba Datenblatt, wird aber für andere SD Cards genauso gelten, denke ich:1) Supply Voltage for initialization.
Host System can apply the Operating Voltage from initialization to the card.
Apply more than 74 cycles of Dummy-clock to the SD card.
2) Select operation mode (SD mode or SPI mode)
In case of SPI mode operation, host should drive 1 pin (CD/DAT3) of SD Card I/F to “Low” level.
In case of SD mode operation, host should drive or detect 1 pin of SD Card I/F (Pull up register of 1 pin is pull
up to “High” normally).
Card maintain selected operation mode except re-issue of CMD0 or power on below is SD mode initialization procedure.
3) Send the ACMD41 with Arg = 0 and identify the operating voltage range of the Card.
http://users.ece.utexas.edu/~valvano/EE ... r_Spec.pdf7.2.1 Mode Selection and Initialization
The SD Card is powered up in the SD mode. It will enter SPI mode if the CS signal is asserted (negative) during the reception of the reset command (CMD0). If the card recognizes that the SD mode is required it will not respond to the command and remain in the SD mode. If SPI mode is required, the card will switch to SPI and respond with the SPI mode R1 response.
The only way to return to the SD mode is by entering the power cycle. In SPI mode, the SD Card protocol state machine in SD mode is not observed. All the SD Card commands supported in SPI mode are always available.
Figure 7-2 shows the initialization sequence of SPI mode.
SEND_IF_COND (CMD8) is used to verify SD Memory Card interface operating condition. The argument format of CMD8 is the same as defined in SD mode and the response format of CMD8 is defined in Section 7.3.2.6. The card checks the validity of operating condition by analyzing the argument of CMD8 and the host checks the validity by analyzing the response of CMD8. The supplied voltage is indicated by VHS filed in the argument. The card assumes the voltage specified in VHS as the current supplied voltage. Only 1-bit of VHS shall be set to 1 at any given time. Check pattern is used for the host to check validity of communication between the host and the card.
If the card indicates an illegal command, the card is legacy and does not support CMD8. If the card supports CMD8 and can operate on the supplied voltage, the response echoes back the supply voltage and the check pattern that were set in the command argument.
If VCA in the response is set to 0, the card cannot operate on the supplied voltage. If check pattern is not matched, CMD8 communication is not valid. In this case, it is recommended to retry CMD8 sequence.
Code: Alles auswählen
CMD8
ACMD41
CMD58
CMD59
Ob CMD1 erlaubt ist, hängt offenbar auch noch vom Kartentyp ab.7.2.7 Reset Sequence
The SD Memory Card requires a defined reset sequence. The card enters an idle state after power on reset or reset command (CMD0 for SD memory card). In this state, the only valid host commands are CMD8 (SEND_IF_COND), ACMD41 (SD_SEND_OP_COND), CMD58 (READ_OCR) and CMD59 (CRC_ON_OFF).
For the Thick (2.1 mm) SD Memory Card - CMD1 (SEND_OP_COND) is also valid - this means that in SPI mode, CMD1 and ACMD41 have the same behaviors, but the usage of ACMD41 is preferable since it allows easy distinction between an SD Memory Card and a MultiMediaCard. For the Thin (1.4 mm) Standard Size SD Memory Card, CMD1 (SEND_OP_COND) is an illegal command during the initialization that is done after power on. After Power On, once the card has accepted valid ACMD41, it will be able to also accept CMD1 even if used after re-initializing (CMD0) the card. It was defined in such way in order to be able to distinguish between a Thin SD Memory Card and a MultiMediaCard (that supports CMD1 as well).
Hi KarlPokeMon hat geschrieben:Ja, so langsam gehen mir die Ideen aus.
Vielleicht noch ein Timing Problem ?
CLK Polarität, also Ruhe-Level low ?
Ich habe da noch was gefunden zur Initialisierung, da reichen die 74 CLKs nicht aus (das soll offenbar ein Reset Kommando sein resp. kann man so einen Reset ausführen). Vor CMD0 soll noch CD/DAT3 auf low gezogen werden, um SPI auszuwählen (sonst SD Interface aktiv).
Hier gefunden, Toshiba Datenblatt, wird aber für andere SD Cards genauso gelten, denke ich:1) Supply Voltage for initialization.
Host System can apply the Operating Voltage from initialization to the card.
Apply more than 74 cycles of Dummy-clock to the SD card.
2) Select operation mode (SD mode or SPI mode)
In case of SPI mode operation, host should drive 1 pin (CD/DAT3) of SD Card I/F to “Low” level.
In case of SD mode operation, host should drive or detect 1 pin of SD Card I/F (Pull up register of 1 pin is pull
up to “High” normally).
Card maintain selected operation mode except re-issue of CMD0 or power on below is SD mode initialization procedure.
3) Send the ACMD41 with Arg = 0 and identify the operating voltage range of the Card.
http://www.mikrocontroller.net/attachme ... 08G7B7.pdf
Some controllers (newer and higher capacity cards mostly) will simply stay in IDLE if you issue CMD1 to them. You should first issue CMD8 0x1AA after the reset (CMD0), and then try to use CMD55 + ACMD41. If and only if that fails, use CMD1.
actually, many SD cards (mostly newer ones, my Sony SR-32C4 32GB being one) won't start at all without CMD8 issued beforehand. Also, the clock is usually not an issue, as long as it's within sensible range. – vaxquis Jun 4 at 22:39
Du kannst ja den Kartenleser ja mal testweise an Deine PIO anschließen.siggi hat geschrieben: Es ist auch nicht so, daß die Karte zu schnell oder zu langsam antwortet: sie antwortet garnicht (habe jedenfalls deren Datenausgang noch nie wackeln sehen).
Also scheint sie die Kommandos nicht zu erkennen/verstehen.
Doch, auf Byte/Command-Level sind beide Treiber identisch, nur werden bei der PIO die Bits seriell und mit in Software generierten Clock über einen PIO-Port ausgegeben/eingelesen und beim NU seriell mit hardwaregenerierter Clock über das Sparinterface.PokeMon hat geschrieben: Jetzt ist aber wenn ich es richtig verstanden habe, aber sowieso der Treiber im NU über "seriell" (driver.txt) nicht identisch mit dem PIO Driver.
Aber ich weiß esInsofern weiß ich auch gar nicht, ob sich das generell vergleichen läßt wenn die SD Karte an der PIO (mit anderer Software) läuft im Vergleich zum NU (anderer Treiber). Möglicherweise funktioniert der Treiber in dieser Form auch nur mit dem Microdrive (SPI Flash ROM auf dem NU).