| Issue 46: | WXEDA SD Card mod | |
| 1 person starred this issue and may be notified of changes. | Back to list |
SD card seems doesn't work (at least for me) on the WXEDA board. 1. I just soldered sd card adapter like described here: http://zx-pk.ru/showthread.php?t=8635&page=31 pin 1 to SD_DAT3 pin 2 to SD_CMD pin 3 to GND pin 4 to 3v3 pin 5 to SD_CLK pin 6 to GND pin 7 to SD_DAT pin 8 - N/C pin 9 - N/C 2. Added lines to code: set_location_assignment PIN_3 -to SD_DAT3 set_location_assignment PIN_2 -to SD_CMD set_location_assignment PIN_1 -to SD_CLK set_location_assignment PIN_141 -to SD_DAT 3. Formatted SD card to fat16 4. Created a VECTOR06 directory with a few *.fdd files 5. When powering wxeda board, i see D5 and D2 blinking, while D4, D3 and D1 continuous on. When toggling "Scroll Lock" i see a message "INSERT CARD". Navigation in the menu doesn't work (it always rolling back to DISK menu entry) In the serial terminal i see just @ VECTOR-06C FPGA REPLICA (C)2008-14 VIACHESLAV SLAVINSKY@ ;) Please help me debug SD card access. I have ability to use a logic analyzer to test SPI communications between FPGA and SD card. Probably my SD card is too slow or something like that.
Aug 16, 2014
Project Member
#1
svof...@gmail.com
Aug 17, 2014
I've tried 2 different sd cards (2 and 8 Gb) - they didn't work for me. I think pin 1 and pin 2 of my cyclone iv are probably died due to my incorrect first try with SD card mod. Will try to swap them with pins 143 & 144 (both used for S-video), then will let you know.
Aug 17, 2014
This is strange, I hope the pins on your Cyclone are still alright. It's worth noting that attaching SD card the way I did is not a very good way of doing it because essentially they go in parallel with the resistor-diode networks that may affect the signals. But for me it worked so I did not have to remove any of the installed components or cut traces. Maybe trying to see what happens on those pins with a scope could shed some light on this. S-Video pins are ok if you remove the corresponding resistor arrays, RP6 and RP15 if I'm not mistaken. There should be more free pins near the LEDs though, no?
Aug 17, 2014
Please see attached screen from the logic analyzer. It's seems SD_DAT pin is always high (that is strange).
Aug 17, 2014
Yes. It's as if the card was ignoring all communications. It is unlikely, but could it be that there's a poor contact inside of the adapter? When I was making mine, I damaged one adapter by using too much heat. It deformed slightly and inserting/removing card was very difficult.
Aug 17, 2014
Hmm. just soldered another sd-card adapter (pcb based) - the same situation, card did not responded. What is the SPI clock rate used in the project ? Could it be too much for my sd cards?
Aug 17, 2014
Maybe you are using SD-card without spi mode support? These cards working in other retrocomp projects with spi mode?
Aug 17, 2014
Sure, i've even soldered a normal SD card adapter (instead of microSD) and tried there a 256M old school SD card that 100% works in retrocomps via SPI mode ;) Also just desoldered R30/R29/R26/R25 from the pcb - no results also. Also, as i see, there were RP11 resistor matrix (4x 330 Ohm) - all signals to the 7-segment indicator are going through these resistors. Could it be a problem ?
Aug 17, 2014
It shouldn't but your setup obviously does not work so it's anyone's guess. If I'm not mistaken, this is MISO output of SD card. Suppose it's Cyclone pin stuck at high level. What if you unsolder the wire from the PCB, will there be some signal at this output of SD card?
Aug 18, 2014
I think we have a HIGH level on MISO pin because of logic analyzer internal pull-ups ;) All unused channels also HIGH by default. With old SD card i see some responses on MISO pin, but SD card still doesn't work (i see INSERT CARD message in the osd menu). No ideas what's next. I've already swapped SD_* pins with DSEN* pins, recompiles the sources, it still does not work for me.
Aug 18, 2014
Could it be a problem of missing decoupling capacitors ? People recommended to solder 0.1uF and 100uF capacitors as close as possible to the sd card to improve overall stability of the SD card SPI communications. Will try, anyway ;)
Aug 18, 2014
This board is notorious for not having any decoupling capacitors at all. Of course it would not hurt adding a few. Re: everything else, really can't recommend anything useful.
Aug 18, 2014
No luck, still :(
Aug 18, 2014
I'm trying to find a way to slow down SPI, it isn't so easy as it turns out. BTW, your second screenshot shows really strange SCK line. Or is it just a very small scale and each peak represents a packet of many?
Aug 18, 2014
Yes, it is a very small scale to fill all sequence of communication. Each pick represents a packet of clock data as well.
Aug 18, 2014
Are the wires really short? At 25MHz an extra centimeter could make a difference.
Aug 18, 2014
I'm asking because I'm probing the signals on my board and I'm not liking what I'm seeing. I'd say it's a miracle that it works at all. So if your wires are longer compared to what you saw in my photo, maybe try making them shorter a bit.
Aug 19, 2014
Wires are short as possible, 1-2 cm max. But thanks, a good idea to check / replace them. I've used a tiny MGTF-2 0.03mm2 wire (like this one: http://www.e-voron.dp.ua/catalog/013135). Also, is it possible somehow to decrease the spi clock from 25MHz to at least 8MHz (or even to 400kHz) to improve stability ?
Aug 19, 2014
Yeah, 1-2cm is same as mine, I don't see a problem then, though mine are actually fairly thick. I'm trying to reduce SPI clock. The way it's implemented now it doesn't really allow that but it can be helped.
Aug 19, 2014
Try this file please, see if it works for you. The clock is divided by 4 here and it is the slowest I could get working. I guess slower speeds may result in some problems in the floppy cpu glue logic or DMA, can't be sure about that. But 6 MHz is practically DC :) If it doesn't work for you, it's not about the clock.
Aug 19, 2014
Thank you very much, but i'm unable to try your modifications right now :( I'm in a business trip due to next tuesday. I hope it should/must work, finally ;)
Aug 30, 2014
Just tried your improvements - it's still does not work for me. Any ideas how to debug it properly ? Can i put something on the usb serial port to troubleshoot SD SPI communications ? AFAIK, not all SD cards supports SPI, but i've already tried 3 different cards, they all works nice on Speccy 2010 and UzeBox (all of them of course FAT16 formatted).
Aug 30, 2014
If you can compile the code (should be easy, see cc65-winbuild in trunk), you could add trace printing. MMC-realated stuff is in firmware/floppysrc/mmc.c
Aug 31, 2014
Hey, the problem has been solved magically & automatically after i did a clean checkout and recompile the project. So, thanks a lot for help and support, now i have a working Vector-06c based on WXEDA board!!! Thanks for a great project, this issue can be closed then.
Sep 2, 2014
-HOORJ-
Status:
Done
|
|
| ► Sign in to add a comment |